@lovrabet/lovrabet-cli 2.1.12 → 2.1.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/app-config/shared.js +1 -1
  12. package/lib/commands/artifact/index.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schema.js +1 -1
  39. package/lib/commands/service/dynamic.js +1 -1
  40. package/lib/commands/service/function-name-adapter.js +1 -0
  41. package/lib/commands/service/index.js +1 -1
  42. package/lib/commands/service/registry.js +1 -1
  43. package/lib/commands/skill/commands/create.js +1 -1
  44. package/lib/commands/skill/commands/install.js +1 -1
  45. package/lib/commands/skill/commands/list.js +1 -1
  46. package/lib/commands/skill/commands/push.js +1 -1
  47. package/lib/commands/skill/commands/validate.js +1 -1
  48. package/lib/commands/skill/flags.js +1 -1
  49. package/lib/commands/skill/index.js +1 -1
  50. package/lib/commands/skill/manifest-helpers.js +1 -1
  51. package/lib/commands/skill/push-execute.js +1 -1
  52. package/lib/commands/skill/push-flow-helpers.js +1 -1
  53. package/lib/commands/skill/push-retarget.js +1 -1
  54. package/lib/commands/skill/scopes.js +1 -1
  55. package/lib/commands/skill/summary.js +1 -1
  56. package/lib/commands/skill/templates.js +1 -1
  57. package/lib/commands/skill/validate.js +1 -1
  58. package/lib/commands/sql/detail.js +1 -1
  59. package/lib/commands/sql/exec.js +1 -1
  60. package/lib/commands/sql/index.js +1 -1
  61. package/lib/commands/update.js +1 -1
  62. package/lib/commands/workspace/index.js +1 -1
  63. package/lib/config/schema.js +1 -1
  64. package/lib/constant/app.js +1 -1
  65. package/lib/constant/auth-mode.js +1 -1
  66. package/lib/constant/cli.js +1 -1
  67. package/lib/constant/defaults.js +1 -1
  68. package/lib/constant/distribution.js +1 -1
  69. package/lib/constant/domain.js +1 -1
  70. package/lib/constant/env.js +1 -1
  71. package/lib/constant/output.js +1 -1
  72. package/lib/constant/product.js +1 -1
  73. package/lib/constant/risk.js +1 -1
  74. package/lib/constant/url.js +1 -1
  75. package/lib/context.js +1 -1
  76. package/lib/core/api-client.js +1 -1
  77. package/lib/core/db-resolver.js +1 -1
  78. package/lib/core/sdk-client.js +1 -1
  79. package/lib/errors.js +1 -1
  80. package/lib/framework/build-all-flags.js +1 -1
  81. package/lib/framework/dryrun.js +1 -1
  82. package/lib/framework/flags.js +1 -1
  83. package/lib/framework/help.js +1 -1
  84. package/lib/framework/index.js +1 -1
  85. package/lib/framework/output.js +1 -1
  86. package/lib/framework/preparse.js +1 -1
  87. package/lib/framework/rate-limit.js +1 -1
  88. package/lib/framework/response.js +1 -1
  89. package/lib/framework/runner-confirmation.js +1 -1
  90. package/lib/framework/runner-error.js +1 -1
  91. package/lib/framework/runner.js +1 -1
  92. package/lib/framework/schema-export.js +1 -1
  93. package/lib/framework/service-order.js +1 -1
  94. package/lib/framework/types.js +1 -1
  95. package/lib/generated/build-info.js +1 -1
  96. package/lib/help.js +1 -1
  97. package/lib/skills/npx-skills-add.js +1 -1
  98. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  99. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  100. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  101. package/lib/skills/runtime-skill-sync/links.js +1 -1
  102. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  103. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  104. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  105. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  106. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  107. package/lib/skills/runtime-skill-sync/push.js +1 -1
  108. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  111. package/lib/skills/runtime-skill-sync.js +1 -1
  112. package/lib/utils/apply-jq-filter.js +1 -1
  113. package/lib/utils/logger.js +1 -1
  114. package/lib/utils/lossless-json.js +1 -1
  115. package/lib/utils/params.js +1 -1
  116. package/lib/utils/platform.js +1 -1
  117. package/lib/utils/update-notice.js +1 -1
  118. package/lib/utils/version.js +1 -1
  119. package/lib/utils/write-cli-side-channel.js +1 -1
  120. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x2cf2f8,_0x518bd4){const _0x5b5014=a90_0x51d2,_0x1c576d=_0x2cf2f8();while(!![]){try{const _0x24a160=-parseInt(_0x5b5014(0x147))/0x1*(parseInt(_0x5b5014(0x14e))/0x2)+-parseInt(_0x5b5014(0x14b))/0x3*(-parseInt(_0x5b5014(0x143))/0x4)+-parseInt(_0x5b5014(0x142))/0x5+-parseInt(_0x5b5014(0x140))/0x6+parseInt(_0x5b5014(0x14f))/0x7+-parseInt(_0x5b5014(0x14c))/0x8*(parseInt(_0x5b5014(0x14a))/0x9)+-parseInt(_0x5b5014(0x145))/0xa*(-parseInt(_0x5b5014(0x141))/0xb);if(_0x24a160===_0x518bd4)break;else _0x1c576d['push'](_0x1c576d['shift']());}catch(_0x36629d){_0x1c576d['push'](_0x1c576d['shift']());}}}(a90_0x5146,0x835b7));import{buildSchemaPayload as a90_0x10a228}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a90_0x5146(){const _0x3bd8e4=['13036AoTTuB','filter','10161070CqpPdv','none','362qLfmbI','requiresAuth','commands','1063467LyNRUv','978NdcfnL','32fekpQn','../commands/registry.js','1124WeDNhd','181328aPVMlN','service','map','1766880ByCfXK','11DaqzcG','2979150BSsKDD'];a90_0x5146=function(){return _0x3bd8e4;};return a90_0x5146();}function a90_0x51d2(_0x4c17c8,_0x1dbaaf){_0x4c17c8=_0x4c17c8-0x13f;const _0x51460d=a90_0x5146();let _0x51d2d0=_0x51460d[_0x4c17c8];return _0x51d2d0;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x515c50=a90_0x51d2,{serviceRegistry:_0x5d0fee,findDefinition:_0x36ec54}=await import(_0x515c50(0x14d)),_0x5a5da1=new Set(_0x5d0fee['map'](_0x59920b=>_0x59920b[_0x515c50(0x150)])),_0x126903=listDynamicServiceEntries()[_0x515c50(0x144)](_0x1959f6=>!_0x5a5da1['has'](_0x1959f6[_0x515c50(0x150)])),_0x1f1174=a90_0x10a228({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x5d0fee,_0x126903),'buildAllFlags':buildAllFlags,'findDefinition':(_0x7ed9c8,_0x21f3f2)=>_0x36ec54(_0x7ed9c8,_0x21f3f2)??findDynamicServiceDefinition(_0x7ed9c8,_0x21f3f2)});return normalizeSchemaPayload(_0x1f1174);}function normalizeSchemaPayload(_0x18bf37){const _0x4abca1=a90_0x51d2;return{..._0x18bf37,'schemaVersion':0x2,'services':_0x18bf37['services'][_0x4abca1(0x13f)](_0x1015a4=>({..._0x1015a4,'commands':_0x1015a4[_0x4abca1(0x149)][_0x4abca1(0x13f)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x26a058){const _0x501c4f=a90_0x51d2,_0x5effcd=_0x26a058;return{..._0x26a058,'auth':_0x5effcd['auth']??(_0x26a058[_0x501c4f(0x148)]?'required':_0x501c4f(0x146))};}
1
+ (function(_0x3efa26,_0x12b8ac){const _0x2d72d6=a91_0x489a,_0x35eb2e=_0x3efa26();while(!![]){try{const _0x5c516e=-parseInt(_0x2d72d6(0x18e))/0x1+parseInt(_0x2d72d6(0x189))/0x2+-parseInt(_0x2d72d6(0x18a))/0x3*(-parseInt(_0x2d72d6(0x17f))/0x4)+-parseInt(_0x2d72d6(0x18d))/0x5+-parseInt(_0x2d72d6(0x181))/0x6+-parseInt(_0x2d72d6(0x188))/0x7*(parseInt(_0x2d72d6(0x180))/0x8)+parseInt(_0x2d72d6(0x183))/0x9;if(_0x5c516e===_0x12b8ac)break;else _0x35eb2e['push'](_0x35eb2e['shift']());}catch(_0x4df71c){_0x35eb2e['push'](_0x35eb2e['shift']());}}}(a91_0x41a8,0x8cd2c));import{buildSchemaPayload as a91_0x263164}from'@lovrabet/cli-framework';function a91_0x41a8(){const _0x184ae5=['1042260YzgyKd','has','required','28mnsqKg','10960yjPNnC','1742082nurzyN','services','9669411jiYfMF','none','requiresAuth','map','../commands/registry.js','749wuFQlK','1169370lYKjZm','256407kyKeNr','service','auth','1006690kUNZcb'];a91_0x41a8=function(){return _0x184ae5;};return a91_0x41a8();}import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';function a91_0x489a(_0x24f76e,_0x3224f2){_0x24f76e=_0x24f76e-0x17e;const _0x41a851=a91_0x41a8();let _0x489af0=_0x41a851[_0x24f76e];return _0x489af0;}import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x53822e=a91_0x489a,{serviceRegistry:_0x5dbed9,findDefinition:_0x43b28f}=await import(_0x53822e(0x187)),_0x22881d=new Set(_0x5dbed9['map'](_0x39f04f=>_0x39f04f[_0x53822e(0x18b)])),_0x1b69e7=listDynamicServiceEntries()['filter'](_0x40487e=>!_0x22881d[_0x53822e(0x18f)](_0x40487e['service'])),_0x570264=a91_0x263164({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x5dbed9,_0x1b69e7),'buildAllFlags':buildAllFlags,'findDefinition':(_0x54623a,_0x38af05)=>_0x43b28f(_0x54623a,_0x38af05)??findDynamicServiceDefinition(_0x54623a,_0x38af05)});return normalizeSchemaPayload(_0x570264);}function normalizeSchemaPayload(_0x3578ca){const _0x33b786=a91_0x489a;return{..._0x3578ca,'schemaVersion':0x2,'services':_0x3578ca[_0x33b786(0x182)][_0x33b786(0x186)](_0x314d41=>({..._0x314d41,'commands':_0x314d41['commands'][_0x33b786(0x186)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x41b8a5){const _0x5e4ac7=a91_0x489a,_0x1dde05=_0x41b8a5;return{..._0x41b8a5,'auth':_0x1dde05[_0x5e4ac7(0x18c)]??(_0x41b8a5[_0x5e4ac7(0x185)]?_0x5e4ac7(0x17e):_0x5e4ac7(0x184))};}
@@ -1 +1 @@
1
- function a91_0x5ea3(){const _0x4ee781=['findIndex','99882FSZwHE','10LCTWRv','2505613RFUIDK','50wfBLNW','13264wPrkqc','99026qtsRsV','service','243PqRbjV','2692oFBXZq','length','290880BynjSA','1fYZBJK','39TAuAzs','161RGbAjh','slice','1951956iREWun'];a91_0x5ea3=function(){return _0x4ee781;};return a91_0x5ea3();}function a91_0x4cfe(_0x3a05c0,_0x3669c6){_0x3a05c0=_0x3a05c0-0x1d9;const _0x5ea3cd=a91_0x5ea3();let _0x4cfe94=_0x5ea3cd[_0x3a05c0];return _0x4cfe94;}(function(_0x3d62b9,_0x237cd0){const _0x1701bc=a91_0x4cfe,_0x252683=_0x3d62b9();while(!![]){try{const _0x43fff1=-parseInt(_0x1701bc(0x1dd))/0x1*(-parseInt(_0x1701bc(0x1e8))/0x2)+parseInt(_0x1701bc(0x1d9))/0x3*(-parseInt(_0x1701bc(0x1da))/0x4)+-parseInt(_0x1701bc(0x1e6))/0x5*(-parseInt(_0x1701bc(0x1dc))/0x6)+-parseInt(_0x1701bc(0x1df))/0x7*(-parseInt(_0x1701bc(0x1e7))/0x8)+parseInt(_0x1701bc(0x1e3))/0x9*(parseInt(_0x1701bc(0x1e4))/0xa)+parseInt(_0x1701bc(0x1e5))/0xb+-parseInt(_0x1701bc(0x1e1))/0xc*(parseInt(_0x1701bc(0x1de))/0xd);if(_0x43fff1===_0x237cd0)break;else _0x252683['push'](_0x252683['shift']());}catch(_0x3e4c51){_0x252683['push'](_0x252683['shift']());}}}(a91_0x5ea3,0x41a1a));export function insertDynamicServicesAfterServiceTree(_0x57ae00,_0x1cc212){const _0x30ff3c=a91_0x4cfe;if(_0x1cc212[_0x30ff3c(0x1db)]===0x0)return[..._0x57ae00];const _0x5bea6c=_0x57ae00[_0x30ff3c(0x1e2)](_0x8a72c=>_0x8a72c[_0x30ff3c(0x1e9)]===_0x30ff3c(0x1e9));if(_0x5bea6c<0x0)return[..._0x57ae00,..._0x1cc212];return[..._0x57ae00['slice'](0x0,_0x5bea6c+0x1),..._0x1cc212,..._0x57ae00[_0x30ff3c(0x1e0)](_0x5bea6c+0x1)];}
1
+ function a92_0x1fea(){const _0xc5a8d1=['37736bLajbt','length','service','73585cRtypE','708468hvlEKx','1900296sfSiKs','710812cJcADR','18PwAXem','14fqAHDh','2150224pnmdSJ','5806070JFKAdI','11TqzCoK','slice','88WlFymQ'];a92_0x1fea=function(){return _0xc5a8d1;};return a92_0x1fea();}(function(_0x462926,_0x3b3024){const _0x9daffd=a92_0x5b8d,_0x3274ce=_0x462926();while(!![]){try{const _0x37daec=-parseInt(_0x9daffd(0xd6))/0x1+parseInt(_0x9daffd(0xce))/0x2+parseInt(_0x9daffd(0xcc))/0x3+parseInt(_0x9daffd(0xd5))/0x4*(parseInt(_0x9daffd(0xcb))/0x5)+parseInt(_0x9daffd(0xcd))/0x6*(parseInt(_0x9daffd(0xd0))/0x7)+parseInt(_0x9daffd(0xd1))/0x8*(-parseInt(_0x9daffd(0xcf))/0x9)+parseInt(_0x9daffd(0xd2))/0xa*(-parseInt(_0x9daffd(0xd3))/0xb);if(_0x37daec===_0x3b3024)break;else _0x3274ce['push'](_0x3274ce['shift']());}catch(_0x331dbf){_0x3274ce['push'](_0x3274ce['shift']());}}}(a92_0x1fea,0x5fea5));function a92_0x5b8d(_0x4da4e5,_0xd7a944){_0x4da4e5=_0x4da4e5-0xca;const _0x1fea54=a92_0x1fea();let _0x5b8d54=_0x1fea54[_0x4da4e5];return _0x5b8d54;}export function insertDynamicServicesAfterServiceTree(_0x274fef,_0xcc9a9d){const _0x49c3ad=a92_0x5b8d;if(_0xcc9a9d[_0x49c3ad(0xd7)]===0x0)return[..._0x274fef];const _0x31214f=_0x274fef['findIndex'](_0x1779f7=>_0x1779f7[_0x49c3ad(0xca)]===_0x49c3ad(0xca));if(_0x31214f<0x0)return[..._0x274fef,..._0xcc9a9d];return[..._0x274fef[_0x49c3ad(0xd4)](0x0,_0x31214f+0x1),..._0xcc9a9d,..._0x274fef['slice'](_0x31214f+0x1)];}
@@ -1 +1 @@
1
- function a92_0xfd64(_0x3be190,_0x113385){_0x3be190=_0x3be190-0x138;var _0x5cf98f=a92_0x5cf9();var _0xfd64c5=_0x5cf98f[_0x3be190];return _0xfd64c5;}function a92_0x5cf9(){var _0x3855f3=['316468JUtloz','1096670dvwbzC','443093VQOdpQ','5kiKyoR','4579028nRPxJy','11202795cQluvV','12CODHCQ','517qacCNQ','12jNtLvr','4574480BilyOS','712378bCVpYt'];a92_0x5cf9=function(){return _0x3855f3;};return a92_0x5cf9();}(function(_0x418fce,_0x7f3433){var _0x5b0959=a92_0xfd64,_0x20d59d=_0x418fce();while(!![]){try{var _0x1246ba=-parseInt(_0x5b0959(0x13a))/0x1+-parseInt(_0x5b0959(0x13b))/0x2*(parseInt(_0x5b0959(0x138))/0x3)+-parseInt(_0x5b0959(0x13f))/0x4*(parseInt(_0x5b0959(0x13e))/0x5)+parseInt(_0x5b0959(0x141))/0x6*(-parseInt(_0x5b0959(0x13d))/0x7)+-parseInt(_0x5b0959(0x139))/0x8+-parseInt(_0x5b0959(0x140))/0x9+parseInt(_0x5b0959(0x13c))/0xa*(parseInt(_0x5b0959(0x142))/0xb);if(_0x1246ba===_0x7f3433)break;else _0x20d59d['push'](_0x20d59d['shift']());}catch(_0x93439c){_0x20d59d['push'](_0x20d59d['shift']());}}}(a92_0x5cf9,0xb00db));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
1
+ function a93_0xf02f(_0x20ba0c,_0x1188b8){_0x20ba0c=_0x20ba0c-0x13b;var _0x4621cd=a93_0x4621();var _0xf02f49=_0x4621cd[_0x20ba0c];return _0xf02f49;}(function(_0x40b7f7,_0x4eb821){var _0x295377=a93_0xf02f,_0x50bf7c=_0x40b7f7();while(!![]){try{var _0x5da613=parseInt(_0x295377(0x145))/0x1+-parseInt(_0x295377(0x13c))/0x2*(parseInt(_0x295377(0x13f))/0x3)+-parseInt(_0x295377(0x146))/0x4*(-parseInt(_0x295377(0x13d))/0x5)+parseInt(_0x295377(0x143))/0x6+parseInt(_0x295377(0x142))/0x7*(parseInt(_0x295377(0x140))/0x8)+parseInt(_0x295377(0x141))/0x9*(parseInt(_0x295377(0x13b))/0xa)+parseInt(_0x295377(0x13e))/0xb*(-parseInt(_0x295377(0x144))/0xc);if(_0x5da613===_0x4eb821)break;else _0x50bf7c['push'](_0x50bf7c['shift']());}catch(_0x469024){_0x50bf7c['push'](_0x50bf7c['shift']());}}}(a93_0x4621,0x9b095));function a93_0x4621(){var _0x2ed714=['2406enBbVR','8JLhTMa','395982pLPpLc','6214733BBMjOs','6925686uWpuru','24612dNoOAJ','851254gjHkTL','38840WaRLLT','20rwAcCV','734WLpMNi','630QLrHwO','17567RSOJFf'];a93_0x4621=function(){return _0x2ed714;};return a93_0x4621();}export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
@@ -1 +1 @@
1
- const a93_0x49d26c=a93_0x300e;(function(_0x2a1cbe,_0x64decf){const _0x15d89a=a93_0x300e,_0x3d0a5e=_0x2a1cbe();while(!![]){try{const _0x186907=-parseInt(_0x15d89a(0x11f))/0x1*(parseInt(_0x15d89a(0x120))/0x2)+-parseInt(_0x15d89a(0x119))/0x3*(parseInt(_0x15d89a(0x116))/0x4)+parseInt(_0x15d89a(0x113))/0x5*(-parseInt(_0x15d89a(0x118))/0x6)+-parseInt(_0x15d89a(0x117))/0x7+-parseInt(_0x15d89a(0x11e))/0x8*(parseInt(_0x15d89a(0x11b))/0x9)+parseInt(_0x15d89a(0x11a))/0xa+parseInt(_0x15d89a(0x11c))/0xb*(parseInt(_0x15d89a(0x115))/0xc);if(_0x186907===_0x64decf)break;else _0x3d0a5e['push'](_0x3d0a5e['shift']());}catch(_0x36b32d){_0x3d0a5e['push'](_0x3d0a5e['shift']());}}}(a93_0x3f69,0x94fb9));function a93_0x300e(_0x523a45,_0x10628c){_0x523a45=_0x523a45-0x113;const _0x3f69b9=a93_0x3f69();let _0x300eb8=_0x3f69b9[_0x523a45];return _0x300eb8;}export const VERSION=a93_0x49d26c(0x11d);function a93_0x3f69(){const _0x5d1ced=['9jsDepx','7913660xYOEnj','30150OMzdVP','24735469yqCTfD','2.1.12','1992gOOoIK','41FKmgra','6956VTRLNk','2026-07-14T07:00:38.184Z','10VnOxDB','df44f0e','12GpxesM','278708dYDnhX','1050917nymHud','3281706zXVgBr'];a93_0x3f69=function(){return _0x5d1ced;};return a93_0x3f69();}export const GIT_TAG='v2.1.12-beta.1';export const GIT_COMMIT=a93_0x49d26c(0x114);export const BUILD_TIME=a93_0x49d26c(0x121);
1
+ const a94_0x489428=a94_0x45c1;(function(_0x54b2f0,_0x3a8c4a){const _0x510cda=a94_0x45c1,_0x5026cf=_0x54b2f0();while(!![]){try{const _0x5c00e2=parseInt(_0x510cda(0xaf))/0x1+parseInt(_0x510cda(0xb7))/0x2+-parseInt(_0x510cda(0xb2))/0x3*(-parseInt(_0x510cda(0xb4))/0x4)+-parseInt(_0x510cda(0xb8))/0x5+parseInt(_0x510cda(0xae))/0x6*(-parseInt(_0x510cda(0xb1))/0x7)+parseInt(_0x510cda(0xb6))/0x8*(parseInt(_0x510cda(0xb3))/0x9)+parseInt(_0x510cda(0xb5))/0xa;if(_0x5c00e2===_0x3a8c4a)break;else _0x5026cf['push'](_0x5026cf['shift']());}catch(_0x5833d9){_0x5026cf['push'](_0x5026cf['shift']());}}}(a94_0x4acd,0xbf542));export const VERSION=a94_0x489428(0xb0);export const GIT_TAG='v2.1.13-beta.1';export const GIT_COMMIT=a94_0x489428(0xad);function a94_0x45c1(_0x169860,_0x1d8af7){_0x169860=_0x169860-0xac;const _0x4acd88=a94_0x4acd();let _0x45c15a=_0x4acd88[_0x169860];return _0x45c15a;}function a94_0x4acd(){const _0x3b5c03=['186288hUHuvf','1202246xoCEhv','2.1.13-beta.1','245Kbucqd','808485gDudCG','9JyeEvA','8UEDLbh','1376380hIiOTN','5261224UmXkLu','1666694wDubcP','7497560ysRLOj','2026-07-14T15:02:38.454Z','4541b6d'];a94_0x4acd=function(){return _0x3b5c03;};return a94_0x4acd();}export const BUILD_TIME=a94_0x489428(0xac);
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x57610e,_0x4e2574){const _0x5d5717=a94_0x4eac,_0x140d9c=_0x57610e();while(!![]){try{const _0x1e8f86=parseInt(_0x5d5717(0x1ab))/0x1+-parseInt(_0x5d5717(0x1ad))/0x2*(-parseInt(_0x5d5717(0x1a7))/0x3)+parseInt(_0x5d5717(0x1b5))/0x4*(-parseInt(_0x5d5717(0x1ac))/0x5)+parseInt(_0x5d5717(0x1aa))/0x6*(parseInt(_0x5d5717(0x1af))/0x7)+-parseInt(_0x5d5717(0x1a9))/0x8*(parseInt(_0x5d5717(0x1b0))/0x9)+-parseInt(_0x5d5717(0x1b1))/0xa+parseInt(_0x5d5717(0x1b2))/0xb;if(_0x1e8f86===_0x4e2574)break;else _0x140d9c['push'](_0x140d9c['shift']());}catch(_0x57a7b0){_0x140d9c['push'](_0x140d9c['shift']());}}}(a94_0x1858,0x7d4fc));import{jsx as a94_0x304bd1,jsxs as a94_0x210bad}from'react/jsx-runtime';function a94_0x4eac(_0x1c5506,_0x3f6dfa){_0x1c5506=_0x1c5506-0x1a7;const _0x185890=a94_0x1858();let _0x4eac73=_0x185890[_0x1c5506];return _0x4eac73;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a94_0x1858(){const _0x4f5a2a=['13128blyrJI','393419BhOiIg','174770ERPYWI','2qrPCcv','\x20\x20Use\x20','7TamFaZ','2782017ymrOFq','3224400dyepsF','14491422EaAIft','\x20to\x20view\x20available\x20commands.','column','40JAhQwR','green','271419MJCGJg','\x20--help','16KToPEi'];a94_0x1858=function(){return _0x4f5a2a;};return a94_0x1858();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4590ee=a94_0x4eac,{exit:_0x283327}=useApp();return useEffect(()=>{_0x283327();},[_0x283327]),a94_0x210bad(Box,{'flexDirection':_0x4590ee(0x1b4),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x304bd1(Box,{'children':a94_0x304bd1(Text,{'bold':!![],'color':_0x4590ee(0x1b6),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x210bad(Box,{'marginTop':0x1,'children':[a94_0x304bd1(Text,{'dimColor':!![],'children':_0x4590ee(0x1ae)}),a94_0x304bd1(Text,{'bold':!![],'color':_0x4590ee(0x1b6),'children':CLI_BIN_NAME+_0x4590ee(0x1a8)}),a94_0x304bd1(Text,{'dimColor':!![],'children':_0x4590ee(0x1b3)})]})]});}
1
+ (function(_0x55cc8c,_0x4bcf5a){const _0x2a59d3=a95_0x2162,_0x2810ad=_0x55cc8c();while(!![]){try{const _0x49eaec=parseInt(_0x2a59d3(0xca))/0x1+-parseInt(_0x2a59d3(0xcd))/0x2+-parseInt(_0x2a59d3(0xc6))/0x3+parseInt(_0x2a59d3(0xd0))/0x4*(parseInt(_0x2a59d3(0xc4))/0x5)+-parseInt(_0x2a59d3(0xc9))/0x6*(-parseInt(_0x2a59d3(0xc8))/0x7)+parseInt(_0x2a59d3(0xc5))/0x8*(-parseInt(_0x2a59d3(0xcc))/0x9)+-parseInt(_0x2a59d3(0xce))/0xa*(-parseInt(_0x2a59d3(0xcb))/0xb);if(_0x49eaec===_0x4bcf5a)break;else _0x2810ad['push'](_0x2810ad['shift']());}catch(_0x3ba322){_0x2810ad['push'](_0x2810ad['shift']());}}}(a95_0x27b1,0x7fe55));import{jsx as a95_0x31e4e2,jsxs as a95_0x1e30f6}from'react/jsx-runtime';function a95_0x2162(_0x15a330,_0x52e800){_0x15a330=_0x15a330-0xc4;const _0x27b159=a95_0x27b1();let _0x216205=_0x27b159[_0x15a330];return _0x216205;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a95_0x27b1(){const _0x29ec83=['416846urTDrg','7485820GJqsux','\x20to\x20view\x20available\x20commands.','188pWCwYE','\x20--help','\x20\x20Use\x20','37990RvhEmM','2932632oCSWgO','2947035eRQlHW','green','152761xlPBEA','186nDsyZO','665586pDLwFv','11YWeMYN','18HOgBSP'];a95_0x27b1=function(){return _0x29ec83;};return a95_0x27b1();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x314027=a95_0x2162,{exit:_0x104625}=useApp();return useEffect(()=>{_0x104625();},[_0x104625]),a95_0x1e30f6(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a95_0x31e4e2(Box,{'children':a95_0x31e4e2(Text,{'bold':!![],'color':_0x314027(0xc7),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a95_0x1e30f6(Box,{'marginTop':0x1,'children':[a95_0x31e4e2(Text,{'dimColor':!![],'children':_0x314027(0xd2)}),a95_0x31e4e2(Text,{'bold':!![],'color':_0x314027(0xc7),'children':CLI_BIN_NAME+_0x314027(0xd1)}),a95_0x31e4e2(Text,{'dimColor':!![],'children':_0x314027(0xcf)})]})]});}
@@ -1 +1 @@
1
- const a95_0x2e89cd=a95_0x3dfa;function a95_0xa6d4(){const _0x1030fe=['468328cBUXMU','6062JSCcNE','join','32523GfwiXG','status','stderr','unknown','178eRjyOw','trim','132PYXXTv','skipNpxSkillsEnvSuffix','1273788UhjCpW','1285cfydpR','2766320MPuNDP','8vPlxQp','toString','stdout','225300NfUszw','exit\x20','npx','stdio','skills','add','inherit'];a95_0xa6d4=function(){return _0x1030fe;};return a95_0xa6d4();}(function(_0x42bd19,_0x35b737){const _0x637c88=a95_0x3dfa,_0x1e8b0d=_0x42bd19();while(!![]){try{const _0x268593=parseInt(_0x637c88(0x1bb))/0x1*(parseInt(_0x637c88(0x1b6))/0x2)+parseInt(_0x637c88(0x1b2))/0x3*(-parseInt(_0x637c88(0x1bd))/0x4)+-parseInt(_0x637c88(0x1c0))/0x5+-parseInt(_0x637c88(0x1b8))/0x6*(-parseInt(_0x637c88(0x1c8))/0x7)+-parseInt(_0x637c88(0x1c7))/0x8+-parseInt(_0x637c88(0x1ba))/0x9+parseInt(_0x637c88(0x1bc))/0xa;if(_0x268593===_0x35b737)break;else _0x1e8b0d['push'](_0x1e8b0d['shift']());}catch(_0x463eb5){_0x1e8b0d['push'](_0x1e8b0d['shift']());}}}(a95_0xa6d4,0x22f82));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a95_0xf6cbaa}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a95_0x3dfa(_0x39f73e,_0x5cf744){_0x39f73e=_0x39f73e-0x1b2;const _0xa6d4c3=a95_0xa6d4();let _0x3dfa2a=_0xa6d4c3[_0x39f73e];return _0x3dfa2a;}export const LOVRABET_SKILL_SOURCE=a95_0xf6cbaa;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a95_0x2e89cd(0x1b9)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x4f4d68,_0x1d31ad=LOVRABET_SKILL_SOURCE,_0x173d20){const _0x34f2d0=a95_0x2e89cd;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x22555d=_0x173d20?.[_0x34f2d0(0x1c3)]??_0x34f2d0(0x1c6),_0xae483f=resolveNpmBin(_0x34f2d0(0x1c2)),_0x488fbd=[_0x34f2d0(0x1c4),_0x34f2d0(0x1c5),_0x1d31ad,'-g','-y'],_0x37ecae=[_0xae483f,..._0x488fbd][_0x34f2d0(0x1c9)]('\x20');console['log']('*\x20'+_0x37ecae);const _0x244405=spawnSync(_0xae483f,_0x488fbd,{'cwd':_0x4f4d68,'stdio':_0x22555d,'env':process.env,'shell':![]});if(_0x244405[_0x34f2d0(0x1b3)]===0x0)return{'ok':!![],'status':0x0};let _0x246477=_0x34f2d0(0x1c1)+(_0x244405[_0x34f2d0(0x1b3)]??_0x34f2d0(0x1b5));if(_0x22555d==='pipe'){const _0x30a397=_0x244405[_0x34f2d0(0x1b4)]?_0x244405['stderr'][_0x34f2d0(0x1be)]()['trim']():'',_0x4d0fee=_0x244405[_0x34f2d0(0x1bf)]?_0x244405['stdout']['toString']()[_0x34f2d0(0x1b7)]():'';if(_0x30a397)_0x246477=_0x30a397;else{if(_0x4d0fee)_0x246477=_0x4d0fee;}}return{'ok':![],'status':_0x244405[_0x34f2d0(0x1b3)]??null,'error':_0x246477};}
1
+ (function(_0x41cdb2,_0x2828be){const _0x224d26=a96_0x4086,_0x29ad8f=_0x41cdb2();while(!![]){try{const _0x2fcc94=-parseInt(_0x224d26(0x177))/0x1*(parseInt(_0x224d26(0x176))/0x2)+parseInt(_0x224d26(0x17a))/0x3+-parseInt(_0x224d26(0x17b))/0x4+parseInt(_0x224d26(0x16f))/0x5+-parseInt(_0x224d26(0x17e))/0x6+-parseInt(_0x224d26(0x172))/0x7+parseInt(_0x224d26(0x175))/0x8;if(_0x2fcc94===_0x2828be)break;else _0x29ad8f['push'](_0x29ad8f['shift']());}catch(_0x39f749){_0x29ad8f['push'](_0x29ad8f['shift']());}}}(a96_0x14c5,0x26d26));import{spawnSync}from'node:child_process';function a96_0x4086(_0x2b8300,_0x11f689){_0x2b8300=_0x2b8300-0x16d;const _0x14c51c=a96_0x14c5();let _0x408656=_0x14c51c[_0x2b8300];return _0x408656;}function a96_0x14c5(){const _0x22b823=['skills','6385272pSThPk','173526GiAmwC','3WxnLIA','stderr','trim','17076WauFJb','370960YHtNEY','unknown','stdout','1617738HsAolA','status','stdio','exit\x20','npx','969095ePycuc','pipe','toString','1512028xuzwym','inherit'];a96_0x14c5=function(){return _0x22b823;};return a96_0x14c5();}import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a96_0x2ab6b4}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a96_0x2ab6b4;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x3a6ea3,_0x38625a=LOVRABET_SKILL_SOURCE,_0x5f2aa6){const _0x47a7a5=a96_0x4086;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x508979=_0x5f2aa6?.[_0x47a7a5(0x180)]??_0x47a7a5(0x173),_0x46b6a4=resolveNpmBin(_0x47a7a5(0x16e)),_0xc6ed4e=[_0x47a7a5(0x174),'add',_0x38625a,'-g','-y'],_0x197719=[_0x46b6a4,..._0xc6ed4e]['join']('\x20');console['log']('*\x20'+_0x197719);const _0x579e41=spawnSync(_0x46b6a4,_0xc6ed4e,{'cwd':_0x3a6ea3,'stdio':_0x508979,'env':process.env,'shell':![]});if(_0x579e41[_0x47a7a5(0x17f)]===0x0)return{'ok':!![],'status':0x0};let _0x43c08a=_0x47a7a5(0x16d)+(_0x579e41[_0x47a7a5(0x17f)]??_0x47a7a5(0x17c));if(_0x508979===_0x47a7a5(0x170)){const _0x9c9a44=_0x579e41['stderr']?_0x579e41[_0x47a7a5(0x178)][_0x47a7a5(0x171)]()['trim']():'',_0x5e0636=_0x579e41[_0x47a7a5(0x17d)]?_0x579e41[_0x47a7a5(0x17d)]['toString']()[_0x47a7a5(0x179)]():'';if(_0x9c9a44)_0x43c08a=_0x9c9a44;else{if(_0x5e0636)_0x43c08a=_0x5e0636;}}return{'ok':![],'status':_0x579e41[_0x47a7a5(0x17f)]??null,'error':_0x43c08a};}
@@ -1 +1 @@
1
- const a96_0x3ab37b=a96_0x4571;function a96_0x25a8(){const _0x51f281=['102gNRnMy','24VkJPbp','.turbo','dist','.cache','627462XjOIQr','.next','13745817DeJWhQ','584455FiSDjF','.git','node_modules','1153047pkzUdF','build','SKILL.md','.hg','311300NCWlac','2546176xNhMBX','3249728MTbjUt'];a96_0x25a8=function(){return _0x51f281;};return a96_0x25a8();}(function(_0x1dd8f8,_0x1d2437){const _0x3877a0=a96_0x4571,_0x4ff915=_0x1dd8f8();while(!![]){try{const _0xadb9d8=-parseInt(_0x3877a0(0x9c))/0x1+parseInt(_0x3877a0(0x92))/0x2+parseInt(_0x3877a0(0x99))/0x3+parseInt(_0x3877a0(0x93))/0x4+-parseInt(_0x3877a0(0x91))/0x5*(-parseInt(_0x3877a0(0x94))/0x6)+-parseInt(_0x3877a0(0x9f))/0x7*(parseInt(_0x3877a0(0x95))/0x8)+-parseInt(_0x3877a0(0x9b))/0x9;if(_0xadb9d8===_0x1d2437)break;else _0x4ff915['push'](_0x4ff915['shift']());}catch(_0x15af12){_0x4ff915['push'](_0x4ff915['shift']());}}}(a96_0x25a8,0xb669b));export const METADATA_FILE='lovrabet.skill.json';function a96_0x4571(_0x5954d1,_0x2f6637){_0x5954d1=_0x5954d1-0x8f;const _0x25a8e8=a96_0x25a8();let _0x4571da=_0x25a8e8[_0x5954d1];return _0x4571da;}export const SKILL_FILE=a96_0x3ab37b(0x8f);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a96_0x3ab37b(0x9d),a96_0x3ab37b(0x90),'.svn',a96_0x3ab37b(0x9e),a96_0x3ab37b(0x9a),a96_0x3ab37b(0x97),a96_0x3ab37b(0xa0),'coverage',a96_0x3ab37b(0x96),a96_0x3ab37b(0x98)]);
1
+ const a97_0x30ca55=a97_0x4a0a;(function(_0x1d0dbf,_0x4ee7ab){const _0x43de92=a97_0x4a0a,_0x2df677=_0x1d0dbf();while(!![]){try{const _0x26e03b=parseInt(_0x43de92(0x12a))/0x1*(-parseInt(_0x43de92(0x122))/0x2)+-parseInt(_0x43de92(0x12e))/0x3+parseInt(_0x43de92(0x135))/0x4*(parseInt(_0x43de92(0x12f))/0x5)+-parseInt(_0x43de92(0x130))/0x6*(parseInt(_0x43de92(0x121))/0x7)+parseInt(_0x43de92(0x123))/0x8+parseInt(_0x43de92(0x132))/0x9*(-parseInt(_0x43de92(0x127))/0xa)+-parseInt(_0x43de92(0x12d))/0xb*(-parseInt(_0x43de92(0x120))/0xc);if(_0x26e03b===_0x4ee7ab)break;else _0x2df677['push'](_0x2df677['shift']());}catch(_0x6086a4){_0x2df677['push'](_0x2df677['shift']());}}}(a97_0x195f,0x7d87e));export const METADATA_FILE=a97_0x30ca55(0x12b);function a97_0x195f(){const _0x4ada3e=['4694076ltFubX','build','9hCrCgO','.hg','.turbo','190040VRVxLO','5340ZmoPrd','7fJQnDb','4LFThQK','1714904TSaaDj','.git','coverage','.cache','6542540VpGIKA','.svn','node_modules','15809dMakBm','lovrabet.skill.json','SKILL.md','61897nEAdWw','2635548ZiOIGw','15cllOMc'];a97_0x195f=function(){return _0x4ada3e;};return a97_0x195f();}export const SKILL_FILE=a97_0x30ca55(0x12c);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a97_0x4a0a(_0x59c7c8,_0x21e636){_0x59c7c8=_0x59c7c8-0x120;const _0x195f63=a97_0x195f();let _0x4a0ab3=_0x195f63[_0x59c7c8];return _0x4a0ab3;}export const IGNORED_DIR_NAMES=new Set([a97_0x30ca55(0x124),a97_0x30ca55(0x133),a97_0x30ca55(0x128),a97_0x30ca55(0x129),'.next','dist',a97_0x30ca55(0x131),a97_0x30ca55(0x125),a97_0x30ca55(0x134),a97_0x30ca55(0x126)]);
@@ -1 +1 @@
1
- (function(_0x44bc37,_0x4f9101){const _0x19fa22=a97_0x12af,_0x3d2618=_0x44bc37();while(!![]){try{const _0x4c232d=-parseInt(_0x19fa22(0x203))/0x1*(-parseInt(_0x19fa22(0x1ff))/0x2)+-parseInt(_0x19fa22(0x206))/0x3+parseInt(_0x19fa22(0x207))/0x4*(-parseInt(_0x19fa22(0x1f6))/0x5)+parseInt(_0x19fa22(0x1fc))/0x6+-parseInt(_0x19fa22(0x202))/0x7*(-parseInt(_0x19fa22(0x1f5))/0x8)+-parseInt(_0x19fa22(0x200))/0x9*(parseInt(_0x19fa22(0x1fa))/0xa)+-parseInt(_0x19fa22(0x1f4))/0xb*(parseInt(_0x19fa22(0x205))/0xc);if(_0x4c232d===_0x4f9101)break;else _0x3d2618['push'](_0x3d2618['shift']());}catch(_0x19063e){_0x3d2618['push'](_0x3d2618['shift']());}}}(a97_0x4798,0x61a93));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0xce78ec,_0x5c3e7a){const _0x58a4a8=a97_0x12af,_0x3bcee8=normalizeSkillRelativePath(_0x5c3e7a),_0x5a281e=realOrResolved(_0xce78ec),_0x3127c3=resolve(_0x5a281e,..._0x3bcee8[_0x58a4a8(0x1f8)]('/'));if(!isPathInside(_0x3127c3,_0x5a281e))throw CliErrors[_0x58a4a8(0x204)](_0x58a4a8(0x201)+_0x5c3e7a);return ensureNoSymlinkInManagedPath(_0x5a281e,_0x3bcee8),_0x3127c3;}export function ensureNoSymlinkInManagedPath(_0x4912f8,_0x45464d){const _0x2d9fbc=a97_0x12af;let _0x2ef10f=_0x4912f8;for(const _0x3818f8 of _0x45464d[_0x2d9fbc(0x1f8)]('/')){_0x2ef10f=resolve(_0x2ef10f,_0x3818f8);const _0x4a5edd=lstatIfPresent(_0x2ef10f);if(_0x4a5edd?.[_0x2d9fbc(0x208)]())throw CliErrors[_0x2d9fbc(0x204)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x45464d);}}export function isDanglingSymlink(_0x1c2b15){try{return lstatSync(_0x1c2b15)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x48c690){const _0x53fa7b=readlinkSync(_0x48c690);return isAbsolute(_0x53fa7b)?_0x53fa7b:resolve(dirname(_0x48c690),_0x53fa7b);}function a97_0x12af(_0x15cb23,_0xf264d4){_0x15cb23=_0x15cb23-0x1f4;const _0x47980b=a97_0x4798();let _0x12af36=_0x47980b[_0x15cb23];return _0x12af36;}function a97_0x4798(){const _0x3bead1=['endsWith','1114HNRvEZ','225drYSez','Unsafe\x20Skill\x20file\x20path:\x20','5138329XfCohC','592Nkabxa','validation','12ihoKqk','368775kTCQcd','4QzHFqn','isSymbolicLink','2855809LmnEDZ','8JsFZLK','2834795MHiXZL','.tmp','split','from','15230jMrTRx','stringify','1942836BKLpur','utf8'];a97_0x4798=function(){return _0x3bead1;};return a97_0x4798();}export function isPathInside(_0x453d5e,_0x51b6b6){const _0x22efad=a97_0x12af,_0x479010=_0x453d5e[_0x22efad(0x1fe)](sep)?_0x453d5e:''+_0x453d5e+sep,_0x5228f5=_0x51b6b6[_0x22efad(0x1fe)](sep)?_0x51b6b6:''+_0x51b6b6+sep;return _0x453d5e===_0x51b6b6||_0x479010['startsWith'](_0x5228f5);}export function realOrResolved(_0xdd1e2a){try{return realpathSync(_0xdd1e2a);}catch{return resolve(_0xdd1e2a);}}export function lstatIfPresent(_0xe36c8e){try{return lstatSync(_0xe36c8e);}catch{return undefined;}}export function writeTextAtomic(_0x5e8888,_0x1599ee,_0x57e2f0){const _0x22671f=a97_0x12af;writeBytesAtomic(_0x5e8888,Buffer[_0x22671f(0x1f9)](_0x1599ee,_0x22671f(0x1fd)),_0x57e2f0);}export function writeBytesAtomic(_0x228ce8,_0x16fee6,_0x34296b){const _0x256980=a97_0x12af,_0x33a593=_0x228ce8+_0x256980(0x1f7);try{writeFileSync(_0x33a593,_0x16fee6,{'mode':_0x34296b}),renameSync(_0x33a593,_0x228ce8);}catch(_0x16e7f5){try{rmSync(_0x33a593,{'force':!![]});}catch{}throw _0x16e7f5;}}export function writeJsonAtomic(_0x5cfbb2,_0x38274c){const _0x326a79=a97_0x12af;writeTextAtomic(_0x5cfbb2,JSON[_0x326a79(0x1fb)](_0x38274c,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x52b16d,_0x1607f7){const _0x3c0d6d=a98_0x5e43,_0x4f403a=_0x52b16d();while(!![]){try{const _0x406eb7=parseInt(_0x3c0d6d(0x97))/0x1*(parseInt(_0x3c0d6d(0x8d))/0x2)+parseInt(_0x3c0d6d(0x89))/0x3+-parseInt(_0x3c0d6d(0x91))/0x4*(parseInt(_0x3c0d6d(0x86))/0x5)+parseInt(_0x3c0d6d(0x8a))/0x6+parseInt(_0x3c0d6d(0x88))/0x7+parseInt(_0x3c0d6d(0x90))/0x8*(parseInt(_0x3c0d6d(0x8c))/0x9)+-parseInt(_0x3c0d6d(0x87))/0xa;if(_0x406eb7===_0x1607f7)break;else _0x4f403a['push'](_0x4f403a['shift']());}catch(_0x300758){_0x4f403a['push'](_0x4f403a['shift']());}}}(a98_0x3c77,0xe2fb2));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x4546b3,_0x4753db){const _0x1d960e=a98_0x5e43,_0x5b6196=normalizeSkillRelativePath(_0x4753db),_0xbbd338=realOrResolved(_0x4546b3),_0x24ee87=resolve(_0xbbd338,..._0x5b6196[_0x1d960e(0x96)]('/'));if(!isPathInside(_0x24ee87,_0xbbd338))throw CliErrors[_0x1d960e(0x93)](_0x1d960e(0x92)+_0x4753db);return ensureNoSymlinkInManagedPath(_0xbbd338,_0x5b6196),_0x24ee87;}export function ensureNoSymlinkInManagedPath(_0x20d798,_0x4a27e0){const _0x425b01=a98_0x5e43;let _0x85c359=_0x20d798;for(const _0x1018aa of _0x4a27e0[_0x425b01(0x96)]('/')){_0x85c359=resolve(_0x85c359,_0x1018aa);const _0x2aff98=lstatIfPresent(_0x85c359);if(_0x2aff98?.['isSymbolicLink']())throw CliErrors[_0x425b01(0x93)](_0x425b01(0x85)+_0x4a27e0);}}export function isDanglingSymlink(_0x3c8673){const _0x4667cc=a98_0x5e43;try{return lstatSync(_0x3c8673)[_0x4667cc(0x8f)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4eb586){const _0x5d6368=readlinkSync(_0x4eb586);return isAbsolute(_0x5d6368)?_0x5d6368:resolve(dirname(_0x4eb586),_0x5d6368);}export function isPathInside(_0x4bcb30,_0x2d40c6){const _0xb0bbac=a98_0x5e43,_0x499f11=_0x4bcb30['endsWith'](sep)?_0x4bcb30:''+_0x4bcb30+sep,_0x5d074e=_0x2d40c6[_0xb0bbac(0x95)](sep)?_0x2d40c6:''+_0x2d40c6+sep;return _0x4bcb30===_0x2d40c6||_0x499f11[_0xb0bbac(0x94)](_0x5d074e);}export function realOrResolved(_0x3d1219){try{return realpathSync(_0x3d1219);}catch{return resolve(_0x3d1219);}}function a98_0x5e43(_0x32a581,_0x447748){_0x32a581=_0x32a581-0x85;const _0x3c7782=a98_0x3c77();let _0x5e4322=_0x3c7782[_0x32a581];return _0x5e4322;}export function lstatIfPresent(_0x14ff5f){try{return lstatSync(_0x14ff5f);}catch{return undefined;}}export function writeTextAtomic(_0x6d4b57,_0x29e07a,_0x320684){const _0x3e86fd=a98_0x5e43;writeBytesAtomic(_0x6d4b57,Buffer['from'](_0x29e07a,_0x3e86fd(0x8b)),_0x320684);}function a98_0x3c77(){const _0x2ba696=['9732430kdcHpH','3186449ovtmom','3775944iYBLvO','4608282Vrddqs','utf8','54ySCvqj','244794BihuPY','stringify','isSymbolicLink','457184FAJfmb','308mbZSyY','Unsafe\x20Skill\x20file\x20path:\x20','validation','startsWith','endsWith','split','2bQTIZu','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','75755ISiwyd'];a98_0x3c77=function(){return _0x2ba696;};return a98_0x3c77();}export function writeBytesAtomic(_0x53f2c2,_0x582583,_0x5065c1){const _0x57732a=_0x53f2c2+'.tmp';try{writeFileSync(_0x57732a,_0x582583,{'mode':_0x5065c1}),renameSync(_0x57732a,_0x53f2c2);}catch(_0x2b4838){try{rmSync(_0x57732a,{'force':!![]});}catch{}throw _0x2b4838;}}export function writeJsonAtomic(_0x3ce958,_0xa09f33){const _0x354352=a98_0x5e43;writeTextAtomic(_0x3ce958,JSON[_0x354352(0x8e)](_0xa09f33,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- function a98_0x2541(){const _0x514378=['digest','hex','153WqFfCS','1905043WyCmjo','322232DBavAi','2275240ccRkkx','8nuUUPi','193758kybPSa','850890RjLeDU','863088XPwMoO','update','size','sha256','1578012vmdIAV','7CvtZiF'];a98_0x2541=function(){return _0x514378;};return a98_0x2541();}(function(_0x29f891,_0x5da1f7){const _0x305256=a98_0x582e,_0x569bfd=_0x29f891();while(!![]){try{const _0x38b919=parseInt(_0x305256(0xf9))/0x1*(parseInt(_0x305256(0xf2))/0x2)+parseInt(_0x305256(0xf4))/0x3+parseInt(_0x305256(0xf1))/0x4*(parseInt(_0x305256(0xf3))/0x5)+-parseInt(_0x305256(0xf8))/0x6+parseInt(_0x305256(0xfd))/0x7+-parseInt(_0x305256(0xfe))/0x8*(parseInt(_0x305256(0xfc))/0x9)+-parseInt(_0x305256(0xff))/0xa;if(_0x38b919===_0x5da1f7)break;else _0x569bfd['push'](_0x569bfd['shift']());}catch(_0x61e209){_0x569bfd['push'](_0x569bfd['shift']());}}}(a98_0x2541,0x6268d));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a98_0x582e(_0xf384b4,_0x4c2170){_0xf384b4=_0xf384b4-0xf1;const _0x2541e1=a98_0x2541();let _0x582e4b=_0x2541e1[_0xf384b4];return _0x582e4b;}export function contentHash(_0x2ca9ef){const _0x18abf3=a98_0x582e;return createHash(_0x18abf3(0xf7))[_0x18abf3(0xf5)](_0x2ca9ef)[_0x18abf3(0xfa)](_0x18abf3(0xfb));}export function fileHash(_0x89ebc2){return bufferSha256(fileContent(_0x89ebc2));}export function bufferSha256(_0x247eae){const _0x47c720=a98_0x582e;return createHash(_0x47c720(0xf7))[_0x47c720(0xf5)](_0x247eae)['digest']('hex');}export function fileTreeHash(_0x195d32){const _0x2e0f24=a98_0x582e,_0x90dac1=createHash(_0x2e0f24(0xf7));for(const _0x370159 of normalizeManifestFiles(_0x195d32)){_0x90dac1['update'](_0x370159['path']),_0x90dac1['update']('\x00'),_0x90dac1[_0x2e0f24(0xf5)](_0x370159['sha256']),_0x90dac1[_0x2e0f24(0xf5)]('\x00'),_0x90dac1[_0x2e0f24(0xf5)](String(_0x370159[_0x2e0f24(0xf6)])),_0x90dac1[_0x2e0f24(0xf5)]('\x00');}return _0x90dac1[_0x2e0f24(0xfa)](_0x2e0f24(0xfb));}
1
+ (function(_0xfa08d3,_0x352c81){const _0x499e50=a99_0x4727,_0x3ab6bc=_0xfa08d3();while(!![]){try{const _0xdecc1f=parseInt(_0x499e50(0x9f))/0x1*(parseInt(_0x499e50(0xa9))/0x2)+-parseInt(_0x499e50(0xaa))/0x3+-parseInt(_0x499e50(0xa3))/0x4+-parseInt(_0x499e50(0xab))/0x5+parseInt(_0x499e50(0xa7))/0x6*(parseInt(_0x499e50(0xa2))/0x7)+parseInt(_0x499e50(0xa0))/0x8+parseInt(_0x499e50(0xa5))/0x9*(parseInt(_0x499e50(0xa8))/0xa);if(_0xdecc1f===_0x352c81)break;else _0x3ab6bc['push'](_0x3ab6bc['shift']());}catch(_0x499837){_0x3ab6bc['push'](_0x3ab6bc['shift']());}}}(a99_0x5023,0xa5a99));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x2eeb5c){const _0x31cd86=a99_0x4727;return createHash(_0x31cd86(0xa1))[_0x31cd86(0xad)](_0x2eeb5c)['digest'](_0x31cd86(0xac));}function a99_0x4727(_0x4030d1,_0x2cadf5){_0x4030d1=_0x4030d1-0x9f;const _0x50237a=a99_0x5023();let _0x472734=_0x50237a[_0x4030d1];return _0x472734;}export function fileHash(_0x10faa5){return bufferSha256(fileContent(_0x10faa5));}export function bufferSha256(_0x503512){const _0x17f99f=a99_0x4727;return createHash(_0x17f99f(0xa1))[_0x17f99f(0xad)](_0x503512)[_0x17f99f(0xa6)](_0x17f99f(0xac));}function a99_0x5023(){const _0x56ed0a=['5576712QLfwjE','sha256','3446023QwJKsh','553660ZGKwlj','size','1905129bASCQD','digest','12nmbXge','30IypAAf','219540NSTvDZ','3955428OmZbqp','4748280UhzBEY','hex','update','7mIGmTS'];a99_0x5023=function(){return _0x56ed0a;};return a99_0x5023();}export function fileTreeHash(_0x5e4123){const _0x1e03e2=a99_0x4727,_0x289b74=createHash(_0x1e03e2(0xa1));for(const _0x4d6a3d of normalizeManifestFiles(_0x5e4123)){_0x289b74['update'](_0x4d6a3d['path']),_0x289b74[_0x1e03e2(0xad)]('\x00'),_0x289b74[_0x1e03e2(0xad)](_0x4d6a3d[_0x1e03e2(0xa1)]),_0x289b74[_0x1e03e2(0xad)]('\x00'),_0x289b74[_0x1e03e2(0xad)](String(_0x4d6a3d[_0x1e03e2(0xa4)])),_0x289b74[_0x1e03e2(0xad)]('\x00');}return _0x289b74[_0x1e03e2(0xa6)](_0x1e03e2(0xac));}
@@ -1 +1 @@
1
- (function(_0x457f47,_0xd52e52){const _0x1209eb=a99_0x1462,_0x47b5f6=_0x457f47();while(!![]){try{const _0x44ec8e=-parseInt(_0x1209eb(0x1a3))/0x1+parseInt(_0x1209eb(0x1b1))/0x2*(-parseInt(_0x1209eb(0x196))/0x3)+-parseInt(_0x1209eb(0x1ae))/0x4+-parseInt(_0x1209eb(0x18f))/0x5+-parseInt(_0x1209eb(0x1ab))/0x6+parseInt(_0x1209eb(0x1af))/0x7*(parseInt(_0x1209eb(0x193))/0x8)+parseInt(_0x1209eb(0x192))/0x9*(parseInt(_0x1209eb(0x199))/0xa);if(_0x44ec8e===_0xd52e52)break;else _0x47b5f6['push'](_0x47b5f6['shift']());}catch(_0x14cef6){_0x47b5f6['push'](_0x47b5f6['shift']());}}}(a99_0x440d,0xe13b6));function a99_0x440d(){const _0x178bf5=['values','9808914KyFsck','scope','appCode','288996fzicGf','357hzIItU','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','2328eXNsnm','skill','managedRoot','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','personal','scopes','name','isSymbolicLink','contentHash','validation','2222900qiVnZE','filter','slice','9QxTGJw','169528Mzjott','length','skillCode','177pKKFJF','trim','updated','21764230RpGFqO','metadata-mismatch','created','external-symlink','dir','map','isDirectory','company','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','agentsSkillsDir','114290vBQyWQ','builtin','skipped','has','get','unchanged','push'];a99_0x440d=function(){return _0x178bf5;};return a99_0x440d();}import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a99_0x52dc5f 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}=a99_0x52dc5f;export function linkEffectiveRuntimeSkills(_0x17c11c,_0x36fd1f,_0x3529ed={}){const _0x1e33cf=a99_0x1462,_0x2d99d0=new Map();for(const _0x316957 of _0x17c11c){const _0x4778b2=_0x316957['skill']['skillCode'];if(!_0x4778b2)continue;const _0x348d51=_0x2d99d0[_0x1e33cf(0x1a7)](_0x4778b2);(!_0x348d51||_0x316957[_0x1e33cf(0x1ac)]===_0x1e33cf(0x1b6))&&_0x2d99d0['set'](_0x4778b2,_0x316957);}const _0x1a7054=[],_0x1afed9=resolveSkillSyncPaths(_0x3529ed);for(const _0x51d278 of _0x2d99d0[_0x1e33cf(0x1aa)]()){const _0x4d8eff=requireSkillCode(_0x51d278[_0x1e33cf(0x1b2)]),_0x48bb52=_0x36fd1f+'--'+_0x4d8eff;for(const _0x25f91a of runtimeAgentSkillRoots(_0x1afed9)){_0x1a7054[_0x1e33cf(0x1a9)](ensureManagedSymlink(resolve(_0x25f91a,_0x48bb52),_0x51d278[_0x1e33cf(0x19d)],_0x1afed9[_0x1e33cf(0x1b3)]));}}return _0x1a7054;}export function pruneStaleRuntimeSkillLinks(_0x42402c,_0x5c93f4,_0x5cda20={},_0x397170){const _0x39deac=a99_0x1462,_0x3fbc7b=resolveSkillSyncPaths(_0x5cda20),_0x400e27=new Set([..._0x5c93f4][_0x39deac(0x19e)](_0x532e0e=>_0x532e0e[_0x39deac(0x197)]())[_0x39deac(0x190)](Boolean)),_0x1bf00d=_0x397170?new Set([..._0x397170][_0x39deac(0x19e)](_0x2cdf06=>_0x2cdf06[_0x39deac(0x197)]())['filter'](Boolean)):undefined,_0xf36cd=[];for(const _0x2508c9 of runtimeAgentSkillRoots(_0x3fbc7b)){for(const _0x5cc790 of managedAppSkillLinkPaths(_0x2508c9,_0x42402c)){const _0x5f2824=basename(_0x5cc790)[_0x39deac(0x191)]((_0x42402c+'--')[_0x39deac(0x194)]);if(_0x1bf00d&&!_0x1bf00d[_0x39deac(0x1a6)](_0x5f2824))continue;if(_0x400e27['has'](_0x5f2824))continue;_0xf36cd[_0x39deac(0x1a9)](removeManagedSkillLink(_0x5cc790,_0x3fbc7b[_0x39deac(0x1b3)]));}}return _0xf36cd;}export function pruneStaleRuntimeSkillCache(_0xc5a8c7,_0x251608={}){const _0x452581=a99_0x1462,_0x59621d=new Set([..._0xc5a8c7['activeSkillCodes']][_0x452581(0x19e)](_0x5aa6ac=>_0x5aa6ac[_0x452581(0x197)]())[_0x452581(0x190)](Boolean)),_0x4fddb2=_0xc5a8c7['pruneSkillCodes']?new Set([..._0xc5a8c7['pruneSkillCodes']][_0x452581(0x19e)](_0x996419=>_0x996419[_0x452581(0x197)]())[_0x452581(0x190)](Boolean)):undefined,_0x45eb80=_0xc5a8c7[_0x452581(0x1b7)]??['personal',_0x452581(0x1a0)],_0x8776e0=resolve(getRuntimeSkillCacheRoot(_0xc5a8c7['env'],_0xc5a8c7['accessKey'],_0x251608),safePathSegment(_0xc5a8c7[_0x452581(0x1ad)],_0x452581(0x1ad))),_0x4c0aaa=[];for(const _0x1ed791 of _0x45eb80){const _0x2204a1=resolve(_0x8776e0,_0x1ed791);if(!existsSync(_0x2204a1))continue;for(const _0x36ba6e of readdirSync(_0x2204a1,{'withFileTypes':!![]})){if(!_0x36ba6e[_0x452581(0x19f)]())continue;const _0x2e219d=_0x36ba6e[_0x452581(0x1b8)];if(_0x4fddb2&&!_0x4fddb2[_0x452581(0x1a6)](_0x2e219d))continue;if(_0x59621d[_0x452581(0x1a6)](_0x2e219d))continue;const _0x3d0998=resolve(_0x2204a1,_0x2e219d),_0x5088d8=readMetadataIfPresent(resolve(_0x3d0998,METADATA_FILE));if(_0x5088d8?.[_0x452581(0x1ad)]!==_0xc5a8c7['appCode']||_0x5088d8[_0x452581(0x1ac)]!==_0x1ed791||_0x5088d8[_0x452581(0x195)]!==_0x2e219d){_0x4c0aaa['push']({'path':_0x3d0998,'action':_0x452581(0x1a5),'reason':_0x452581(0x19a)});continue;}removeSync(_0x3d0998),_0x4c0aaa[_0x452581(0x1a9)]({'path':_0x3d0998,'action':_0x452581(0x1b4)});}}return _0x4c0aaa;}export function linkGlobalRuntimeSkills(_0xa21b30,_0x29d21c={}){const _0x2a052b=a99_0x1462,_0x32f30b=resolveSkillSyncPaths(_0x29d21c),_0x48174c=[];for(const _0x4396c3 of _0xa21b30){if(_0x4396c3[_0x2a052b(0x1ac)]!==_0x2a052b(0x1a4))throw CliErrors[_0x2a052b(0x18e)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x4396c3['scope']);const _0x31f6d8=requireSkillCode(_0x4396c3[_0x2a052b(0x1b2)]),_0xbfcbd8=copyManagedSkillDirectory(_0x4396c3[_0x2a052b(0x19d)],resolve(_0x32f30b[_0x2a052b(0x1a2)],_0x31f6d8));_0x48174c['push']({..._0xbfcbd8,'contentHash':_0x4396c3[_0x2a052b(0x18d)]});}return _0x48174c;}function ensureManagedSymlink(_0x41de2d,_0x5ed4e0,_0x18b877){const _0x3fb1c3=a99_0x1462;mkdirSync(dirname(_0x41de2d),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x41de2d)||isDanglingSymlink(_0x41de2d)){const _0x159cd2=lstatSync(_0x41de2d);if(!_0x159cd2[_0x3fb1c3(0x1b9)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x41de2d);const _0x2f3aa9=resolveSymlinkTarget(_0x41de2d);if(!isPathInside(realOrResolved(_0x2f3aa9),realOrResolved(_0x18b877)))throw CliErrors[_0x3fb1c3(0x18e)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x41de2d);if(realOrResolved(_0x2f3aa9)===realOrResolved(_0x5ed4e0))return{'path':_0x41de2d,'target':_0x5ed4e0,'action':_0x3fb1c3(0x1a8)};return unlinkSync(_0x41de2d),symlinkSync(_0x5ed4e0,_0x41de2d,_0x3fb1c3(0x19d)),{'path':_0x41de2d,'target':_0x5ed4e0,'action':_0x3fb1c3(0x198)};}return symlinkSync(_0x5ed4e0,_0x41de2d,_0x3fb1c3(0x19d)),{'path':_0x41de2d,'target':_0x5ed4e0,'action':'created'};}function managedAppSkillLinkPaths(_0x2671ae,_0x5b40de){const _0x5517a4=a99_0x1462;if(!existsSync(_0x2671ae))return[];const _0x34021b=_0x5b40de+'--';return readdirSync(_0x2671ae,{'withFileTypes':!![]})['filter'](_0x3517a1=>_0x3517a1[_0x5517a4(0x1b8)]['startsWith'](_0x34021b))[_0x5517a4(0x19e)](_0x5e8be1=>resolve(_0x2671ae,_0x5e8be1['name']));}function removeManagedSkillLink(_0x4c8812,_0x12140b){const _0x41c3fe=a99_0x1462,_0x5ea09a=lstatIfPresent(_0x4c8812);if(!_0x5ea09a?.['isSymbolicLink']())return{'path':_0x4c8812,'action':_0x41c3fe(0x1a5),'reason':'not-managed-symlink'};const _0x3f8f9d=resolveSymlinkTarget(_0x4c8812);if(!isPathInside(realOrResolved(_0x3f8f9d),realOrResolved(_0x12140b)))return{'path':_0x4c8812,'action':_0x41c3fe(0x1a5),'reason':_0x41c3fe(0x19c)};return unlinkSync(_0x4c8812),{'path':_0x4c8812,'action':_0x41c3fe(0x1b4)};}function a99_0x1462(_0x119b5a,_0x3abc60){_0x119b5a=_0x119b5a-0x18d;const _0x440dee=a99_0x440d();let _0x1462ec=_0x440dee[_0x119b5a];return _0x1462ec;}export function copyManagedSkillDirectory(_0x4e1323,_0x43effe){const _0x44ac90=a99_0x1462,_0x54cd60=resolve(_0x43effe,METADATA_FILE),_0x1c1e6d=existsSync(_0x43effe);if(_0x1c1e6d){const _0x284b93=lstatSync(_0x43effe);if(_0x284b93['isSymbolicLink']())throw CliErrors[_0x44ac90(0x18e)](_0x44ac90(0x1b0)+_0x43effe);if(!_0x284b93[_0x44ac90(0x19f)]())throw CliErrors['validation'](_0x44ac90(0x1b5)+_0x43effe);const _0x21f223=readMetadataIfPresent(_0x54cd60);if(_0x21f223?.[_0x44ac90(0x1ac)]!=='builtin')throw CliErrors[_0x44ac90(0x18e)](_0x44ac90(0x1a1)+_0x43effe);}ensureDirSync(dirname(_0x43effe));const _0x2ad27e=_0x1c1e6d?readMetadataIfPresent(_0x54cd60)?.['contentHash']:undefined,_0x3b6246=readMetadataIfPresent(resolve(_0x4e1323,METADATA_FILE))?.[_0x44ac90(0x18d)];return _0x1c1e6d&&removeSync(_0x43effe),copySkillDirectory(_0x4e1323,_0x43effe),{'path':_0x43effe,'target':_0x4e1323,'action':!_0x1c1e6d?_0x44ac90(0x19b):_0x2ad27e===_0x3b6246?_0x44ac90(0x1a8):_0x44ac90(0x198)};}function copySkillDirectory(_0x1714c1,_0x18f58e){copySync(_0x1714c1,_0x18f58e,{'dereference':![],'overwrite':!![],'filter'(_0x207af4){const _0x33bc34=a99_0x1462;if(lstatSync(_0x207af4)['isSymbolicLink']())throw CliErrors[_0x33bc34(0x18e)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x207af4);return!![];}});}
1
+ (function(_0x259875,_0x423947){const _0x328f43=a100_0x3171,_0x4252ef=_0x259875();while(!![]){try{const _0x50e94a=-parseInt(_0x328f43(0x193))/0x1+-parseInt(_0x328f43(0x194))/0x2*(parseInt(_0x328f43(0x196))/0x3)+-parseInt(_0x328f43(0x1ae))/0x4*(-parseInt(_0x328f43(0x190))/0x5)+parseInt(_0x328f43(0x186))/0x6+parseInt(_0x328f43(0x182))/0x7*(-parseInt(_0x328f43(0x198))/0x8)+parseInt(_0x328f43(0x192))/0x9*(parseInt(_0x328f43(0x18c))/0xa)+-parseInt(_0x328f43(0x1ad))/0xb;if(_0x50e94a===_0x423947)break;else _0x4252ef['push'](_0x4252ef['shift']());}catch(_0x854212){_0x4252ef['push'](_0x4252ef['shift']());}}}(a100_0x1368,0x7c020));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';function a100_0x3171(_0x3f9acd,_0x5d9ae6){_0x3f9acd=_0x3f9acd-0x17c;const _0x136855=a100_0x1368();let _0x317130=_0x136855[_0x3f9acd];return _0x317130;}import a100_0x3296ae from'fs-extra';function a100_0x1368(){const _0x41f0ab=['created','unchanged','isDirectory','7419841tCfhlV','7748YejLme','startsWith','env','name','external-symlink','builtin','has','98bEgkxd','values','managedRoot','contentHash','5385384gZSGmI','pruneSkillCodes','appCode','validation','scope','removed','65290FZMSlR','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','get','slice','2095MejAtf','skipped','738SjLGeI','27547LxJuEO','6gCBegb','skillCode','395949cHemGH','company','364904wlgoDj','map','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','dir','agentsSkillsDir','updated','accessKey','not-managed-symlink','activeSkillCodes','trim','scopes','skill','personal','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','filter','push','isSymbolicLink','set'];a100_0x1368=function(){return _0x41f0ab;};return a100_0x1368();}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}=a100_0x3296ae;export function linkEffectiveRuntimeSkills(_0x3b4c1f,_0x5eb8c5,_0x16f5d3={}){const _0x1f324e=a100_0x3171,_0x4c4aaa=new Map();for(const _0x1e5774 of _0x3b4c1f){const _0x4fa1c0=_0x1e5774[_0x1f324e(0x1a3)][_0x1f324e(0x195)];if(!_0x4fa1c0)continue;const _0x2bf92e=_0x4c4aaa[_0x1f324e(0x18e)](_0x4fa1c0);(!_0x2bf92e||_0x1e5774[_0x1f324e(0x18a)]===_0x1f324e(0x1a4))&&_0x4c4aaa[_0x1f324e(0x1a9)](_0x4fa1c0,_0x1e5774);}const _0xd10288=[],_0x1c0a25=resolveSkillSyncPaths(_0x16f5d3);for(const _0x2c0ad3 of _0x4c4aaa[_0x1f324e(0x183)]()){const _0x1d6bd1=requireSkillCode(_0x2c0ad3[_0x1f324e(0x1a3)]),_0x5c2d49=_0x5eb8c5+'--'+_0x1d6bd1;for(const _0x17d4b2 of runtimeAgentSkillRoots(_0x1c0a25)){_0xd10288[_0x1f324e(0x1a7)](ensureManagedSymlink(resolve(_0x17d4b2,_0x5c2d49),_0x2c0ad3[_0x1f324e(0x19b)],_0x1c0a25[_0x1f324e(0x184)]));}}return _0xd10288;}export function pruneStaleRuntimeSkillLinks(_0x50f87d,_0x1cffa7,_0x1c00b6={},_0x40bcc3){const _0x2d9f58=a100_0x3171,_0x58ff06=resolveSkillSyncPaths(_0x1c00b6),_0x2e0297=new Set([..._0x1cffa7][_0x2d9f58(0x199)](_0x40ebb3=>_0x40ebb3[_0x2d9f58(0x1a1)]())[_0x2d9f58(0x1a6)](Boolean)),_0x2f3b6e=_0x40bcc3?new Set([..._0x40bcc3][_0x2d9f58(0x199)](_0x2b8d6f=>_0x2b8d6f[_0x2d9f58(0x1a1)]())[_0x2d9f58(0x1a6)](Boolean)):undefined,_0x6d4ef=[];for(const _0x2fe674 of runtimeAgentSkillRoots(_0x58ff06)){for(const _0x1c4ee8 of managedAppSkillLinkPaths(_0x2fe674,_0x50f87d)){const _0x2e04de=basename(_0x1c4ee8)[_0x2d9f58(0x18f)]((_0x50f87d+'--')['length']);if(_0x2f3b6e&&!_0x2f3b6e[_0x2d9f58(0x181)](_0x2e04de))continue;if(_0x2e0297[_0x2d9f58(0x181)](_0x2e04de))continue;_0x6d4ef[_0x2d9f58(0x1a7)](removeManagedSkillLink(_0x1c4ee8,_0x58ff06[_0x2d9f58(0x184)]));}}return _0x6d4ef;}export function pruneStaleRuntimeSkillCache(_0x192c7d,_0x35c324={}){const _0x1d28f8=a100_0x3171,_0x4b92d0=new Set([..._0x192c7d[_0x1d28f8(0x1a0)]]['map'](_0x5ad9d4=>_0x5ad9d4[_0x1d28f8(0x1a1)]())[_0x1d28f8(0x1a6)](Boolean)),_0xa1e784=_0x192c7d[_0x1d28f8(0x187)]?new Set([..._0x192c7d[_0x1d28f8(0x187)]][_0x1d28f8(0x199)](_0xf0fcdb=>_0xf0fcdb[_0x1d28f8(0x1a1)]())[_0x1d28f8(0x1a6)](Boolean)):undefined,_0x106d19=_0x192c7d[_0x1d28f8(0x1a2)]??[_0x1d28f8(0x1a4),_0x1d28f8(0x197)],_0x491305=resolve(getRuntimeSkillCacheRoot(_0x192c7d[_0x1d28f8(0x17d)],_0x192c7d[_0x1d28f8(0x19e)],_0x35c324),safePathSegment(_0x192c7d[_0x1d28f8(0x188)],'appCode')),_0x203dce=[];for(const _0x479403 of _0x106d19){const _0x2abc01=resolve(_0x491305,_0x479403);if(!existsSync(_0x2abc01))continue;for(const _0x2e446b of readdirSync(_0x2abc01,{'withFileTypes':!![]})){if(!_0x2e446b['isDirectory']())continue;const _0x5e3f73=_0x2e446b[_0x1d28f8(0x17e)];if(_0xa1e784&&!_0xa1e784[_0x1d28f8(0x181)](_0x5e3f73))continue;if(_0x4b92d0[_0x1d28f8(0x181)](_0x5e3f73))continue;const _0x4c8f9d=resolve(_0x2abc01,_0x5e3f73),_0x18dc0b=readMetadataIfPresent(resolve(_0x4c8f9d,METADATA_FILE));if(_0x18dc0b?.[_0x1d28f8(0x188)]!==_0x192c7d[_0x1d28f8(0x188)]||_0x18dc0b[_0x1d28f8(0x18a)]!==_0x479403||_0x18dc0b[_0x1d28f8(0x195)]!==_0x5e3f73){_0x203dce[_0x1d28f8(0x1a7)]({'path':_0x4c8f9d,'action':_0x1d28f8(0x191),'reason':'metadata-mismatch'});continue;}removeSync(_0x4c8f9d),_0x203dce[_0x1d28f8(0x1a7)]({'path':_0x4c8f9d,'action':_0x1d28f8(0x18b)});}}return _0x203dce;}export function linkGlobalRuntimeSkills(_0x5bd698,_0x6c2bd4={}){const _0x1d6258=a100_0x3171,_0x3db4b5=resolveSkillSyncPaths(_0x6c2bd4),_0x4e3853=[];for(const _0x205631 of _0x5bd698){if(_0x205631[_0x1d6258(0x18a)]!==_0x1d6258(0x180))throw CliErrors['validation']('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x205631[_0x1d6258(0x18a)]);const _0x3f4c1d=requireSkillCode(_0x205631[_0x1d6258(0x1a3)]),_0x4314cb=copyManagedSkillDirectory(_0x205631[_0x1d6258(0x19b)],resolve(_0x3db4b5[_0x1d6258(0x19c)],_0x3f4c1d));_0x4e3853['push']({..._0x4314cb,'contentHash':_0x205631[_0x1d6258(0x185)]});}return _0x4e3853;}function ensureManagedSymlink(_0x5b59ca,_0x6c62c4,_0x587b95){const _0x3a3973=a100_0x3171;mkdirSync(dirname(_0x5b59ca),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5b59ca)||isDanglingSymlink(_0x5b59ca)){const _0x26d4b0=lstatSync(_0x5b59ca);if(!_0x26d4b0['isSymbolicLink']())throw CliErrors[_0x3a3973(0x189)](_0x3a3973(0x18d)+_0x5b59ca);const _0x104003=resolveSymlinkTarget(_0x5b59ca);if(!isPathInside(realOrResolved(_0x104003),realOrResolved(_0x587b95)))throw CliErrors[_0x3a3973(0x189)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x5b59ca);if(realOrResolved(_0x104003)===realOrResolved(_0x6c62c4))return{'path':_0x5b59ca,'target':_0x6c62c4,'action':_0x3a3973(0x1ab)};return unlinkSync(_0x5b59ca),symlinkSync(_0x6c62c4,_0x5b59ca,_0x3a3973(0x19b)),{'path':_0x5b59ca,'target':_0x6c62c4,'action':'updated'};}return symlinkSync(_0x6c62c4,_0x5b59ca,'dir'),{'path':_0x5b59ca,'target':_0x6c62c4,'action':_0x3a3973(0x1aa)};}function managedAppSkillLinkPaths(_0x553bf3,_0x59113e){const _0x1f1c0c=a100_0x3171;if(!existsSync(_0x553bf3))return[];const _0x38ae22=_0x59113e+'--';return readdirSync(_0x553bf3,{'withFileTypes':!![]})['filter'](_0x43c63a=>_0x43c63a[_0x1f1c0c(0x17e)][_0x1f1c0c(0x17c)](_0x38ae22))[_0x1f1c0c(0x199)](_0x4c1263=>resolve(_0x553bf3,_0x4c1263[_0x1f1c0c(0x17e)]));}function removeManagedSkillLink(_0x537f44,_0x3dee16){const _0x4e4f5c=a100_0x3171,_0x15fb44=lstatIfPresent(_0x537f44);if(!_0x15fb44?.[_0x4e4f5c(0x1a8)]())return{'path':_0x537f44,'action':_0x4e4f5c(0x191),'reason':_0x4e4f5c(0x19f)};const _0x587a50=resolveSymlinkTarget(_0x537f44);if(!isPathInside(realOrResolved(_0x587a50),realOrResolved(_0x3dee16)))return{'path':_0x537f44,'action':_0x4e4f5c(0x191),'reason':_0x4e4f5c(0x17f)};return unlinkSync(_0x537f44),{'path':_0x537f44,'action':_0x4e4f5c(0x18b)};}export function copyManagedSkillDirectory(_0x7a2568,_0x300a8a){const _0xbe7060=a100_0x3171,_0x42db71=resolve(_0x300a8a,METADATA_FILE),_0x2cb3a8=existsSync(_0x300a8a);if(_0x2cb3a8){const _0x4b26e2=lstatSync(_0x300a8a);if(_0x4b26e2[_0xbe7060(0x1a8)]())throw CliErrors['validation'](_0xbe7060(0x1a5)+_0x300a8a);if(!_0x4b26e2[_0xbe7060(0x1ac)]())throw CliErrors[_0xbe7060(0x189)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x300a8a);const _0x2d55c0=readMetadataIfPresent(_0x42db71);if(_0x2d55c0?.[_0xbe7060(0x18a)]!==_0xbe7060(0x180))throw CliErrors[_0xbe7060(0x189)](_0xbe7060(0x19a)+_0x300a8a);}ensureDirSync(dirname(_0x300a8a));const _0x32e04f=_0x2cb3a8?readMetadataIfPresent(_0x42db71)?.[_0xbe7060(0x185)]:undefined,_0x415ebe=readMetadataIfPresent(resolve(_0x7a2568,METADATA_FILE))?.[_0xbe7060(0x185)];return _0x2cb3a8&&removeSync(_0x300a8a),copySkillDirectory(_0x7a2568,_0x300a8a),{'path':_0x300a8a,'target':_0x7a2568,'action':!_0x2cb3a8?_0xbe7060(0x1aa):_0x32e04f===_0x415ebe?_0xbe7060(0x1ab):_0xbe7060(0x19d)};}function copySkillDirectory(_0x4b59ef,_0x1c3614){copySync(_0x4b59ef,_0x1c3614,{'dereference':![],'overwrite':!![],'filter'(_0x145b56){if(lstatSync(_0x145b56)['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x145b56);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x52afaf,_0x5a52b0){const _0x3ae3df=a100_0x5ef6,_0x539ba0=_0x52afaf();while(!![]){try{const _0x147f07=parseInt(_0x3ae3df(0xc7))/0x1+-parseInt(_0x3ae3df(0xeb))/0x2*(-parseInt(_0x3ae3df(0xf1))/0x3)+-parseInt(_0x3ae3df(0xda))/0x4*(parseInt(_0x3ae3df(0xd4))/0x5)+-parseInt(_0x3ae3df(0xe9))/0x6*(parseInt(_0x3ae3df(0xe1))/0x7)+-parseInt(_0x3ae3df(0xd5))/0x8*(-parseInt(_0x3ae3df(0xdc))/0x9)+parseInt(_0x3ae3df(0xf3))/0xa*(parseInt(_0x3ae3df(0xca))/0xb)+-parseInt(_0x3ae3df(0xdd))/0xc;if(_0x147f07===_0x5a52b0)break;else _0x539ba0['push'](_0x539ba0['shift']());}catch(_0x471cdc){_0x539ba0['push'](_0x539ba0['shift']());}}}(a100_0x4a73,0x33e1c));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a100_0x4a73(){const _0x61e1fa=['660105JGclKC','1429752zzpDVx','scopes','env','filter','14TJLzZo','values','includes','code','isSymbolicLink','metadataPath','builtin','map','484350oxvjxq','tags','236ubcKqz','trim','scope','skillCode','appCode','linkedPath','3597wTuilU','local','1080GwaKLc','dir','62747ZgcKaV','push','has','26246kuAXll','source','startsWith','cacheDir','sort','skillMdPath','set','isArray','get','localeCompare','577515VwlqbC','16bxvWel','from','name','linkedPaths','link','4iGBhoo','cache'];a100_0x4a73=function(){return _0x61e1fa;};return a100_0x4a73();}import{readMetadataIfPresent}from'./metadata.js';function a100_0x5ef6(_0x7da714,_0xd0b1ac){_0x7da714=_0x7da714-0xc7;const _0x4a73ff=a100_0x4a73();let _0x5ef62a=_0x4a73ff[_0x7da714];return _0x5ef62a;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x43a5b5,_0x11fcd6={}){const _0x54a581=a100_0x5ef6,_0x143dcb=safePathSegment(_0x43a5b5[_0x54a581(0xef)],_0x54a581(0xef)),_0x2faf95=normalizeRuntimeSkillScopes(_0x43a5b5[_0x54a581(0xde)]),_0x99e627=new Set(_0x2faf95),_0x3121f3=_0x43a5b5[_0x54a581(0xe4)]?.[_0x54a581(0xec)](),_0x1ada17=new Map(),_0x44121b=resolve(getRuntimeSkillCacheRoot(_0x43a5b5[_0x54a581(0xdf)],_0x43a5b5['accessKey'],_0x11fcd6),_0x143dcb);for(const _0xda1b10 of _0x2faf95){for(const _0x2d782e of localSkillEntryDirs(resolve(_0x44121b,_0xda1b10))){collectLocalRuntimeSkill(_0x1ada17,_0x2d782e,{'appCode':_0x143dcb,'scopes':_0x99e627,'code':_0x3121f3,'source':_0x54a581(0xdb)});}}const _0x1ca311=resolveSkillSyncPaths(_0x11fcd6);for(const _0x1b8177 of runtimeAgentSkillRoots(_0x1ca311)){for(const _0x935237 of localSkillLinkCandidates(_0x1b8177,_0x143dcb,_0x99e627)){collectLocalRuntimeSkill(_0x1ada17,_0x935237,{'appCode':_0x143dcb,'scopes':_0x99e627,'code':_0x3121f3,'source':_0x54a581(0xd9),'linkedPath':_0x935237});}}return Array[_0x54a581(0xd6)](_0x1ada17[_0x54a581(0xe2)]())[_0x54a581(0xce)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x5cef0b){const _0xc57f1d=a100_0x5ef6;if(!existsSync(_0x5cef0b))return[];return readdirSync(_0x5cef0b,{'withFileTypes':!![]})[_0xc57f1d(0xe0)](_0x2ab0d9=>_0x2ab0d9['isDirectory']()||_0x2ab0d9['isSymbolicLink']())['map'](_0x2af068=>resolve(_0x5cef0b,_0x2af068[_0xc57f1d(0xd7)]));}function localSkillLinkCandidates(_0x19d2c7,_0x77a04e,_0x4b714e){const _0x3ff2a5=a100_0x5ef6;if(!existsSync(_0x19d2c7))return[];const _0x33b84d=_0x77a04e+'--';return readdirSync(_0x19d2c7,{'withFileTypes':!![]})[_0x3ff2a5(0xe0)](_0x2ce698=>_0x2ce698['isDirectory']()||_0x2ce698[_0x3ff2a5(0xe5)]())[_0x3ff2a5(0xe0)](_0x3407e7=>_0x3407e7[_0x3ff2a5(0xd7)][_0x3ff2a5(0xcc)](_0x33b84d)||_0x4b714e[_0x3ff2a5(0xc9)](_0x3ff2a5(0xe7)))[_0x3ff2a5(0xe8)](_0x3fa131=>resolve(_0x19d2c7,_0x3fa131[_0x3ff2a5(0xd7)]));}function collectLocalRuntimeSkill(_0x36423c,_0x491ae0,_0x292e4b){const _0x28d48d=a100_0x5ef6,_0x20c88c=resolve(_0x491ae0,METADATA_FILE),_0x34bc61=readMetadataIfPresent(_0x20c88c);if(!_0x34bc61)return;if(_0x34bc61[_0x28d48d(0xef)]!==_0x292e4b[_0x28d48d(0xef)])return;if(!isRuntimeSkillScope(_0x34bc61[_0x28d48d(0xed)])||!_0x292e4b[_0x28d48d(0xde)]['has'](_0x34bc61[_0x28d48d(0xed)]))return;const _0x381ce5=_0x34bc61['skillCode']?.[_0x28d48d(0xec)]();if(!_0x381ce5)return;if(_0x292e4b['code']&&_0x381ce5!==_0x292e4b[_0x28d48d(0xe4)])return;const _0x31dbf2=_0x34bc61[_0x28d48d(0xed)]+':'+_0x381ce5,_0x2e1e20=_0x292e4b[_0x28d48d(0xf0)]?[_0x292e4b['linkedPath']]:[],_0x563185=_0x36423c[_0x28d48d(0xd2)](_0x31dbf2);if(_0x563185){_0x292e4b[_0x28d48d(0xcb)]===_0x28d48d(0xdb)&&(_0x563185['dir']=_0x491ae0,_0x563185[_0x28d48d(0xcd)]=_0x491ae0,_0x563185[_0x28d48d(0xcf)]=resolve(_0x491ae0,SKILL_FILE),_0x563185[_0x28d48d(0xe6)]=_0x20c88c);for(const _0x35b29d of _0x2e1e20){!_0x563185[_0x28d48d(0xd8)][_0x28d48d(0xe3)](_0x35b29d)&&_0x563185['linkedPaths'][_0x28d48d(0xc8)](_0x35b29d);}_0x563185[_0x28d48d(0xd8)]['sort']();return;}_0x36423c[_0x28d48d(0xd0)](_0x31dbf2,{..._0x34bc61,'tags':Array[_0x28d48d(0xd1)](_0x34bc61[_0x28d48d(0xea)])?_0x34bc61[_0x28d48d(0xea)]:[],'scope':_0x34bc61['scope'],'source':_0x28d48d(0xf2),'dir':_0x491ae0,'cacheDir':_0x292e4b[_0x28d48d(0xcb)]==='cache'?_0x491ae0:undefined,'skillMdPath':resolve(_0x491ae0,SKILL_FILE),'metadataPath':_0x20c88c,'linkedPaths':_0x2e1e20});}function compareLocalRuntimeSkills(_0x4c98ac,_0x3b518e){const _0x160640=a100_0x5ef6,_0x158315={'personal':0x0,'company':0x1,'builtin':0x2};return _0x158315[_0x4c98ac[_0x160640(0xed)]]-_0x158315[_0x3b518e[_0x160640(0xed)]]||_0x4c98ac['skillCode'][_0x160640(0xd3)](_0x3b518e[_0x160640(0xee)])||_0x4c98ac[_0x160640(0xf4)][_0x160640(0xd3)](_0x3b518e[_0x160640(0xf4)]);}
1
+ function a101_0x1358(_0x244f5c,_0x1374f2){_0x244f5c=_0x244f5c-0xd5;const _0x5e5ba4=a101_0x5e5b();let _0x1358ef=_0x5e5ba4[_0x244f5c];return _0x1358ef;}(function(_0x10389d,_0x27a0df){const _0x41bedf=a101_0x1358,_0x3591b8=_0x10389d();while(!![]){try{const _0x3a7716=-parseInt(_0x41bedf(0xe7))/0x1+-parseInt(_0x41bedf(0xdc))/0x2+parseInt(_0x41bedf(0xed))/0x3+-parseInt(_0x41bedf(0xe2))/0x4+parseInt(_0x41bedf(0xe0))/0x5+-parseInt(_0x41bedf(0xe1))/0x6*(parseInt(_0x41bedf(0xd7))/0x7)+parseInt(_0x41bedf(0xf5))/0x8;if(_0x3a7716===_0x27a0df)break;else _0x3591b8['push'](_0x3591b8['shift']());}catch(_0x4f4ed3){_0x3591b8['push'](_0x3591b8['shift']());}}}(a101_0x5e5b,0xf180c));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';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x23a5d2,_0x4a68f0={}){const _0x1f1952=a101_0x1358,_0x36a24c=safePathSegment(_0x23a5d2['appCode'],'appCode'),_0x57856b=normalizeRuntimeSkillScopes(_0x23a5d2[_0x1f1952(0xfc)]),_0x21b10c=new Set(_0x57856b),_0x9d00d8=_0x23a5d2[_0x1f1952(0xd6)]?.[_0x1f1952(0xeb)](),_0x131142=new Map(),_0x2e4bf4=resolve(getRuntimeSkillCacheRoot(_0x23a5d2[_0x1f1952(0xf8)],_0x23a5d2[_0x1f1952(0xfb)],_0x4a68f0),_0x36a24c);for(const _0x558bcc of _0x57856b){for(const _0x807127 of localSkillEntryDirs(resolve(_0x2e4bf4,_0x558bcc))){collectLocalRuntimeSkill(_0x131142,_0x807127,{'appCode':_0x36a24c,'scopes':_0x21b10c,'code':_0x9d00d8,'source':_0x1f1952(0xfd)});}}const _0x5601b1=resolveSkillSyncPaths(_0x4a68f0);for(const _0x3018ec of runtimeAgentSkillRoots(_0x5601b1)){for(const _0x15b102 of localSkillLinkCandidates(_0x3018ec,_0x36a24c,_0x21b10c)){collectLocalRuntimeSkill(_0x131142,_0x15b102,{'appCode':_0x36a24c,'scopes':_0x21b10c,'code':_0x9d00d8,'source':'link','linkedPath':_0x15b102});}}return Array[_0x1f1952(0xe4)](_0x131142[_0x1f1952(0xdb)]())[_0x1f1952(0xd9)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x4a07ed){const _0x460dfc=a101_0x1358;if(!existsSync(_0x4a07ed))return[];return readdirSync(_0x4a07ed,{'withFileTypes':!![]})[_0x460dfc(0xf6)](_0x15760a=>_0x15760a[_0x460dfc(0xd8)]()||_0x15760a[_0x460dfc(0xef)]())['map'](_0x20be04=>resolve(_0x4a07ed,_0x20be04[_0x460dfc(0xe9)]));}function localSkillLinkCandidates(_0x384854,_0x8d462d,_0x39b810){const _0x50627f=a101_0x1358;if(!existsSync(_0x384854))return[];const _0x53e6d4=_0x8d462d+'--';return readdirSync(_0x384854,{'withFileTypes':!![]})['filter'](_0x3e3cab=>_0x3e3cab[_0x50627f(0xd8)]()||_0x3e3cab[_0x50627f(0xef)]())['filter'](_0x150e78=>_0x150e78[_0x50627f(0xe9)][_0x50627f(0xf2)](_0x53e6d4)||_0x39b810[_0x50627f(0xdd)]('builtin'))[_0x50627f(0xda)](_0xe57293=>resolve(_0x384854,_0xe57293[_0x50627f(0xe9)]));}function collectLocalRuntimeSkill(_0x5838f2,_0x3c53c4,_0x2922fe){const _0x55d2bd=a101_0x1358,_0x341395=resolve(_0x3c53c4,METADATA_FILE),_0xba8c49=readMetadataIfPresent(_0x341395);if(!_0xba8c49)return;if(_0xba8c49[_0x55d2bd(0xf4)]!==_0x2922fe['appCode'])return;if(!isRuntimeSkillScope(_0xba8c49[_0x55d2bd(0xfa)])||!_0x2922fe[_0x55d2bd(0xfc)]['has'](_0xba8c49['scope']))return;const _0x430510=_0xba8c49[_0x55d2bd(0xf1)]?.[_0x55d2bd(0xeb)]();if(!_0x430510)return;if(_0x2922fe[_0x55d2bd(0xd6)]&&_0x430510!==_0x2922fe[_0x55d2bd(0xd6)])return;const _0x17f88a=_0xba8c49[_0x55d2bd(0xfa)]+':'+_0x430510,_0x3cb0ab=_0x2922fe['linkedPath']?[_0x2922fe[_0x55d2bd(0xea)]]:[],_0x25fd69=_0x5838f2[_0x55d2bd(0xe8)](_0x17f88a);if(_0x25fd69){_0x2922fe[_0x55d2bd(0xf9)]===_0x55d2bd(0xfd)&&(_0x25fd69['dir']=_0x3c53c4,_0x25fd69[_0x55d2bd(0xf7)]=_0x3c53c4,_0x25fd69['skillMdPath']=resolve(_0x3c53c4,SKILL_FILE),_0x25fd69[_0x55d2bd(0xdf)]=_0x341395);for(const _0x7b645a of _0x3cb0ab){!_0x25fd69[_0x55d2bd(0xee)][_0x55d2bd(0xf0)](_0x7b645a)&&_0x25fd69['linkedPaths'][_0x55d2bd(0xe5)](_0x7b645a);}_0x25fd69[_0x55d2bd(0xee)][_0x55d2bd(0xd9)]();return;}_0x5838f2[_0x55d2bd(0xe3)](_0x17f88a,{..._0xba8c49,'tags':Array[_0x55d2bd(0xec)](_0xba8c49[_0x55d2bd(0xd5)])?_0xba8c49[_0x55d2bd(0xd5)]:[],'scope':_0xba8c49[_0x55d2bd(0xfa)],'source':_0x55d2bd(0xf3),'dir':_0x3c53c4,'cacheDir':_0x2922fe['source']===_0x55d2bd(0xfd)?_0x3c53c4:undefined,'skillMdPath':resolve(_0x3c53c4,SKILL_FILE),'metadataPath':_0x341395,'linkedPaths':_0x3cb0ab});}function a101_0x5e5b(){const _0x1d9a9d=['get','name','linkedPath','trim','isArray','1086642CYkPaY','linkedPaths','isSymbolicLink','includes','skillCode','startsWith','local','appCode','16161960qNnNSY','filter','cacheDir','env','source','scope','accessKey','scopes','cache','tags','code','4249qSADqq','isDirectory','sort','map','values','2287746aHOBVc','has','localeCompare','metadataPath','5074430NqwCfx','3954RhSHtO','1014948mcbrVn','set','from','push','dir','610526CJrxIl'];a101_0x5e5b=function(){return _0x1d9a9d;};return a101_0x5e5b();}function compareLocalRuntimeSkills(_0x240f17,_0x4e845e){const _0x922dbb=a101_0x1358,_0x167426={'personal':0x0,'company':0x1,'builtin':0x2};return _0x167426[_0x240f17[_0x922dbb(0xfa)]]-_0x167426[_0x4e845e['scope']]||_0x240f17[_0x922dbb(0xf1)][_0x922dbb(0xde)](_0x4e845e[_0x922dbb(0xf1)])||_0x240f17[_0x922dbb(0xe6)][_0x922dbb(0xde)](_0x4e845e[_0x922dbb(0xe6)]);}
@@ -1 +1 @@
1
- (function(_0x23a3d9,_0x2f69d4){const _0x127172=a101_0x3fe9,_0x35eb03=_0x23a3d9();while(!![]){try{const _0x1a5a1d=-parseInt(_0x127172(0x131))/0x1+-parseInt(_0x127172(0x12f))/0x2*(-parseInt(_0x127172(0x152))/0x3)+-parseInt(_0x127172(0x155))/0x4+-parseInt(_0x127172(0x151))/0x5*(-parseInt(_0x127172(0x158))/0x6)+parseInt(_0x127172(0x15a))/0x7+parseInt(_0x127172(0x145))/0x8+-parseInt(_0x127172(0x159))/0x9;if(_0x1a5a1d===_0x2f69d4)break;else _0x35eb03['push'](_0x35eb03['shift']());}catch(_0xcecf83){_0x35eb03['push'](_0x35eb03['shift']());}}}(a101_0x5335,0xbec7b));import{readFileSync,readdirSync,realpathSync}from'node:fs';function a101_0x5335(){const _0x2563ac=['content','startsWith','test','Skill\x20file\x20sha256\x20is\x20invalid:\x20','from','split','Skill\x20file\x20path\x20must\x20be\x20text.','Duplicate\x20Skill\x20file\x20path:\x20','localeCompare','has','isDirectory','282430JNeiUo','848139PjjWZg','sha256','toLowerCase','4831032jhFllS','utf8','compare','84YUDuCj','5389929bTWshu','7937377wyWhFe','2RgnaTi','isArray','2169bZMIsA','Unsafe\x20Skill\x20file\x20path:\x20','string','set','bytes','object','name','length','path','size','sort','Skill\x20file\x20size\x20is\x20invalid:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','values','isSafeInteger','push','toString','isFile','replace','validation','3062520PbQVMK'];a101_0x5335=function(){return _0x2563ac;};return a101_0x5335();}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(_0x5b00b7){const _0x229db6=a101_0x3fe9;return _0x5b00b7[_0x229db6(0x135)]??Buffer[_0x229db6(0x14a)](_0x5b00b7[_0x229db6(0x146)]??'',_0x229db6(0x156));}function a101_0x3fe9(_0x1d9ed6,_0x4b4fd9){_0x1d9ed6=_0x1d9ed6-0x12f;const _0x5335b4=a101_0x5335();let _0x3fe969=_0x5335b4[_0x1d9ed6];return _0x3fe969;}export function fileText(_0x29acdc){const _0x3cfac2=a101_0x3fe9;return fileContent(_0x29acdc)[_0x3cfac2(0x141)]('utf8');}export function normalizeLocalFiles(_0x37ebd0){const _0x4735fa=a101_0x3fe9;if(!Array['isArray'](_0x37ebd0)||_0x37ebd0[_0x4735fa(0x138)]===0x0)return[];const _0x1812b0=new Map();for(const _0x22693e of _0x37ebd0){if(!_0x22693e||typeof _0x22693e!==_0x4735fa(0x136)||typeof _0x22693e[_0x4735fa(0x139)]!==_0x4735fa(0x133))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x9b1b32=normalizeSkillRelativePath(_0x22693e[_0x4735fa(0x139)]);if(_0x1812b0[_0x4735fa(0x14f)](_0x9b1b32))throw CliErrors['validation'](_0x4735fa(0x14d)+_0x9b1b32);if(_0x22693e['bytes']!==undefined&&!Buffer['isBuffer'](_0x22693e['bytes']))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x9b1b32);if(_0x22693e['bytes']===undefined&&typeof _0x22693e[_0x4735fa(0x146)]!=='string')throw CliErrors[_0x4735fa(0x144)](_0x4735fa(0x13d)+_0x9b1b32);const _0x62d758=fileContent(_0x22693e);_0x1812b0[_0x4735fa(0x134)](_0x9b1b32,{'path':_0x9b1b32,'bytes':_0x62d758});}return Array[_0x4735fa(0x14a)](_0x1812b0[_0x4735fa(0x13e)]())[_0x4735fa(0x13b)](compareSkillFiles);}export function normalizeManifestFiles(_0x205ada){const _0x30fa1f=a101_0x3fe9;if(!Array[_0x30fa1f(0x130)](_0x205ada)||_0x205ada[_0x30fa1f(0x138)]===0x0)return[];const _0x443863=new Map();for(const _0x5af19 of _0x205ada){if(!_0x5af19||typeof _0x5af19!=='object'||typeof _0x5af19[_0x30fa1f(0x139)]!==_0x30fa1f(0x133))throw CliErrors[_0x30fa1f(0x144)](_0x30fa1f(0x14c));const _0x4aaea1=normalizeSkillRelativePath(_0x5af19[_0x30fa1f(0x139)]);if(_0x443863[_0x30fa1f(0x14f)](_0x4aaea1))throw CliErrors['validation'](_0x30fa1f(0x14d)+_0x4aaea1);if(!isSha256Hex(_0x5af19[_0x30fa1f(0x153)]))throw CliErrors['validation'](_0x30fa1f(0x149)+_0x4aaea1);if(!Number[_0x30fa1f(0x13f)](_0x5af19['size'])||_0x5af19[_0x30fa1f(0x13a)]<0x0)throw CliErrors[_0x30fa1f(0x144)](_0x30fa1f(0x13c)+_0x4aaea1);_0x443863[_0x30fa1f(0x134)](_0x4aaea1,{'path':_0x4aaea1,'sha256':_0x5af19['sha256'][_0x30fa1f(0x154)](),'size':_0x5af19[_0x30fa1f(0x13a)]});}return Array[_0x30fa1f(0x14a)](_0x443863['values']())[_0x30fa1f(0x13b)](compareSkillFiles);}export function scanSkillDirectory(_0xb7a1ad){const _0x2b637e=realpathSync(_0xb7a1ad),_0x254e56=[];function _0x3432(_0x4744d5){const _0x2fa61b=a101_0x3fe9,_0x2ddfaa=readdirSync(_0x4744d5,{'withFileTypes':!![]})['sort']((_0xa8ef8d,_0x5bb30a)=>_0xa8ef8d[_0x2fa61b(0x137)][_0x2fa61b(0x14e)](_0x5bb30a[_0x2fa61b(0x137)]));for(const _0x194a88 of _0x2ddfaa){if(_0x194a88[_0x2fa61b(0x150)]()&&IGNORED_DIR_NAMES['has'](_0x194a88[_0x2fa61b(0x137)]))continue;if(IGNORED_FILE_NAMES[_0x2fa61b(0x14f)](_0x194a88[_0x2fa61b(0x137)]))continue;const _0xce4162=resolve(_0x4744d5,_0x194a88['name']);if(_0x194a88['isSymbolicLink']())throw CliErrors[_0x2fa61b(0x144)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0xce4162);const _0xc45950=toPosixPath(relative(_0x2b637e,_0xce4162));if(_0x194a88[_0x2fa61b(0x150)]()){_0x3432(_0xce4162);continue;}if(!_0x194a88[_0x2fa61b(0x142)]())continue;validateSkillRelativePath(_0xc45950);const _0xb374ca=readFileSync(_0xce4162);_0x254e56[_0x2fa61b(0x140)]({'path':_0xc45950,'bytes':_0xb374ca});}}return _0x3432(_0x2b637e),normalizeLocalFiles(_0x254e56);}export function compareSkillFiles(_0x3e2e11,_0x4b20e1){const _0x7338b6=a101_0x3fe9;if(_0x3e2e11[_0x7338b6(0x139)]===SKILL_FILE)return _0x4b20e1[_0x7338b6(0x139)]===SKILL_FILE?0x0:-0x1;if(_0x4b20e1[_0x7338b6(0x139)]===SKILL_FILE)return 0x1;return Buffer[_0x7338b6(0x157)](Buffer[_0x7338b6(0x14a)](_0x3e2e11[_0x7338b6(0x139)],_0x7338b6(0x156)),Buffer['from'](_0x4b20e1['path'],_0x7338b6(0x156)));}export function normalizeSkillRelativePath(_0x52d519){const _0x5146fa=toPosixPath(_0x52d519['trim']());return validateSkillRelativePath(_0x5146fa),_0x5146fa;}export function validateSkillRelativePath(_0x503a3a){const _0x6b8435=a101_0x3fe9;if(!_0x503a3a||_0x503a3a[_0x6b8435(0x147)]('/')||_0x503a3a['includes']('//'))throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x503a3a);for(const _0x3930a4 of _0x503a3a[_0x6b8435(0x14b)]('/')){if(!_0x3930a4||_0x3930a4==='.'||_0x3930a4==='..')throw CliErrors[_0x6b8435(0x144)](_0x6b8435(0x132)+_0x503a3a);}}export function toPosixPath(_0x32b6f6){const _0x3bb1c1=a101_0x3fe9;return _0x32b6f6[_0x3bb1c1(0x143)](/\\/g,'/');}export function isSha256Hex(_0x3705f7){const _0x4938fc=a101_0x3fe9;return typeof _0x3705f7===_0x4938fc(0x133)&&/^[a-fA-F0-9]{64}$/[_0x4938fc(0x148)](_0x3705f7);}
1
+ function a102_0x276d(_0x1d39fe,_0x26246d){_0x1d39fe=_0x1d39fe-0x1f1;const _0xd3efb9=a102_0xd3ef();let _0x276def=_0xd3efb9[_0x1d39fe];return _0x276def;}(function(_0x1205f7,_0x2d225e){const _0xc21ec3=a102_0x276d,_0x39c964=_0x1205f7();while(!![]){try{const _0x4d584b=-parseInt(_0xc21ec3(0x21a))/0x1+parseInt(_0xc21ec3(0x20e))/0x2+parseInt(_0xc21ec3(0x1f1))/0x3+parseInt(_0xc21ec3(0x208))/0x4*(parseInt(_0xc21ec3(0x202))/0x5)+-parseInt(_0xc21ec3(0x1f4))/0x6*(-parseInt(_0xc21ec3(0x1f6))/0x7)+parseInt(_0xc21ec3(0x21f))/0x8+parseInt(_0xc21ec3(0x1fa))/0x9*(-parseInt(_0xc21ec3(0x1f7))/0xa);if(_0x4d584b===_0x2d225e)break;else _0x39c964['push'](_0x39c964['shift']());}catch(_0x2aa287){_0x39c964['push'](_0x39c964['shift']());}}}(a102_0xd3ef,0x39625));function a102_0xd3ef(){const _0x253f83=['isSafeInteger','localeCompare','isDirectory','values','split','898846McndTt','Duplicate\x20Skill\x20file\x20path:\x20','toLowerCase','bytes','isFile','test','object','toString','isArray','sha256','string','validation','203995SKFOAD','from','Skill\x20file\x20sha256\x20is\x20invalid:\x20','includes','utf8','1427336AZttdV','length','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','1068114YHOoiE','Skill\x20file\x20size\x20is\x20invalid:\x20','push','116238HNcCsX','content','98yMFcLB','3785890OqoVbE','sort','Unsafe\x20Skill\x20file\x20path:\x20','27OreVWR','has','compare','path','size','startsWith','trim','name','405cPHmYl','replace','set','Skill\x20file\x20path\x20must\x20be\x20text.','isBuffer','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','15788fxlAYA'];a102_0xd3ef=function(){return _0x253f83;};return a102_0xd3ef();}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(_0x22bf8a){const _0x4b195a=a102_0x276d;return _0x22bf8a[_0x4b195a(0x211)]??Buffer[_0x4b195a(0x21b)](_0x22bf8a['content']??'','utf8');}export function fileText(_0x5ed4b2){const _0x31344e=a102_0x276d;return fileContent(_0x5ed4b2)[_0x31344e(0x215)](_0x31344e(0x21e));}export function normalizeLocalFiles(_0x15c6e3){const _0x47ab62=a102_0x276d;if(!Array[_0x47ab62(0x216)](_0x15c6e3)||_0x15c6e3[_0x47ab62(0x220)]===0x0)return[];const _0x32ae8a=new Map();for(const _0x4e2fc4 of _0x15c6e3){if(!_0x4e2fc4||typeof _0x4e2fc4!=='object'||typeof _0x4e2fc4['path']!=='string')throw CliErrors['validation'](_0x47ab62(0x205));const _0x921b34=normalizeSkillRelativePath(_0x4e2fc4[_0x47ab62(0x1fd)]);if(_0x32ae8a['has'](_0x921b34))throw CliErrors[_0x47ab62(0x219)](_0x47ab62(0x20f)+_0x921b34);if(_0x4e2fc4['bytes']!==undefined&&!Buffer[_0x47ab62(0x206)](_0x4e2fc4[_0x47ab62(0x211)]))throw CliErrors[_0x47ab62(0x219)](_0x47ab62(0x207)+_0x921b34);if(_0x4e2fc4[_0x47ab62(0x211)]===undefined&&typeof _0x4e2fc4[_0x47ab62(0x1f5)]!==_0x47ab62(0x218))throw CliErrors['validation'](_0x47ab62(0x221)+_0x921b34);const _0x374d79=fileContent(_0x4e2fc4);_0x32ae8a[_0x47ab62(0x204)](_0x921b34,{'path':_0x921b34,'bytes':_0x374d79});}return Array[_0x47ab62(0x21b)](_0x32ae8a[_0x47ab62(0x20c)]())[_0x47ab62(0x1f8)](compareSkillFiles);}export function normalizeManifestFiles(_0x44d04e){const _0x269d18=a102_0x276d;if(!Array[_0x269d18(0x216)](_0x44d04e)||_0x44d04e['length']===0x0)return[];const _0x5a244f=new Map();for(const _0x1d2884 of _0x44d04e){if(!_0x1d2884||typeof _0x1d2884!==_0x269d18(0x214)||typeof _0x1d2884[_0x269d18(0x1fd)]!==_0x269d18(0x218))throw CliErrors[_0x269d18(0x219)](_0x269d18(0x205));const _0x3a39ff=normalizeSkillRelativePath(_0x1d2884['path']);if(_0x5a244f[_0x269d18(0x1fb)](_0x3a39ff))throw CliErrors[_0x269d18(0x219)](_0x269d18(0x20f)+_0x3a39ff);if(!isSha256Hex(_0x1d2884[_0x269d18(0x217)]))throw CliErrors[_0x269d18(0x219)](_0x269d18(0x21c)+_0x3a39ff);if(!Number[_0x269d18(0x209)](_0x1d2884['size'])||_0x1d2884[_0x269d18(0x1fe)]<0x0)throw CliErrors[_0x269d18(0x219)](_0x269d18(0x1f2)+_0x3a39ff);_0x5a244f[_0x269d18(0x204)](_0x3a39ff,{'path':_0x3a39ff,'sha256':_0x1d2884[_0x269d18(0x217)][_0x269d18(0x210)](),'size':_0x1d2884[_0x269d18(0x1fe)]});}return Array[_0x269d18(0x21b)](_0x5a244f[_0x269d18(0x20c)]())[_0x269d18(0x1f8)](compareSkillFiles);}export function scanSkillDirectory(_0x3a2a86){const _0x13d416=realpathSync(_0x3a2a86),_0x32be80=[];function _0x6530cb(_0x2c6a3d){const _0x62db0b=a102_0x276d,_0x31afdb=readdirSync(_0x2c6a3d,{'withFileTypes':!![]})[_0x62db0b(0x1f8)]((_0x2b489a,_0x108b7f)=>_0x2b489a[_0x62db0b(0x201)][_0x62db0b(0x20a)](_0x108b7f['name']));for(const _0x2848b9 of _0x31afdb){if(_0x2848b9[_0x62db0b(0x20b)]()&&IGNORED_DIR_NAMES[_0x62db0b(0x1fb)](_0x2848b9[_0x62db0b(0x201)]))continue;if(IGNORED_FILE_NAMES[_0x62db0b(0x1fb)](_0x2848b9[_0x62db0b(0x201)]))continue;const _0x36f323=resolve(_0x2c6a3d,_0x2848b9[_0x62db0b(0x201)]);if(_0x2848b9['isSymbolicLink']())throw CliErrors[_0x62db0b(0x219)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x36f323);const _0x5f0201=toPosixPath(relative(_0x13d416,_0x36f323));if(_0x2848b9['isDirectory']()){_0x6530cb(_0x36f323);continue;}if(!_0x2848b9[_0x62db0b(0x212)]())continue;validateSkillRelativePath(_0x5f0201);const _0x15beef=readFileSync(_0x36f323);_0x32be80[_0x62db0b(0x1f3)]({'path':_0x5f0201,'bytes':_0x15beef});}}return _0x6530cb(_0x13d416),normalizeLocalFiles(_0x32be80);}export function compareSkillFiles(_0x176729,_0x2451fc){const _0x1dc5e9=a102_0x276d;if(_0x176729[_0x1dc5e9(0x1fd)]===SKILL_FILE)return _0x2451fc[_0x1dc5e9(0x1fd)]===SKILL_FILE?0x0:-0x1;if(_0x2451fc[_0x1dc5e9(0x1fd)]===SKILL_FILE)return 0x1;return Buffer[_0x1dc5e9(0x1fc)](Buffer[_0x1dc5e9(0x21b)](_0x176729[_0x1dc5e9(0x1fd)],_0x1dc5e9(0x21e)),Buffer[_0x1dc5e9(0x21b)](_0x2451fc[_0x1dc5e9(0x1fd)],_0x1dc5e9(0x21e)));}export function normalizeSkillRelativePath(_0x576fc7){const _0x26319f=a102_0x276d,_0x45113b=toPosixPath(_0x576fc7[_0x26319f(0x200)]());return validateSkillRelativePath(_0x45113b),_0x45113b;}export function validateSkillRelativePath(_0x35dedc){const _0x2952ef=a102_0x276d;if(!_0x35dedc||_0x35dedc[_0x2952ef(0x1ff)]('/')||_0x35dedc[_0x2952ef(0x21d)]('//'))throw CliErrors[_0x2952ef(0x219)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x35dedc);for(const _0xf3f788 of _0x35dedc[_0x2952ef(0x20d)]('/')){if(!_0xf3f788||_0xf3f788==='.'||_0xf3f788==='..')throw CliErrors[_0x2952ef(0x219)](_0x2952ef(0x1f9)+_0x35dedc);}}export function toPosixPath(_0x8931ba){const _0x579ec2=a102_0x276d;return _0x8931ba[_0x579ec2(0x203)](/\\/g,'/');}export function isSha256Hex(_0x2c4ade){const _0x1d1d7b=a102_0x276d;return typeof _0x2c4ade==='string'&&/^[a-fA-F0-9]{64}$/[_0x1d1d7b(0x213)](_0x2c4ade);}
@@ -1 +1 @@
1
- (function(_0x3471f0,_0x5c8f21){const _0xd4b7a4=a102_0x18bb,_0x2cdbfe=_0x3471f0();while(!![]){try{const _0x48c905=-parseInt(_0xd4b7a4(0x117))/0x1*(parseInt(_0xd4b7a4(0x120))/0x2)+parseInt(_0xd4b7a4(0xf2))/0x3*(-parseInt(_0xd4b7a4(0x10d))/0x4)+parseInt(_0xd4b7a4(0x11d))/0x5*(-parseInt(_0xd4b7a4(0xf4))/0x6)+parseInt(_0xd4b7a4(0x11b))/0x7+parseInt(_0xd4b7a4(0xf9))/0x8+-parseInt(_0xd4b7a4(0xfc))/0x9*(-parseInt(_0xd4b7a4(0xeb))/0xa)+parseInt(_0xd4b7a4(0x115))/0xb*(-parseInt(_0xd4b7a4(0x118))/0xc);if(_0x48c905===_0x5c8f21)break;else _0x2cdbfe['push'](_0x2cdbfe['shift']());}catch(_0x3af63c){_0x2cdbfe['push'](_0x2cdbfe['shift']());}}}(a102_0x1026,0x9cf6d));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';function a102_0x18bb(_0x3112a8,_0xa0df52){_0x3112a8=_0x3112a8-0xeb;const _0x102635=a102_0x1026();let _0x18bb23=_0x102635[_0x3112a8];return _0x18bb23;}import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x4ccaf2,_0x5d982a,_0x15ba2c){const _0x1842c0=a102_0x18bb,_0xb25b7d=requireSkillCode(_0x4ccaf2),_0x5fcf72=requirePackageBytes(_0xb25b7d,_0x15ba2c['packageBytes']),_0x25781f=extractDownloadedPackage(_0x5fcf72),_0x1310b2=_0x25781f[_0x1842c0(0xee)](_0x17798d=>_0x17798d['path']===SKILL_FILE);if(!_0x1310b2)throw CliErrors['validation'](_0x1842c0(0xef)+SKILL_FILE+':\x20'+_0xb25b7d);const _0x3c2c9f=withMaterializedSkillFrontmatter(_0x25781f,_0x4ccaf2,_0xb25b7d),_0x1a5020=_0x3c2c9f[_0x1842c0(0xee)](_0x35b5f9=>_0x35b5f9[_0x1842c0(0x101)]===SKILL_FILE),_0x182e3a=fileText(_0x1a5020),_0x221ba7=getRuntimeSkillDir(_0x15ba2c[_0x1842c0(0x104)],_0x15ba2c[_0x1842c0(0xf3)],_0x15ba2c['appCode'],_0x5d982a,_0xb25b7d,_0x15ba2c[_0x1842c0(0x10b)]),_0x8ada5a=resolve(_0x221ba7,SKILL_FILE),_0x8df687=resolve(_0x221ba7,METADATA_FILE),_0x5f452b=contentHash(_0x182e3a),_0x18501c=readMetadataIfPresent(_0x8df687)?.[_0x1842c0(0x106)];ensurePulledFilesCanBeOverwritten(_0x221ba7,_0x8df687,_0x3c2c9f,_0x15ba2c[_0x1842c0(0x11c)]===!![]),mkdirSync(_0x221ba7,{'recursive':!![],'mode':0x1c0});const _0x5607a3=existsSync(_0x8ada5a)?readFileSync(_0x8ada5a,_0x1842c0(0xfd)):undefined;return materializeFiles(_0x221ba7,_0x3c2c9f),removeStaleManagedFiles(_0x221ba7,_0x18501c,_0x3c2c9f),writeJsonAtomic(_0x8df687,buildMetadata(_0x4ccaf2,_0x5d982a,_0x15ba2c[_0x1842c0(0x10f)],_0x5f452b,_0x15ba2c[_0x1842c0(0xfb)],_0x3c2c9f,_0x5fcf72)),{'skill':_0x4ccaf2,'scope':_0x5d982a,'dir':_0x221ba7,'skillMdPath':_0x8ada5a,'metadataPath':_0x8df687,'contentHash':_0x5f452b,'changed':_0x5607a3!==_0x182e3a};}function withMaterializedSkillFrontmatter(_0x24285e,_0x533728,_0x4a26e6){const _0xe18400=a102_0x18bb,_0x1c3cc6=skillDisplayName(_0x533728,_0x4a26e6),_0x2c4880=_0x533728[_0xe18400(0x107)]?.[_0xe18400(0xff)]()||_0x1c3cc6||_0x4a26e6;return normalizeLocalFiles(_0x24285e)[_0xe18400(0xfa)](_0x4a90d6=>{const _0x56b35a=_0xe18400,_0x4ee6a8=fileText(_0x4a90d6);if(_0x4a90d6[_0x56b35a(0x101)]!==SKILL_FILE)return _0x4a90d6;if(hasYamlFrontmatter(_0x4ee6a8))return{'path':_0x4a90d6[_0x56b35a(0x101)],'content':withSyncedDisplayName(_0x4ee6a8,_0x1c3cc6)};return{'path':_0x4a90d6['path'],'content':prependSkillFrontmatter(_0x4ee6a8,{'name':_0x4a26e6,'displayName':_0x1c3cc6,'description':_0x2c4880})};});}function hasYamlFrontmatter(_0x595bf1){const _0x54cb2d=a102_0x18bb;return/^\uFEFF?---\s*\r?\n/[_0x54cb2d(0x110)](_0x595bf1);}function a102_0x1026(){const _0x415032=['60SOViul','---\x0a','slice','2373980EddTfV','force','62455XIWCDE','name','\x0a---\x0a\x0a','2DBjQPb','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','4270dtiqkY','replace','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','find','Runtime\x20Skill\x20package\x20is\x20missing\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','match','12QnsNVi','accessKey','90mUJrda','.\x20Changed\x20file:\x20','length','contents','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','4813520UUGQdq','map','pulledAt','15732nAHWsK','utf8','validation','trim','flow','path','description:\x20','displayName','env','entries','fileHashes','description','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','isFile','set','paths','delete','311724GOvXCg','---','appCode','test','keys','has','skillName','stringify','447667DXqtCy','contentHash','341727xACdtG'];a102_0x1026=function(){return _0x415032;};return a102_0x1026();}function prependSkillFrontmatter(_0x3f7c76,_0x12889a){const _0x4ee060=a102_0x18bb,_0x1284a4=_0x3f7c76[_0x4ee060(0xec)](/^\uFEFF/,'');return[_0x4ee060(0x10e),'name:\x20'+yamlString(_0x12889a[_0x4ee060(0x11e)]),_0x12889a[_0x4ee060(0x103)]?'displayName:\x20'+yamlString(_0x12889a[_0x4ee060(0x103)]):undefined,_0x4ee060(0x102)+yamlString(_0x12889a[_0x4ee060(0x107)]),'---','',_0x1284a4]['filter'](_0xa2349c=>_0xa2349c!==undefined)['join']('\x0a');}function yamlString(_0x5666b3){const _0x2e67ad=a102_0x18bb;return JSON[_0x2e67ad(0x114)](_0x5666b3[_0x2e67ad(0xec)](/\r/g,'')['trim']());}function skillDisplayName(_0x473ea5,_0x5b9a88){const _0xdccede=a102_0x18bb,_0x4bd0e7=_0x473ea5[_0xdccede(0x113)]?.['trim']();return _0x4bd0e7||_0x5b9a88;}function withSyncedDisplayName(_0x35546e,_0x580473){const _0x1f13cd=a102_0x18bb,_0x178ced=_0x35546e[_0x1f13cd(0xf1)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x178ced)return _0x35546e;const _0x127ebb=_0x178ced[0x1]??'',_0x47a026=_0x178ced[0x2]??'',_0x50fc89=parseDocument(_0x47a026);if(_0x50fc89['errors'][_0x1f13cd(0xf6)]>0x0||!isMap(_0x50fc89[_0x1f13cd(0xf7)]))return _0x35546e;if(_0x580473)_0x50fc89[_0x1f13cd(0x10a)]('displayName',_0x580473);else{if(_0x50fc89['has'](_0x1f13cd(0x103)))_0x50fc89[_0x1f13cd(0x10c)]('displayName');else return _0x35546e;}forceBlockCollections(_0x50fc89[_0x1f13cd(0xf7)]);const _0x1273d4=_0x50fc89['toString']({'lineWidth':0x0})['trimEnd'](),_0x5460a4=_0x35546e[_0x1f13cd(0x11a)](_0x178ced[0x0][_0x1f13cd(0xf6)])['replace'](/^\r?\n/,'');return _0x127ebb+_0x1f13cd(0x119)+_0x1273d4+_0x1f13cd(0x11f)+_0x5460a4;}function forceBlockCollections(_0x21e170){if(!isNode(_0x21e170))return;visit(_0x21e170,(_0x12b6aa,_0x4cdbb5)=>{const _0x18ef15=a102_0x18bb;isCollection(_0x4cdbb5)&&(_0x4cdbb5[_0x18ef15(0x100)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x328248,_0xf62ece,_0x5c3d6b,_0x3e5f71){const _0x5c0809=a102_0x18bb;if(_0x3e5f71||!existsSync(_0xf62ece))return;const _0x2e2545=readMetadataIfPresent(_0xf62ece);if(!_0x2e2545)return;const _0x52466b=_0x2e2545[_0x5c0809(0x106)]&&Object[_0x5c0809(0x111)](_0x2e2545['fileHashes'])[_0x5c0809(0xf6)]>0x0?_0x2e2545[_0x5c0809(0x106)]:undefined;if(_0x52466b)for(const [_0x45755e,_0x4035a9]of Object[_0x5c0809(0x105)](_0x52466b)){const _0x578782=resolveManagedFilePath(_0x328248,_0x45755e);if(!existsSync(_0x578782))throw CliErrors['validation'](_0x5c0809(0xf8)+_0x328248,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x45755e);const _0x58c57b=lstatSync(_0x578782);if(!_0x58c57b[_0x5c0809(0x109)]())throw CliErrors[_0x5c0809(0xfe)](_0x5c0809(0xf8)+_0x328248,_0x5c0809(0xed)+_0x45755e);const _0x2658ff=bufferSha256(readFileSync(_0x578782));if(_0x2658ff!==_0x4035a9)throw CliErrors[_0x5c0809(0xfe)](_0x5c0809(0xf8)+_0x328248+_0x5c0809(0xf5)+_0x45755e,_0x5c0809(0x121)+_0x45755e);}else{const _0x14d698=resolve(_0x328248,SKILL_FILE);if(existsSync(_0x14d698)&&_0x2e2545[_0x5c0809(0x116)]){const _0x1017f0=contentHash(readFileSync(_0x14d698,_0x5c0809(0xfd)));if(_0x1017f0!==_0x2e2545['contentHash'])throw CliErrors[_0x5c0809(0xfe)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x14d698,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0xd3542f of normalizeLocalFiles(_0x5c3d6b)){if(_0x52466b?.[_0xd3542f['path']])continue;if(!_0x52466b&&_0xd3542f[_0x5c0809(0x101)]===SKILL_FILE)continue;const _0x269a05=resolveManagedFilePath(_0x328248,_0xd3542f['path']);if(!existsSync(_0x269a05))continue;const _0x478a09=lstatSync(_0x269a05);if(!_0x478a09['isFile']())throw CliErrors[_0x5c0809(0xfe)](_0x5c0809(0xf8)+_0x328248,_0x5c0809(0x108)+_0xd3542f['path']);const _0x1bec2c=bufferSha256(readFileSync(_0x269a05));if(_0x1bec2c!==fileHash(_0xd3542f))throw CliErrors[_0x5c0809(0xfe)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x328248,_0x5c0809(0xf0)+_0xd3542f[_0x5c0809(0x101)]);}}function materializeFiles(_0x2c1960,_0x253a99){const _0x3df62d=a102_0x18bb;for(const _0x52e09b of normalizeLocalFiles(_0x253a99)){const _0x2cf2e8=resolveManagedFilePath(_0x2c1960,_0x52e09b[_0x3df62d(0x101)]);mkdirSync(dirname(_0x2cf2e8),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2cf2e8,fileContent(_0x52e09b),0x180);}}function removeStaleManagedFiles(_0x346e3b,_0x17379d,_0x31219e){const _0x972e61=a102_0x18bb;if(!_0x17379d)return;const _0x29ba70=new Set(normalizeLocalFiles(_0x31219e)[_0x972e61(0xfa)](_0x195909=>_0x195909[_0x972e61(0x101)]));for(const _0x4adb45 of Object['keys'](_0x17379d)){if(_0x29ba70[_0x972e61(0x112)](_0x4adb45))continue;const _0x37be33=resolveManagedFilePath(_0x346e3b,_0x4adb45);existsSync(_0x37be33)&&lstatSync(_0x37be33)[_0x972e61(0x109)]()&&rmSync(_0x37be33,{'force':!![]});}}
1
+ function a103_0x2153(){const _0x1efd27=['test','length','77pgalsq','accessKey','env','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','28713933vfAQkA','contents','force','has','1394882dfjqPL','keys','find','fileHashes','skillName','Runtime\x20Skill\x20package\x20is\x20missing\x20','utf8','---\x0a','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','trimEnd','1424KbMHRT','displayName:\x20','entries','pulledAt','8538762yqExie','slice','validation','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description:\x20','1142048FoxuKW','errors','path','\x0a---\x0a\x0a','Managed\x20file\x20was\x20removed\x20locally:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','delete','description','toString','map','appCode','contentHash','name:\x20','isFile','---','packageBytes','603080gxydXb','replace','2757273mnFZNz','match','filter','trim','displayName','16990veAOlv'];a103_0x2153=function(){return _0x1efd27;};return a103_0x2153();}(function(_0x3cc729,_0x5945da){const _0x522892=a103_0x491e,_0x14725c=_0x3cc729();while(!![]){try{const _0x4a10a3=-parseInt(_0x522892(0xec))/0x1+parseInt(_0x522892(0x10e))/0x2+-parseInt(_0x522892(0xfe))/0x3+parseInt(_0x522892(0x118))/0x4*(parseInt(_0x522892(0x103))/0x5)+-parseInt(_0x522892(0xe7))/0x6+-parseInt(_0x522892(0x106))/0x7*(parseInt(_0x522892(0xfc))/0x8)+parseInt(_0x522892(0x10a))/0x9;if(_0x4a10a3===_0x5945da)break;else _0x14725c['push'](_0x14725c['shift']());}catch(_0xb1842c){_0x14725c['push'](_0x14725c['shift']());}}}(a103_0x2153,0xbf6c1));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a103_0x491e(_0x391590,_0xf3bf84){_0x391590=_0x391590-0xe6;const _0x2153cd=a103_0x2153();let _0x491e97=_0x2153cd[_0x391590];return _0x491e97;}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x280952,_0x10fda8,_0x34f8a1){const _0x4771f=a103_0x491e,_0x5ee2b2=requireSkillCode(_0x280952),_0x46d235=requirePackageBytes(_0x5ee2b2,_0x34f8a1[_0x4771f(0xfb)]),_0x2ecfd1=extractDownloadedPackage(_0x46d235),_0x1862be=_0x2ecfd1['find'](_0x790d03=>_0x790d03[_0x4771f(0xee)]===SKILL_FILE);if(!_0x1862be)throw CliErrors[_0x4771f(0xe9)](_0x4771f(0x113)+SKILL_FILE+':\x20'+_0x5ee2b2);const _0x111c56=withMaterializedSkillFrontmatter(_0x2ecfd1,_0x280952,_0x5ee2b2),_0x29b3eb=_0x111c56[_0x4771f(0x110)](_0x23be2c=>_0x23be2c[_0x4771f(0xee)]===SKILL_FILE),_0x23adb4=fileText(_0x29b3eb),_0x4c24bd=getRuntimeSkillDir(_0x34f8a1[_0x4771f(0x108)],_0x34f8a1[_0x4771f(0x107)],_0x34f8a1['appCode'],_0x10fda8,_0x5ee2b2,_0x34f8a1['paths']),_0x4b93d0=resolve(_0x4c24bd,SKILL_FILE),_0x1260d9=resolve(_0x4c24bd,METADATA_FILE),_0x1c1414=contentHash(_0x23adb4),_0x3afa2c=readMetadataIfPresent(_0x1260d9)?.[_0x4771f(0x111)];ensurePulledFilesCanBeOverwritten(_0x4c24bd,_0x1260d9,_0x111c56,_0x34f8a1[_0x4771f(0x10c)]===!![]),mkdirSync(_0x4c24bd,{'recursive':!![],'mode':0x1c0});const _0x33be24=existsSync(_0x4b93d0)?readFileSync(_0x4b93d0,'utf8'):undefined;return materializeFiles(_0x4c24bd,_0x111c56),removeStaleManagedFiles(_0x4c24bd,_0x3afa2c,_0x111c56),writeJsonAtomic(_0x1260d9,buildMetadata(_0x280952,_0x10fda8,_0x34f8a1[_0x4771f(0xf6)],_0x1c1414,_0x34f8a1[_0x4771f(0xe6)],_0x111c56,_0x46d235)),{'skill':_0x280952,'scope':_0x10fda8,'dir':_0x4c24bd,'skillMdPath':_0x4b93d0,'metadataPath':_0x1260d9,'contentHash':_0x1c1414,'changed':_0x33be24!==_0x23adb4};}function withMaterializedSkillFrontmatter(_0x18714f,_0x2c6e97,_0x3904cc){const _0xc089b6=a103_0x491e,_0x2e8a2e=skillDisplayName(_0x2c6e97,_0x3904cc),_0x5e255e=_0x2c6e97[_0xc089b6(0xf3)]?.['trim']()||_0x2e8a2e||_0x3904cc;return normalizeLocalFiles(_0x18714f)[_0xc089b6(0xf5)](_0x10fd2e=>{const _0xdc2e59=_0xc089b6,_0x5232e8=fileText(_0x10fd2e);if(_0x10fd2e[_0xdc2e59(0xee)]!==SKILL_FILE)return _0x10fd2e;if(hasYamlFrontmatter(_0x5232e8))return{'path':_0x10fd2e[_0xdc2e59(0xee)],'content':withSyncedDisplayName(_0x5232e8,_0x2e8a2e)};return{'path':_0x10fd2e[_0xdc2e59(0xee)],'content':prependSkillFrontmatter(_0x5232e8,{'name':_0x3904cc,'displayName':_0x2e8a2e,'description':_0x5e255e})};});}function hasYamlFrontmatter(_0x508e46){const _0x56e339=a103_0x491e;return/^\uFEFF?---\s*\r?\n/[_0x56e339(0x104)](_0x508e46);}function prependSkillFrontmatter(_0x3b5dda,_0x59ea6c){const _0x59a12a=a103_0x491e,_0x2993e1=_0x3b5dda[_0x59a12a(0xfd)](/^\uFEFF/,'');return['---',_0x59a12a(0xf8)+yamlString(_0x59ea6c['name']),_0x59ea6c[_0x59a12a(0x102)]?_0x59a12a(0x119)+yamlString(_0x59ea6c[_0x59a12a(0x102)]):undefined,_0x59a12a(0xeb)+yamlString(_0x59ea6c['description']),_0x59a12a(0xfa),'',_0x2993e1][_0x59a12a(0x100)](_0x153f71=>_0x153f71!==undefined)['join']('\x0a');}function yamlString(_0x309d5c){const _0x8ee180=a103_0x491e;return JSON['stringify'](_0x309d5c[_0x8ee180(0xfd)](/\r/g,'')[_0x8ee180(0x101)]());}function skillDisplayName(_0x29ffdd,_0x2c0704){const _0x1a5185=a103_0x491e,_0x48c53a=_0x29ffdd[_0x1a5185(0x112)]?.['trim']();return _0x48c53a||_0x2c0704;}function withSyncedDisplayName(_0x475c4d,_0x483805){const _0x507172=a103_0x491e,_0x5dbce4=_0x475c4d[_0x507172(0xff)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5dbce4)return _0x475c4d;const _0x243051=_0x5dbce4[0x1]??'',_0x18c58c=_0x5dbce4[0x2]??'',_0x31a4fe=parseDocument(_0x18c58c);if(_0x31a4fe[_0x507172(0xed)][_0x507172(0x105)]>0x0||!isMap(_0x31a4fe[_0x507172(0x10b)]))return _0x475c4d;if(_0x483805)_0x31a4fe['set']('displayName',_0x483805);else{if(_0x31a4fe[_0x507172(0x10d)]('displayName'))_0x31a4fe[_0x507172(0xf2)](_0x507172(0x102));else return _0x475c4d;}forceBlockCollections(_0x31a4fe[_0x507172(0x10b)]);const _0x39a196=_0x31a4fe[_0x507172(0xf4)]({'lineWidth':0x0})[_0x507172(0x117)](),_0xd95d65=_0x475c4d[_0x507172(0xe8)](_0x5dbce4[0x0]['length'])[_0x507172(0xfd)](/^\r?\n/,'');return _0x243051+_0x507172(0x115)+_0x39a196+_0x507172(0xef)+_0xd95d65;}function forceBlockCollections(_0x918ff9){if(!isNode(_0x918ff9))return;visit(_0x918ff9,(_0x3f365c,_0x221269)=>{isCollection(_0x221269)&&(_0x221269['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2604e6,_0x1e6dbd,_0xcb07f4,_0x25d1c6){const _0x1a3064=a103_0x491e;if(_0x25d1c6||!existsSync(_0x1e6dbd))return;const _0x58abea=readMetadataIfPresent(_0x1e6dbd);if(!_0x58abea)return;const _0x161a17=_0x58abea[_0x1a3064(0x111)]&&Object['keys'](_0x58abea[_0x1a3064(0x111)])[_0x1a3064(0x105)]>0x0?_0x58abea[_0x1a3064(0x111)]:undefined;if(_0x161a17)for(const [_0x404c53,_0x3e97a8]of Object[_0x1a3064(0x11a)](_0x161a17)){const _0x3e1a4d=resolveManagedFilePath(_0x2604e6,_0x404c53);if(!existsSync(_0x3e1a4d))throw CliErrors[_0x1a3064(0xe9)](_0x1a3064(0x116)+_0x2604e6,_0x1a3064(0xf0)+_0x404c53);const _0x20e93f=lstatSync(_0x3e1a4d);if(!_0x20e93f[_0x1a3064(0xf9)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2604e6,_0x1a3064(0xea)+_0x404c53);const _0x8a36f1=bufferSha256(readFileSync(_0x3e1a4d));if(_0x8a36f1!==_0x3e97a8)throw CliErrors[_0x1a3064(0xe9)](_0x1a3064(0x116)+_0x2604e6+'.\x20Changed\x20file:\x20'+_0x404c53,_0x1a3064(0xf1)+_0x404c53);}else{const _0x46221f=resolve(_0x2604e6,SKILL_FILE);if(existsSync(_0x46221f)&&_0x58abea['contentHash']){const _0x13a559=contentHash(readFileSync(_0x46221f,_0x1a3064(0x114)));if(_0x13a559!==_0x58abea[_0x1a3064(0xf7)])throw CliErrors[_0x1a3064(0xe9)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x46221f,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x11030e of normalizeLocalFiles(_0xcb07f4)){if(_0x161a17?.[_0x11030e['path']])continue;if(!_0x161a17&&_0x11030e[_0x1a3064(0xee)]===SKILL_FILE)continue;const _0x5ca4db=resolveManagedFilePath(_0x2604e6,_0x11030e['path']);if(!existsSync(_0x5ca4db))continue;const _0x1707ae=lstatSync(_0x5ca4db);if(!_0x1707ae[_0x1a3064(0xf9)]())throw CliErrors['validation'](_0x1a3064(0x116)+_0x2604e6,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x11030e[_0x1a3064(0xee)]);const _0x2efbd0=bufferSha256(readFileSync(_0x5ca4db));if(_0x2efbd0!==fileHash(_0x11030e))throw CliErrors[_0x1a3064(0xe9)](_0x1a3064(0x116)+_0x2604e6,_0x1a3064(0x109)+_0x11030e[_0x1a3064(0xee)]);}}function materializeFiles(_0x8d9399,_0x4eb256){const _0x512903=a103_0x491e;for(const _0x2141f4 of normalizeLocalFiles(_0x4eb256)){const _0x1aea19=resolveManagedFilePath(_0x8d9399,_0x2141f4[_0x512903(0xee)]);mkdirSync(dirname(_0x1aea19),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1aea19,fileContent(_0x2141f4),0x180);}}function removeStaleManagedFiles(_0x46a9b2,_0x30956b,_0x383d5b){const _0x1ecc13=a103_0x491e;if(!_0x30956b)return;const _0x597646=new Set(normalizeLocalFiles(_0x383d5b)[_0x1ecc13(0xf5)](_0x39f07e=>_0x39f07e[_0x1ecc13(0xee)]));for(const _0x2fc1a2 of Object[_0x1ecc13(0x10f)](_0x30956b)){if(_0x597646[_0x1ecc13(0x10d)](_0x2fc1a2))continue;const _0x25f600=resolveManagedFilePath(_0x46a9b2,_0x2fc1a2);existsSync(_0x25f600)&&lstatSync(_0x25f600)[_0x1ecc13(0xf9)]()&&rmSync(_0x25f600,{'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x68426b,_0x4fc24f){const _0x200757=a103_0xd238,_0x5206e4=_0x68426b();while(!![]){try{const _0x59a825=-parseInt(_0x200757(0x163))/0x1*(parseInt(_0x200757(0x17d))/0x2)+parseInt(_0x200757(0x178))/0x3*(parseInt(_0x200757(0x174))/0x4)+parseInt(_0x200757(0x175))/0x5*(parseInt(_0x200757(0x167))/0x6)+-parseInt(_0x200757(0x176))/0x7+parseInt(_0x200757(0x15f))/0x8*(-parseInt(_0x200757(0x16b))/0x9)+parseInt(_0x200757(0x169))/0xa+parseInt(_0x200757(0x181))/0xb*(-parseInt(_0x200757(0x171))/0xc);if(_0x59a825===_0x4fc24f)break;else _0x5206e4['push'](_0x5206e4['shift']());}catch(_0x386b81){_0x5206e4['push'](_0x5206e4['shift']());}}}(a103_0x586a,0x7b8d1));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a103_0xd238(_0x2c4e62,_0x51cfeb){_0x2c4e62=_0x2c4e62-0x15c;const _0x586a12=a103_0x586a();let _0xd2387f=_0x586a12[_0x2c4e62];return _0xd2387f;}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a103_0x586a(){const _0xd5709=['8367108MbiCUB','path','length','20XPEXXW','792035RlXMfe','2397647qEZeui','skillName','498369pBOaQj','utf8','fromEntries','files','tags','633322nBaXSj','readonly','ossPath','object','11IcQlbw','isArray','version','manifest','string','description','forkedFromSkillId','251288doKsTf','hasUpstreamUpdate','tenantCode','zipSha256','3EqLmEW','trim','Runtime\x20Skill\x20is\x20missing\x20skillCode.','personal','36bFTZtj','validation','8718260NNGKMJ','sourceSessionId','45iBaOWl','forkedFromVersion','toISOString','Invalid\x20','zipSize','map'];a103_0x586a=function(){return _0xd5709;};return a103_0x586a();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4cd4b9,_0x5ea078,_0x22bfca,_0x4ef16f,_0xdfbe8,_0x1b4abc,_0x2891f6){const _0x31116b=a103_0xd238,_0x5130b9=_0x1b4abc?normalizeLocalFiles(_0x1b4abc):[],_0x2cab05=!_0x2891f6&&_0x5130b9[_0x31116b(0x173)]>0x0?buildSkillPackage(_0x5130b9):undefined,_0x5ae80f=_0x2891f6?bufferSha256(_0x2891f6):_0x2cab05?.[_0x31116b(0x184)][_0x31116b(0x162)],_0x3b9380=_0x2891f6?.[_0x31116b(0x173)]??_0x2cab05?.[_0x31116b(0x184)][_0x31116b(0x16f)],_0x568561=_0x5130b9[_0x31116b(0x173)]>0x0?Object[_0x31116b(0x17a)](_0x5130b9[_0x31116b(0x170)](_0x9764ec=>[_0x9764ec[_0x31116b(0x172)],fileHash(_0x9764ec)])):undefined;return{'schemaVersion':_0x5130b9['length']>0x0?0x2:0x1,'id':_0x4cd4b9['id'],'appCode':_0x22bfca,'skillCode':requireSkillCode(_0x4cd4b9),'skillName':_0x4cd4b9[_0x31116b(0x177)],'description':_0x4cd4b9[_0x31116b(0x15d)],'scope':_0x5ea078,'readonly':_0x5ea078!==_0x31116b(0x166)||_0x4cd4b9[_0x31116b(0x17e)]===!![],'tenantCode':_0x4cd4b9[_0x31116b(0x161)],'userId':_0x4cd4b9['userId'],'version':_0x4cd4b9[_0x31116b(0x183)],'status':_0x4cd4b9['status'],'tags':Array[_0x31116b(0x182)](_0x4cd4b9[_0x31116b(0x17c)])?_0x4cd4b9[_0x31116b(0x17c)]:[],'hasUpstreamUpdate':_0x4cd4b9[_0x31116b(0x160)],'forkedFromSkillId':_0x4cd4b9[_0x31116b(0x15e)],'forkedFromVersion':_0x4cd4b9[_0x31116b(0x16c)],'sourceSessionId':_0x4cd4b9[_0x31116b(0x16a)],'contentHash':_0x4ef16f,'fileHashes':_0x568561,'treeHash':_0x5130b9['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x5130b9)):undefined,'ossPath':remoteManifestOssPath(_0x4cd4b9[_0x31116b(0x17b)]),'zipSha256':_0x5ae80f,'zipSize':_0x3b9380,'files':_0x5130b9['length']>0x0?_0x5130b9[_0x31116b(0x170)](_0x1b05bc=>({'path':_0x1b05bc[_0x31116b(0x172)],'hash':fileHash(_0x1b05bc),'size':fileContent(_0x1b05bc)[_0x31116b(0x173)]})):undefined,'pulledAt':_0xdfbe8??new Date()[_0x31116b(0x16d)]()};}export function requireSkillCode(_0x52c6f2){const _0x52bc7a=a103_0xd238,_0x303225=_0x52c6f2['skillCode']?.[_0x52bc7a(0x164)]();if(!_0x303225)throw CliErrors[_0x52bc7a(0x168)](_0x52bc7a(0x165));return _0x303225;}export function readMetadataIfPresent(_0x379db0){const _0x3f7b56=a103_0xd238;if(!existsSync(_0x379db0))return undefined;try{const _0x918990=JSON['parse'](readFileSync(_0x379db0,_0x3f7b56(0x179)));return _0x918990;}catch{throw CliErrors[_0x3f7b56(0x168)](_0x3f7b56(0x16e)+METADATA_FILE+':\x20'+_0x379db0);}}function remoteManifestOssPath(_0x3d9810){const _0x3ccf7c=a103_0xd238;if(!_0x3d9810||typeof _0x3d9810!==_0x3ccf7c(0x180)||Array[_0x3ccf7c(0x182)](_0x3d9810))return undefined;const _0x563f9c=_0x3d9810[_0x3ccf7c(0x17f)];return typeof _0x563f9c===_0x3ccf7c(0x15c)&&_0x563f9c[_0x3ccf7c(0x164)]()?_0x563f9c[_0x3ccf7c(0x164)]():undefined;}
1
+ function a104_0xd06d(){const _0x5ad9b3=['zipSha256','10QApddw','forkedFromVersion','string','status','Runtime\x20Skill\x20is\x20missing\x20skillCode.','tags','trim','11UfWnLZ','length','forkedFromSkillId','validation','map','skillCode','skillName','toISOString','path','4456VEKFIa','11711080IKsyVx','Invalid\x20','userId','4688TCGzcY','zipSize','manifest','personal','tenantCode','sourceSessionId','fromEntries','version','1698ReoVoF','2126350fvtWVn','files','isArray','ossPath','778506mdPPej','1099mYCYwJ','3192822LkUXEe','hasUpstreamUpdate','93404gcpzLo','description'];a104_0xd06d=function(){return _0x5ad9b3;};return a104_0xd06d();}(function(_0x229ecc,_0x26f9bf){const _0x4b86f5=a104_0x2c47,_0x31fe90=_0x229ecc();while(!![]){try{const _0x3e845f=-parseInt(_0x4b86f5(0x177))/0x1*(parseInt(_0x4b86f5(0x174))/0x2)+-parseInt(_0x4b86f5(0x16b))/0x3*(parseInt(_0x4b86f5(0x187))/0x4)+parseInt(_0x4b86f5(0x16c))/0x5+parseInt(_0x4b86f5(0x170))/0x6+-parseInt(_0x4b86f5(0x171))/0x7*(-parseInt(_0x4b86f5(0x163))/0x8)+-parseInt(_0x4b86f5(0x172))/0x9+-parseInt(_0x4b86f5(0x188))/0xa*(-parseInt(_0x4b86f5(0x17e))/0xb);if(_0x3e845f===_0x26f9bf)break;else _0x31fe90['push'](_0x31fe90['shift']());}catch(_0x445b7b){_0x31fe90['push'](_0x31fe90['shift']());}}}(a104_0xd06d,0x59505));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(_0x55e07a,_0x5901b6,_0x6b7e36,_0x32cb0e,_0x33a0b2,_0x397a6d,_0x376013){const _0x553912=a104_0x2c47,_0x46a954=_0x397a6d?normalizeLocalFiles(_0x397a6d):[],_0x4d508e=!_0x376013&&_0x46a954['length']>0x0?buildSkillPackage(_0x46a954):undefined,_0x3ee3e3=_0x376013?bufferSha256(_0x376013):_0x4d508e?.[_0x553912(0x165)][_0x553912(0x176)],_0xfad316=_0x376013?.[_0x553912(0x17f)]??_0x4d508e?.[_0x553912(0x165)][_0x553912(0x164)],_0x50e65d=_0x46a954[_0x553912(0x17f)]>0x0?Object[_0x553912(0x169)](_0x46a954[_0x553912(0x182)](_0x3ab7e2=>[_0x3ab7e2[_0x553912(0x186)],fileHash(_0x3ab7e2)])):undefined;return{'schemaVersion':_0x46a954[_0x553912(0x17f)]>0x0?0x2:0x1,'id':_0x55e07a['id'],'appCode':_0x6b7e36,'skillCode':requireSkillCode(_0x55e07a),'skillName':_0x55e07a[_0x553912(0x184)],'description':_0x55e07a[_0x553912(0x175)],'scope':_0x5901b6,'readonly':_0x5901b6!==_0x553912(0x166)||_0x55e07a['readonly']===!![],'tenantCode':_0x55e07a[_0x553912(0x167)],'userId':_0x55e07a[_0x553912(0x162)],'version':_0x55e07a[_0x553912(0x16a)],'status':_0x55e07a[_0x553912(0x17a)],'tags':Array[_0x553912(0x16e)](_0x55e07a['tags'])?_0x55e07a[_0x553912(0x17c)]:[],'hasUpstreamUpdate':_0x55e07a[_0x553912(0x173)],'forkedFromSkillId':_0x55e07a[_0x553912(0x180)],'forkedFromVersion':_0x55e07a[_0x553912(0x178)],'sourceSessionId':_0x55e07a[_0x553912(0x168)],'contentHash':_0x32cb0e,'fileHashes':_0x50e65d,'treeHash':_0x46a954[_0x553912(0x17f)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x46a954)):undefined,'ossPath':remoteManifestOssPath(_0x55e07a[_0x553912(0x16d)]),'zipSha256':_0x3ee3e3,'zipSize':_0xfad316,'files':_0x46a954[_0x553912(0x17f)]>0x0?_0x46a954['map'](_0x3d50b4=>({'path':_0x3d50b4['path'],'hash':fileHash(_0x3d50b4),'size':fileContent(_0x3d50b4)[_0x553912(0x17f)]})):undefined,'pulledAt':_0x33a0b2??new Date()[_0x553912(0x185)]()};}function a104_0x2c47(_0x274961,_0x479f09){_0x274961=_0x274961-0x161;const _0xd06d91=a104_0xd06d();let _0x2c4701=_0xd06d91[_0x274961];return _0x2c4701;}export function requireSkillCode(_0x53247f){const _0x65d942=a104_0x2c47,_0x4c7171=_0x53247f[_0x65d942(0x183)]?.['trim']();if(!_0x4c7171)throw CliErrors[_0x65d942(0x181)](_0x65d942(0x17b));return _0x4c7171;}export function readMetadataIfPresent(_0x19e969){const _0x2cfd56=a104_0x2c47;if(!existsSync(_0x19e969))return undefined;try{const _0x2ea332=JSON['parse'](readFileSync(_0x19e969,'utf8'));return _0x2ea332;}catch{throw CliErrors['validation'](_0x2cfd56(0x161)+METADATA_FILE+':\x20'+_0x19e969);}}function remoteManifestOssPath(_0x416da1){const _0x57fb80=a104_0x2c47;if(!_0x416da1||typeof _0x416da1!=='object'||Array[_0x57fb80(0x16e)](_0x416da1))return undefined;const _0x574a13=_0x416da1[_0x57fb80(0x16f)];return typeof _0x574a13===_0x57fb80(0x179)&&_0x574a13[_0x57fb80(0x17d)]()?_0x574a13['trim']():undefined;}
@@ -1 +1 @@
1
- const a104_0x4c27a5=a104_0x26cd;(function(_0x4c9d76,_0x1e7b21){const _0x536c36=a104_0x26cd,_0x4e527e=_0x4c9d76();while(!![]){try{const _0x373537=parseInt(_0x536c36(0x19e))/0x1*(-parseInt(_0x536c36(0x197))/0x2)+-parseInt(_0x536c36(0x19b))/0x3*(-parseInt(_0x536c36(0x18a))/0x4)+parseInt(_0x536c36(0x1a6))/0x5*(parseInt(_0x536c36(0x195))/0x6)+parseInt(_0x536c36(0x19f))/0x7+-parseInt(_0x536c36(0x1a2))/0x8*(-parseInt(_0x536c36(0x19d))/0x9)+-parseInt(_0x536c36(0x19a))/0xa+parseInt(_0x536c36(0x192))/0xb*(-parseInt(_0x536c36(0x1a4))/0xc);if(_0x373537===_0x1e7b21)break;else _0x4e527e['push'](_0x4e527e['shift']());}catch(_0x310880){_0x4e527e['push'](_0x4e527e['shift']());}}}(a104_0x3243,0x4962f));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a104_0x3243(){const _0x25b220=['SKILL_ROOT','7990iuHYOr','4fXQtpq','homeDir','cache','skillCode','path\x20segment','homeDirName','claudeSkillsDir','filter','55781wdriot','validation','cacheRoot','12oWIRFf','includes','202teqSFE','workbuddySkillsDir','skills','4372320KVJBqr','1358841viiYYq','trim','2832723MUYgOf','1501hQypfa','1007223kXmAyL','Unsafe\x20','.claude','8cAglVP','CLAUDE_SKILL_ROOT','60PclkYL'];a104_0x3243=function(){return _0x25b220;};return a104_0x3243();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x6e9c4f={}){const _0xb697b=a104_0x26cd,_0x5a3709=_0x6e9c4f[_0xb697b(0x18b)]??homedir(),_0x2671ff=resolve(_0x5a3709,PRODUCT_CONFIG[_0xb697b(0x18f)],_0xb697b(0x18c)),_0x668790=trimmedEnv(_0xb697b(0x1a5)),_0x306704=trimmedEnv(_0xb697b(0x1a3)),_0xcc55b=resolve(_0x5a3709,'.workbuddy'),_0x37d617=_0x6e9c4f['workbuddySkillsDir']??(existsSync(_0xcc55b)?resolve(_0xcc55b,_0xb697b(0x199)):undefined);return{'homeDir':_0x5a3709,'cacheRoot':_0x2671ff,'managedRoot':resolve(_0x5a3709,PRODUCT_CONFIG[_0xb697b(0x18f)]),'agentsSkillsDir':_0x6e9c4f['agentsSkillsDir']??_0x668790??resolve(_0x5a3709,'.agents',_0xb697b(0x199)),'claudeSkillsDir':_0x6e9c4f[_0xb697b(0x190)]??_0x306704??resolve(_0x5a3709,_0xb697b(0x1a1),_0xb697b(0x199)),'workbuddySkillsDir':_0x37d617};}export function runtimeAgentSkillRoots(_0x4601ab){const _0x47a516=a104_0x26cd;return[_0x4601ab['agentsSkillsDir'],_0x4601ab['claudeSkillsDir'],_0x4601ab[_0x47a516(0x198)]][_0x47a516(0x191)](_0x3ade30=>Boolean(_0x3ade30));}export function getRuntimeSkillCacheRoot(_0xf5520,_0x41370b,_0xa69f96={}){const _0x52292f=a104_0x26cd,_0x16e629=resolveSkillSyncPaths(_0xa69f96);return resolve(_0x16e629[_0x52292f(0x194)],_0xf5520,fingerprintAccessKey(_0x41370b),_0x52292f(0x199));}export function getRuntimeSkillDir(_0x3e3048,_0x250b61,_0x432c17,_0x35f349,_0x781a29,_0x3db100={}){const _0x4066f4=a104_0x26cd;return resolve(getRuntimeSkillCacheRoot(_0x3e3048,_0x250b61,_0x3db100),safePathSegment(_0x432c17,'appCode'),_0x35f349,safePathSegment(_0x781a29,_0x4066f4(0x18d)));}export function safePathSegment(_0x136350,_0x2e3ed3=a104_0x4c27a5(0x18e)){const _0x5fd713=a104_0x4c27a5;if(!_0x136350||_0x136350['includes']('/')||_0x136350[_0x5fd713(0x196)]('\x5c')||_0x136350[_0x5fd713(0x196)]('..'))throw CliErrors[_0x5fd713(0x193)](_0x5fd713(0x1a0)+_0x2e3ed3+'\x20for\x20local\x20path:\x20'+_0x136350);return _0x136350;}function a104_0x26cd(_0x344b0c,_0x4175cf){_0x344b0c=_0x344b0c-0x18a;const _0x32430b=a104_0x3243();let _0x26cd84=_0x32430b[_0x344b0c];return _0x26cd84;}function trimmedEnv(_0x59dc10){const _0x2cfac9=a104_0x4c27a5,_0x12c4b3=productEnv(_0x59dc10)?.[_0x2cfac9(0x19c)]();return _0x12c4b3?_0x12c4b3:undefined;}
1
+ (function(_0x4b4c40,_0x221e19){const _0x2c3f58=a105_0x54c4,_0x1ef8ac=_0x4b4c40();while(!![]){try{const _0x3afa04=parseInt(_0x2c3f58(0x159))/0x1+parseInt(_0x2c3f58(0x147))/0x2+parseInt(_0x2c3f58(0x148))/0x3*(parseInt(_0x2c3f58(0x153))/0x4)+parseInt(_0x2c3f58(0x158))/0x5*(-parseInt(_0x2c3f58(0x14d))/0x6)+-parseInt(_0x2c3f58(0x14c))/0x7+parseInt(_0x2c3f58(0x14e))/0x8*(parseInt(_0x2c3f58(0x15a))/0x9)+parseInt(_0x2c3f58(0x152))/0xa;if(_0x3afa04===_0x221e19)break;else _0x1ef8ac['push'](_0x1ef8ac['shift']());}catch(_0x14e2e4){_0x1ef8ac['push'](_0x1ef8ac['shift']());}}}(a105_0x2f6d,0x5077f));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a105_0x54c4(_0x34b90e,_0x2da4aa){_0x34b90e=_0x34b90e-0x144;const _0x2f6dc7=a105_0x2f6d();let _0x54c4cc=_0x2f6dc7[_0x34b90e];return _0x54c4cc;}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';function a105_0x2f6d(){const _0x435190=['agentsSkillsDir','.claude','2193865adxySF','481815nKCklv','3924JksBOa','trim','skillCode','homeDir','homeDirName','workbuddySkillsDir','.agents','618284RyoTKO','6WKRFRn','cacheRoot','claudeSkillsDir','CLAUDE_SKILL_ROOT','4250505wjxdor','6VwEyyk','3256qGEJDi','includes','cache','validation','3642580WobhMc','85840YOfUlp','skills','\x20for\x20local\x20path:\x20'];a105_0x2f6d=function(){return _0x435190;};return a105_0x2f6d();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x33178e={}){const _0xd53b16=a105_0x54c4,_0x59bd06=_0x33178e[_0xd53b16(0x15d)]??homedir(),_0x3b0af9=resolve(_0x59bd06,PRODUCT_CONFIG[_0xd53b16(0x144)],_0xd53b16(0x150)),_0x5db723=trimmedEnv('SKILL_ROOT'),_0x2e75d4=trimmedEnv(_0xd53b16(0x14b)),_0x20ef9e=resolve(_0x59bd06,'.workbuddy'),_0x47403a=_0x33178e[_0xd53b16(0x145)]??(existsSync(_0x20ef9e)?resolve(_0x20ef9e,_0xd53b16(0x154)):undefined);return{'homeDir':_0x59bd06,'cacheRoot':_0x3b0af9,'managedRoot':resolve(_0x59bd06,PRODUCT_CONFIG[_0xd53b16(0x144)]),'agentsSkillsDir':_0x33178e[_0xd53b16(0x156)]??_0x5db723??resolve(_0x59bd06,_0xd53b16(0x146),_0xd53b16(0x154)),'claudeSkillsDir':_0x33178e[_0xd53b16(0x14a)]??_0x2e75d4??resolve(_0x59bd06,_0xd53b16(0x157),_0xd53b16(0x154)),'workbuddySkillsDir':_0x47403a};}export function runtimeAgentSkillRoots(_0x1207ef){const _0x11d2cb=a105_0x54c4;return[_0x1207ef[_0x11d2cb(0x156)],_0x1207ef['claudeSkillsDir'],_0x1207ef[_0x11d2cb(0x145)]]['filter'](_0xf01c78=>Boolean(_0xf01c78));}export function getRuntimeSkillCacheRoot(_0x58b538,_0x5b6de9,_0x3e94c9={}){const _0x21b196=a105_0x54c4,_0x16e9b8=resolveSkillSyncPaths(_0x3e94c9);return resolve(_0x16e9b8[_0x21b196(0x149)],_0x58b538,fingerprintAccessKey(_0x5b6de9),_0x21b196(0x154));}export function getRuntimeSkillDir(_0x11a20,_0x21fba8,_0x2373a2,_0x57101d,_0x4b831d,_0x2ed70f={}){const _0x221357=a105_0x54c4;return resolve(getRuntimeSkillCacheRoot(_0x11a20,_0x21fba8,_0x2ed70f),safePathSegment(_0x2373a2,'appCode'),_0x57101d,safePathSegment(_0x4b831d,_0x221357(0x15c)));}export function safePathSegment(_0x2b6bd7,_0x3d46ad='path\x20segment'){const _0x35bea7=a105_0x54c4;if(!_0x2b6bd7||_0x2b6bd7[_0x35bea7(0x14f)]('/')||_0x2b6bd7[_0x35bea7(0x14f)]('\x5c')||_0x2b6bd7['includes']('..'))throw CliErrors[_0x35bea7(0x151)]('Unsafe\x20'+_0x3d46ad+_0x35bea7(0x155)+_0x2b6bd7);return _0x2b6bd7;}function trimmedEnv(_0xd9df21){const _0x375bf7=a105_0x54c4,_0x5ec04b=productEnv(_0xd9df21)?.[_0x375bf7(0x15b)]();return _0x5ec04b?_0x5ec04b:undefined;}
@@ -1 +1 @@
1
- (function(_0x339557,_0xdda376){const _0x44dbcf=a105_0x59d7,_0x2b17be=_0x339557();while(!![]){try{const _0x407a49=parseInt(_0x44dbcf(0x1fc))/0x1+parseInt(_0x44dbcf(0x1f2))/0x2+parseInt(_0x44dbcf(0x1eb))/0x3+-parseInt(_0x44dbcf(0x1cd))/0x4+-parseInt(_0x44dbcf(0x1e5))/0x5+-parseInt(_0x44dbcf(0x1d8))/0x6+parseInt(_0x44dbcf(0x1cf))/0x7;if(_0x407a49===_0xdda376)break;else _0x2b17be['push'](_0x2b17be['shift']());}catch(_0x1b4a07){_0x2b17be['push'](_0x2b17be['shift']());}}}(a105_0x1dd7,0x8793c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x1e4456}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(_0x95562d,_0x46aba8,_0x43b4ce={}){const _0x88627a=a105_0x59d7,_0x4e09ff=resolvePushDirectoryRoot(_0x95562d),_0x1e1ae8=readPushMetadataIfPresent(resolve(_0x4e09ff,METADATA_FILE),{'ignoreInvalidMetadata':_0x43b4ce[_0x88627a(0x1dd)]});if(_0x1e1ae8?.[_0x88627a(0x1e8)]&&_0x1e1ae8['appCode']!==_0x46aba8&&!_0x43b4ce['allowAppCodeRetarget']&&!_0x43b4ce[_0x88627a(0x1e4)])throw CliErrors[_0x88627a(0x1d7)]('Skill\x20metadata\x20appCode\x20\x22'+_0x1e1ae8[_0x88627a(0x1e8)]+_0x88627a(0x1de)+_0x46aba8+'\x22.');const _0x27def8=resolvePushSkillCode(_0x4e09ff,_0x46aba8,_0x1e1ae8,_0x43b4ce);if(!_0x27def8)throw CliErrors['validation']('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x88627a(0x1d0));return{'dir':_0x4e09ff,'skillCode':_0x27def8,'metadata':_0x1e1ae8};}export function readPushDirectory(_0x521049,_0x37b2d0,_0x417df9={}){const _0x3822e7=a105_0x59d7,_0x58b3ee=resolvePushDirectoryIdentity(_0x521049,_0x37b2d0,_0x417df9),_0x2b90e6=_0x58b3ee['dir'],_0x5b344b=resolve(_0x2b90e6,SKILL_FILE);if(!existsSync(_0x5b344b)||!lstatSync(_0x5b344b)[_0x3822e7(0x1cc)]())throw CliErrors['validation'](_0x3822e7(0x1da)+SKILL_FILE+':\x20'+_0x5b344b);const _0x4d7641=_0x58b3ee[_0x3822e7(0x1f0)],_0x5b577d=_0x417df9['targetScope']??'personal';if(!_0x417df9[_0x3822e7(0x1ce)]&&_0x4d7641?.[_0x3822e7(0x1df)]===_0x3822e7(0x1f9))throw CliErrors[_0x3822e7(0x1d7)](_0x3822e7(0x1fe)+METADATA_FILE+_0x3822e7(0x1f1)+_0x4d7641[_0x3822e7(0x1df)]+'\x22.');if(!_0x417df9[_0x3822e7(0x1ce)]&&_0x5b577d===_0x3822e7(0x1ca)&&_0x4d7641?.[_0x3822e7(0x1df)]&&_0x4d7641[_0x3822e7(0x1df)]!==_0x3822e7(0x1ca))throw CliErrors[_0x3822e7(0x1d7)](_0x3822e7(0x1d2)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x4d7641['scope']+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x2b90e6+_0x3822e7(0x1c6));const _0x2f778b=scanSkillDirectory(_0x2b90e6),_0x2e4e70=buildSkillPackage(_0x2f778b),_0x3ad133=readFileSync(_0x5b344b,_0x3822e7(0x1f5)),_0x5b159d=_0x58b3ee[_0x3822e7(0x1ff)],_0xaf1d7a=_0x417df9['ignoreMetadataForPayload']?undefined:_0x4d7641,_0x1798e8=readSkillDisplayName(_0x3ad133);return{'skillCode':_0x5b159d,'metadata':_0x4d7641,'frontmatterDisplayName':_0x1798e8,'input':{'skillCode':_0x5b159d,'skillName':_0x1798e8??_0xaf1d7a?.[_0x3822e7(0x200)],'description':_0xaf1d7a?.['description'],'content':_0x3ad133,'files':_0x2e4e70[_0x3822e7(0x1d9)],'packageBase64':_0x2e4e70[_0x3822e7(0x1f6)],'tags':_0xaf1d7a?.[_0x3822e7(0x1e0)],'version':_0xaf1d7a?.['version'],'sourceSessionId':_0xaf1d7a?.[_0x3822e7(0x1f4)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x10b7da,_0x2faea3,_0x62b3f3,_0x5c40a5={}){const _0x5bb87c=a105_0x59d7,_0x335672=resolvePushDirectoryRoot(_0x10b7da),_0x39dbc4=readPushMetadataIfPresent(resolve(_0x335672,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x351235=requireRemoteScope(_0x2faea3),_0x5130d4=readLocalSkillContent(_0x335672),_0x45776c={..._0x2faea3,'appCode':_0x2faea3[_0x5bb87c(0x1e8)]??_0x62b3f3,'skillName':_0x2faea3['skillName']??_0x39dbc4?.[_0x5bb87c(0x200)],'description':_0x2faea3[_0x5bb87c(0x1fd)]??_0x39dbc4?.[_0x5bb87c(0x1fd)],'tags':Array[_0x5bb87c(0x1d1)](_0x2faea3[_0x5bb87c(0x1e0)])?_0x2faea3['tags']:_0x39dbc4?.[_0x5bb87c(0x1e0)],'sourceSessionId':_0x2faea3[_0x5bb87c(0x1f4)]??_0x39dbc4?.[_0x5bb87c(0x1f4)],'content':_0x2faea3[_0x5bb87c(0x1e3)]??_0x5130d4},_0x1ed64b=buildMetadata(_0x45776c,_0x351235,_0x62b3f3,contentHash(_0x5130d4),_0x5c40a5[_0x5bb87c(0x1d4)]);writeJsonAtomic(resolve(_0x335672,METADATA_FILE),_0x1ed64b);}export function recordPushedRuntimeSkill(_0x439817,_0xcaa929,_0x47dbfe,_0x25591d={}){const _0x2b76e8=a105_0x59d7,_0x30e1a2=resolvePushDirectoryRoot(_0x439817),_0x25a2e0=scanSkillDirectory(_0x30e1a2),_0x5cfac6=_0x25a2e0['find'](_0x2287fe=>_0x2287fe[_0x2b76e8(0x1ef)]===SKILL_FILE),_0x1c62c6=_0x5cfac6?fileText(_0x5cfac6):'',_0x493745=tryNormalizePackageManifest(_0xcaa929['files']),_0x4426d9={..._0xcaa929,'content':_0xcaa929[_0x2b76e8(0x1e3)]??_0x1c62c6,'files':_0x493745},_0x384723=_0x493745?normalizeLocalFiles(_0x25a2e0)[_0x2b76e8(0x1f3)](_0x5428b5=>_0x493745[_0x2b76e8(0x1c8)][_0x2b76e8(0x1fb)](_0x1d60ba=>_0x1d60ba[_0x2b76e8(0x1ef)]===_0x5428b5[_0x2b76e8(0x1ef)])):undefined,_0x34996b=buildMetadata(_0x4426d9,_0x25591d[_0x2b76e8(0x1df)]??_0x2b76e8(0x1ca),_0x47dbfe,contentHash(_0x4426d9[_0x2b76e8(0x1e3)]??''),_0x25591d[_0x2b76e8(0x1e1)],_0x384723);writeJsonAtomic(resolve(_0x30e1a2,METADATA_FILE),_0x34996b);}function a105_0x1dd7(){const _0x3f9e95=['scope','tags','pushedAt','object','content','ignoreMetadataAppCodeMismatch','3188570tcjHDW','slice','boolean','appCode','\x20has\x20unsupported\x20scope\x20\x22','(unknown)','2563851yydNAT','\x20name\x20for\x20SkillHub\x20slug\x20generation.','number','unknown','path','metadata','\x20has\x20scope=\x22','933294JdLqtl','filter','sourceSessionId','utf8','packageBase64','isDirectory','name','builtin','Remote\x20Skill\x20','some','195922JVCdUS','description','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','skillCode','skillName','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','replace','files','ignoreMetadataSkillCode','personal','Skill\x20directory\x20not\x20found:\x20','isFile','3502568JunAam','ignoreMetadataScope','5164327LQqesM',',\x20or\x20directory\x20name.','isArray','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','displayName','refreshedAt','Invalid\x20','trim','validation','1117602Wiuvmb','manifest','Missing\x20','match','startsWith','ignoreInvalidMetadata','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'];a105_0x1dd7=function(){return _0x3f9e95;};return a105_0x1dd7();}export function deriveSkillCodeFromDirectory(_0x4fa6c5,_0x31b00f){const _0x52658f=a105_0x59d7,_0x13ce43=basename(resolve(_0x4fa6c5)),_0x5c083c=_0x31b00f+'--';return _0x13ce43[_0x52658f(0x1dc)](_0x5c083c)?_0x13ce43[_0x52658f(0x1e6)](_0x5c083c['length']):_0x13ce43;}function resolvePushSkillCode(_0x3e07e3,_0x3ccf33,_0x3733fd,_0x17e672){const _0x49dc9c=a105_0x59d7,_0x16012e=deriveSkillCodeFromSkillFile(_0x3e07e3)||deriveSkillCodeFromDirectory(_0x3e07e3,_0x3ccf33);if(_0x17e672[_0x49dc9c(0x1c9)])return _0x16012e;return _0x3733fd?.[_0x49dc9c(0x1ff)]?.[_0x49dc9c(0x1d6)]()||_0x16012e;}function deriveSkillCodeFromSkillFile(_0x3c677f){const _0x5ef19a=a105_0x59d7,_0x421d10=resolve(_0x3c677f,SKILL_FILE);if(!existsSync(_0x421d10)||!lstatSync(_0x421d10)[_0x5ef19a(0x1cc)]())return undefined;const _0x3ffccc=readFileSync(_0x421d10,_0x5ef19a(0x1f5)),_0x5292cf=_0x3ffccc[_0x5ef19a(0x1db)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5292cf)return undefined;const _0x370dd9=parseFrontmatterObject(_0x5292cf[0x1]??''),_0x447dd8=scalarToString(_0x370dd9?.[_0x5ef19a(0x1f8)]);return _0x447dd8?slugifySkillName(_0x447dd8):undefined;}function readSkillDisplayName(_0xc25405){const _0x82ce18=a105_0x59d7,_0x34e102=_0xc25405[_0x82ce18(0x1db)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x34e102)return undefined;const _0x1ba8aa=parseFrontmatterObject(_0x34e102[0x1]??'');return scalarToString(_0x1ba8aa?.[_0x82ce18(0x1d3)]);}function slugifySkillName(_0x19b0ab){const _0x201582=a105_0x59d7,_0x59f2e7=_0x19b0ab[_0x201582(0x1d6)]()['toLowerCase']()[_0x201582(0x1c7)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x201582(0x1c7)](/^-+/,'')['replace'](/-+$/,'')[_0x201582(0x1c7)](/-{2,}/g,'-');if(!_0x59f2e7)throw CliErrors[_0x201582(0x1d7)](_0x201582(0x1d5)+SKILL_FILE+_0x201582(0x1ec));return _0x59f2e7;}function parseFrontmatterObject(_0x1ad55c){const _0x2c9900=a105_0x59d7;try{const _0x4b46bc=a105_0x1e4456(_0x1ad55c);return _0x4b46bc&&typeof _0x4b46bc===_0x2c9900(0x1e2)&&!Array[_0x2c9900(0x1d1)](_0x4b46bc)?_0x4b46bc:undefined;}catch{return undefined;}}function scalarToString(_0x2c3006){const _0x1376eb=a105_0x59d7;if(typeof _0x2c3006==='string')return _0x2c3006[_0x1376eb(0x1d6)]();if(typeof _0x2c3006===_0x1376eb(0x1ed)||typeof _0x2c3006===_0x1376eb(0x1e7))return String(_0x2c3006);return undefined;}function resolvePushDirectoryRoot(_0x2328f8){const _0x514126=a105_0x59d7,_0x3356b4=resolve(_0x2328f8);if(!existsSync(_0x3356b4))throw CliErrors[_0x514126(0x1d7)](_0x514126(0x1cb)+_0x2328f8);const _0x1657ab=lstatSync(_0x3356b4);if(_0x1657ab[_0x514126(0x1f7)]())return _0x3356b4;if(_0x1657ab['isSymbolicLink']()){const _0x27a306=realpathSync(_0x3356b4);if(lstatSync(_0x27a306)[_0x514126(0x1f7)]())return _0x27a306;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x2328f8);}function a105_0x59d7(_0x3348e0,_0x3c0322){_0x3348e0=_0x3348e0-0x1c6;const _0x1dd7f0=a105_0x1dd7();let _0x59d7de=_0x1dd7f0[_0x3348e0];return _0x59d7de;}function requireRemoteScope(_0x4fb158){const _0xcd2948=a105_0x59d7;if(_0x4fb158[_0xcd2948(0x1df)]===_0xcd2948(0x1ca)||_0x4fb158[_0xcd2948(0x1df)]==='company'||_0x4fb158[_0xcd2948(0x1df)]===_0xcd2948(0x1f9))return _0x4fb158['scope'];throw CliErrors['validation'](_0xcd2948(0x1fa)+(_0x4fb158[_0xcd2948(0x1ff)]||_0xcd2948(0x1ea))+_0xcd2948(0x1e9)+(_0x4fb158['scope']??_0xcd2948(0x1ee))+'\x22.');}function readLocalSkillContent(_0x1300e7){const _0x2fddd5=a105_0x59d7,_0x180377=resolve(_0x1300e7,SKILL_FILE);return existsSync(_0x180377)&&lstatSync(_0x180377)['isFile']()?readFileSync(_0x180377,_0x2fddd5(0x1f5)):'';}function readPushMetadataIfPresent(_0x3710fa,_0x46c19c={}){const _0xfacf3f=a105_0x59d7;try{return readMetadataIfPresent(_0x3710fa);}catch(_0x21de44){if(_0x46c19c[_0xfacf3f(0x1dd)])return undefined;throw _0x21de44;}}
1
+ (function(_0x47d695,_0x282098){const _0x500bca=a106_0x4bda,_0x2db830=_0x47d695();while(!![]){try{const _0x2599dc=-parseInt(_0x500bca(0x203))/0x1*(-parseInt(_0x500bca(0x1e6))/0x2)+-parseInt(_0x500bca(0x21a))/0x3*(-parseInt(_0x500bca(0x1f7))/0x4)+parseInt(_0x500bca(0x21f))/0x5*(-parseInt(_0x500bca(0x21e))/0x6)+-parseInt(_0x500bca(0x204))/0x7+parseInt(_0x500bca(0x1f9))/0x8*(-parseInt(_0x500bca(0x1ef))/0x9)+-parseInt(_0x500bca(0x1fe))/0xa*(-parseInt(_0x500bca(0x20f))/0xb)+parseInt(_0x500bca(0x217))/0xc;if(_0x2599dc===_0x282098)break;else _0x2db830['push'](_0x2db830['shift']());}catch(_0xf4de65){_0x2db830['push'](_0x2db830['shift']());}}}(a106_0x5180,0xf1d94));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0x245d44}from'yaml';import{CliErrors}from'../../errors.js';function a106_0x4bda(_0x17d0d6,_0x595646){_0x17d0d6=_0x17d0d6-0x1df;const _0x518009=a106_0x5180();let _0x4bda48=_0x518009[_0x17d0d6];return _0x4bda48;}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(_0x14e7fa,_0x4ee3f5,_0x12953e={}){const _0x472eff=a106_0x4bda,_0x5ef451=resolvePushDirectoryRoot(_0x14e7fa),_0x1b24c5=readPushMetadataIfPresent(resolve(_0x5ef451,METADATA_FILE),{'ignoreInvalidMetadata':_0x12953e['ignoreInvalidMetadata']});if(_0x1b24c5?.[_0x472eff(0x21c)]&&_0x1b24c5[_0x472eff(0x21c)]!==_0x4ee3f5&&!_0x12953e['allowAppCodeRetarget']&&!_0x12953e[_0x472eff(0x206)])throw CliErrors[_0x472eff(0x202)]('Skill\x20metadata\x20appCode\x20\x22'+_0x1b24c5[_0x472eff(0x21c)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4ee3f5+'\x22.');const _0x1ba06a=resolvePushSkillCode(_0x5ef451,_0x4ee3f5,_0x1b24c5,_0x12953e);if(!_0x1ba06a)throw CliErrors['validation'](_0x472eff(0x218)+SKILL_FILE+',\x20'+METADATA_FILE+_0x472eff(0x20b));return{'dir':_0x5ef451,'skillCode':_0x1ba06a,'metadata':_0x1b24c5};}export function readPushDirectory(_0x1fb0bc,_0x680838,_0x46dcfe={}){const _0xe3673d=a106_0x4bda,_0x578f42=resolvePushDirectoryIdentity(_0x1fb0bc,_0x680838,_0x46dcfe),_0x55fe49=_0x578f42['dir'],_0xba66f9=resolve(_0x55fe49,SKILL_FILE);if(!existsSync(_0xba66f9)||!lstatSync(_0xba66f9)[_0xe3673d(0x207)]())throw CliErrors[_0xe3673d(0x202)](_0xe3673d(0x1f0)+SKILL_FILE+':\x20'+_0xba66f9);const _0x2366b4=_0x578f42[_0xe3673d(0x1fa)],_0x10baf5=_0x46dcfe['targetScope']??'personal';if(!_0x46dcfe['ignoreMetadataScope']&&_0x2366b4?.['scope']==='builtin')throw CliErrors[_0xe3673d(0x202)](_0xe3673d(0x1e3)+METADATA_FILE+_0xe3673d(0x209)+_0x2366b4[_0xe3673d(0x1fd)]+'\x22.');if(!_0x46dcfe['ignoreMetadataScope']&&_0x10baf5==='personal'&&_0x2366b4?.[_0xe3673d(0x1fd)]&&_0x2366b4[_0xe3673d(0x1fd)]!==_0xe3673d(0x1e9))throw CliErrors['validation'](_0xe3673d(0x1e1)+METADATA_FILE+_0xe3673d(0x209)+_0x2366b4[_0xe3673d(0x1fd)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x55fe49+_0xe3673d(0x1f1));const _0x3c4d2a=scanSkillDirectory(_0x55fe49),_0x31b017=buildSkillPackage(_0x3c4d2a),_0x34d033=readFileSync(_0xba66f9,'utf8'),_0x1cf11a=_0x578f42['skillCode'],_0x14d15b=_0x46dcfe[_0xe3673d(0x20e)]?undefined:_0x2366b4,_0x3c04ac=readSkillDisplayName(_0x34d033);return{'skillCode':_0x1cf11a,'metadata':_0x2366b4,'frontmatterDisplayName':_0x3c04ac,'input':{'skillCode':_0x1cf11a,'skillName':_0x3c04ac??_0x14d15b?.['skillName'],'description':_0x14d15b?.['description'],'content':_0x34d033,'files':_0x31b017[_0xe3673d(0x1ec)],'packageBase64':_0x31b017[_0xe3673d(0x216)],'tags':_0x14d15b?.[_0xe3673d(0x1e2)],'version':_0x14d15b?.['version'],'sourceSessionId':_0x14d15b?.[_0xe3673d(0x20a)]}};}export function refreshPushDirectoryMetadataFromRemote(_0xe0b673,_0x2ef884,_0x3718dc,_0x2dbf6a={}){const _0x5d2b19=a106_0x4bda,_0x498587=resolvePushDirectoryRoot(_0xe0b673),_0x521abf=readPushMetadataIfPresent(resolve(_0x498587,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x252565=requireRemoteScope(_0x2ef884),_0x2cac9e=readLocalSkillContent(_0x498587),_0x319c89={..._0x2ef884,'appCode':_0x2ef884[_0x5d2b19(0x21c)]??_0x3718dc,'skillName':_0x2ef884[_0x5d2b19(0x1f5)]??_0x521abf?.[_0x5d2b19(0x1f5)],'description':_0x2ef884[_0x5d2b19(0x21d)]??_0x521abf?.[_0x5d2b19(0x21d)],'tags':Array['isArray'](_0x2ef884['tags'])?_0x2ef884['tags']:_0x521abf?.[_0x5d2b19(0x1e2)],'sourceSessionId':_0x2ef884['sourceSessionId']??_0x521abf?.['sourceSessionId'],'content':_0x2ef884[_0x5d2b19(0x212)]??_0x2cac9e},_0x281f63=buildMetadata(_0x319c89,_0x252565,_0x3718dc,contentHash(_0x2cac9e),_0x2dbf6a[_0x5d2b19(0x1ee)]);writeJsonAtomic(resolve(_0x498587,METADATA_FILE),_0x281f63);}export function recordPushedRuntimeSkill(_0x15110b,_0xfd6b52,_0x487331,_0x178e65={}){const _0x339df4=a106_0x4bda,_0x5018dc=resolvePushDirectoryRoot(_0x15110b),_0x21260a=scanSkillDirectory(_0x5018dc),_0x43b8f4=_0x21260a[_0x339df4(0x1f4)](_0x2e969c=>_0x2e969c[_0x339df4(0x1fc)]===SKILL_FILE),_0xf98243=_0x43b8f4?fileText(_0x43b8f4):'',_0x38c4a5=tryNormalizePackageManifest(_0xfd6b52[_0x339df4(0x1ff)]),_0x2e5f3c={..._0xfd6b52,'content':_0xfd6b52['content']??_0xf98243,'files':_0x38c4a5},_0x3449b9=_0x38c4a5?normalizeLocalFiles(_0x21260a)[_0x339df4(0x20c)](_0x43465c=>_0x38c4a5[_0x339df4(0x1ff)][_0x339df4(0x1ea)](_0x3ebfcc=>_0x3ebfcc[_0x339df4(0x1fc)]===_0x43465c[_0x339df4(0x1fc)])):undefined,_0x459a73=buildMetadata(_0x2e5f3c,_0x178e65[_0x339df4(0x1fd)]??_0x339df4(0x1e9),_0x487331,contentHash(_0x2e5f3c[_0x339df4(0x212)]??''),_0x178e65['pushedAt'],_0x3449b9);writeJsonAtomic(resolve(_0x5018dc,METADATA_FILE),_0x459a73);}export function deriveSkillCodeFromDirectory(_0x190a9d,_0x5ee054){const _0x42b104=a106_0x4bda,_0x5922d6=basename(resolve(_0x190a9d)),_0x3a90b9=_0x5ee054+'--';return _0x5922d6[_0x42b104(0x1e7)](_0x3a90b9)?_0x5922d6[_0x42b104(0x1f3)](_0x3a90b9[_0x42b104(0x219)]):_0x5922d6;}function resolvePushSkillCode(_0x124968,_0x3eb9b1,_0xf67659,_0x46c8b4){const _0x54fbc5=a106_0x4bda,_0x46f20f=deriveSkillCodeFromSkillFile(_0x124968)||deriveSkillCodeFromDirectory(_0x124968,_0x3eb9b1);if(_0x46c8b4[_0x54fbc5(0x1e0)])return _0x46f20f;return _0xf67659?.['skillCode']?.[_0x54fbc5(0x21b)]()||_0x46f20f;}function deriveSkillCodeFromSkillFile(_0x297ede){const _0xc8732b=a106_0x4bda,_0x564dd7=resolve(_0x297ede,SKILL_FILE);if(!existsSync(_0x564dd7)||!lstatSync(_0x564dd7)[_0xc8732b(0x207)]())return undefined;const _0x57eb40=readFileSync(_0x564dd7,_0xc8732b(0x213)),_0x127a0c=_0x57eb40[_0xc8732b(0x208)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x127a0c)return undefined;const _0x355863=parseFrontmatterObject(_0x127a0c[0x1]??''),_0x44354b=scalarToString(_0x355863?.[_0xc8732b(0x1e8)]);return _0x44354b?slugifySkillName(_0x44354b):undefined;}function readSkillDisplayName(_0xb722b4){const _0x53d693=a106_0x4bda,_0x246981=_0xb722b4[_0x53d693(0x208)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x246981)return undefined;const _0x519c09=parseFrontmatterObject(_0x246981[0x1]??'');return scalarToString(_0x519c09?.[_0x53d693(0x20d)]);}function slugifySkillName(_0x5121e5){const _0x4d79a7=a106_0x4bda,_0x4d7b20=_0x5121e5[_0x4d79a7(0x21b)]()[_0x4d79a7(0x1ed)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x4d79a7(0x1f6)](/-+$/,'')[_0x4d79a7(0x1f6)](/-{2,}/g,'-');if(!_0x4d7b20)throw CliErrors[_0x4d79a7(0x202)](_0x4d79a7(0x211)+SKILL_FILE+_0x4d79a7(0x201));return _0x4d7b20;}function a106_0x5180(){const _0x6555d9=['tags','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','object','builtin','1870262XUqTGM','startsWith','name','personal','some','number','manifest','toLowerCase','refreshedAt','333VMCmcB','Missing\x20','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','isArray','slice','find','skillName','replace','20852gqxxXI','(unknown)','168936NARKBK','metadata','Remote\x20Skill\x20','path','scope','4723240cRQIla','files','company','\x20name\x20for\x20SkillHub\x20slug\x20generation.','validation','2lzRAjU','10622731sopCuN','boolean','ignoreMetadataAppCodeMismatch','isFile','match','\x20has\x20scope=\x22','sourceSessionId',',\x20or\x20directory\x20name.','filter','displayName','ignoreMetadataForPayload','22iVtNxp','unknown','Invalid\x20','content','utf8','isDirectory','Skill\x20directory\x20not\x20found:\x20','packageBase64','21576828ayaKQj','Unable\x20to\x20resolve\x20skillCode\x20from\x20','length','321kgBSIQ','trim','appCode','description','4596SskHDX','12280FyNAME','string','ignoreInvalidMetadata','isSymbolicLink','\x20has\x20unsupported\x20scope\x20\x22','ignoreMetadataSkillCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'];a106_0x5180=function(){return _0x6555d9;};return a106_0x5180();}function parseFrontmatterObject(_0x37804c){const _0x5a4f94=a106_0x4bda;try{const _0x66328f=a106_0x245d44(_0x37804c);return _0x66328f&&typeof _0x66328f===_0x5a4f94(0x1e4)&&!Array[_0x5a4f94(0x1f2)](_0x66328f)?_0x66328f:undefined;}catch{return undefined;}}function scalarToString(_0x34db07){const _0xa0169d=a106_0x4bda;if(typeof _0x34db07===_0xa0169d(0x220))return _0x34db07[_0xa0169d(0x21b)]();if(typeof _0x34db07===_0xa0169d(0x1eb)||typeof _0x34db07===_0xa0169d(0x205))return String(_0x34db07);return undefined;}function resolvePushDirectoryRoot(_0x8bb1b4){const _0x311168=a106_0x4bda,_0x150ba1=resolve(_0x8bb1b4);if(!existsSync(_0x150ba1))throw CliErrors[_0x311168(0x202)](_0x311168(0x215)+_0x8bb1b4);const _0x138c68=lstatSync(_0x150ba1);if(_0x138c68['isDirectory']())return _0x150ba1;if(_0x138c68[_0x311168(0x222)]()){const _0x252514=realpathSync(_0x150ba1);if(lstatSync(_0x252514)[_0x311168(0x214)]())return _0x252514;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x8bb1b4);}function requireRemoteScope(_0x1e6a83){const _0x89ff49=a106_0x4bda;if(_0x1e6a83[_0x89ff49(0x1fd)]===_0x89ff49(0x1e9)||_0x1e6a83[_0x89ff49(0x1fd)]===_0x89ff49(0x200)||_0x1e6a83[_0x89ff49(0x1fd)]===_0x89ff49(0x1e5))return _0x1e6a83['scope'];throw CliErrors[_0x89ff49(0x202)](_0x89ff49(0x1fb)+(_0x1e6a83['skillCode']||_0x89ff49(0x1f8))+_0x89ff49(0x1df)+(_0x1e6a83[_0x89ff49(0x1fd)]??_0x89ff49(0x210))+'\x22.');}function readLocalSkillContent(_0x1eafbc){const _0x1c72a3=a106_0x4bda,_0xd97fa4=resolve(_0x1eafbc,SKILL_FILE);return existsSync(_0xd97fa4)&&lstatSync(_0xd97fa4)[_0x1c72a3(0x207)]()?readFileSync(_0xd97fa4,_0x1c72a3(0x213)):'';}function readPushMetadataIfPresent(_0x10a820,_0x3fd7b4={}){const _0xba9b38=a106_0x4bda;try{return readMetadataIfPresent(_0x10a820);}catch(_0x18b899){if(_0x3fd7b4[_0xba9b38(0x221)])return undefined;throw _0x18b899;}}