@lovrabet/lovrabet-cli 2.3.4-beta.1 → 2.3.4

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 (184) hide show
  1. package/README.md +8 -6
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.js +1 -1
  4. package/lib/commands/app/cache.js +1 -1
  5. package/lib/commands/app/definitions.js +1 -1
  6. package/lib/commands/app/eligibility.js +1 -1
  7. package/lib/commands/app/mock-loader.js +1 -1
  8. package/lib/commands/app/remote-source.js +1 -1
  9. package/lib/commands/app/shared.js +1 -1
  10. package/lib/commands/app-config/get.js +1 -1
  11. package/lib/commands/app-config/index.js +1 -1
  12. package/lib/commands/approval/index.js +1 -1
  13. package/lib/commands/artifact/index.js +1 -1
  14. package/lib/commands/auth/device.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/init.d.ts +1 -1
  27. package/lib/commands/config/init.js +1 -1
  28. package/lib/commands/config/shared.js +1 -1
  29. package/lib/commands/data/index.js +1 -1
  30. package/lib/commands/dataset/detail.js +1 -1
  31. package/lib/commands/dataset/index.js +1 -1
  32. package/lib/commands/dataset/list.js +1 -1
  33. package/lib/commands/dataset/sdk-doc.js +1 -1
  34. package/lib/commands/doctor.js +1 -1
  35. package/lib/commands/file/index.js +1 -1
  36. package/lib/commands/init.js +1 -1
  37. package/lib/commands/kb/index.js +1 -1
  38. package/lib/commands/logs/index.js +1 -1
  39. package/lib/commands/notification/config-list.js +1 -1
  40. package/lib/commands/notification/index.js +1 -1
  41. package/lib/commands/notification/shared.js +1 -1
  42. package/lib/commands/ocr/index.js +1 -1
  43. package/lib/commands/permit/dataset-get.js +1 -1
  44. package/lib/commands/permit/dataset-set.js +1 -1
  45. package/lib/commands/permit/index.js +1 -1
  46. package/lib/commands/permit/page-get.js +1 -1
  47. package/lib/commands/permit/page-set.js +1 -1
  48. package/lib/commands/permit/role-menus-set.js +1 -1
  49. package/lib/commands/permit/role-menus.js +1 -1
  50. package/lib/commands/permit/shared.js +1 -1
  51. package/lib/commands/personal-bff/index.js +1 -1
  52. package/lib/commands/registry.js +1 -1
  53. package/lib/commands/role/create.js +1 -1
  54. package/lib/commands/role/delete.js +1 -1
  55. package/lib/commands/role/detail.js +1 -1
  56. package/lib/commands/role/index.js +1 -1
  57. package/lib/commands/role/list.js +1 -1
  58. package/lib/commands/role/shared.js +1 -1
  59. package/lib/commands/role/update.js +1 -1
  60. package/lib/commands/role/user-add.js +1 -1
  61. package/lib/commands/role/user-remove.js +1 -1
  62. package/lib/commands/schedule/index.js +1 -1
  63. package/lib/commands/schema.js +1 -1
  64. package/lib/commands/service/dynamic.js +1 -1
  65. package/lib/commands/service/function-name-adapter.js +1 -1
  66. package/lib/commands/service/index.js +1 -1
  67. package/lib/commands/service/registry.js +1 -1
  68. package/lib/commands/skill/commands/create.js +1 -1
  69. package/lib/commands/skill/commands/diagram.js +1 -1
  70. package/lib/commands/skill/commands/install.js +1 -1
  71. package/lib/commands/skill/commands/list.js +1 -1
  72. package/lib/commands/skill/commands/push.js +1 -1
  73. package/lib/commands/skill/commands/validate.js +1 -1
  74. package/lib/commands/skill/diagram.js +1 -1
  75. package/lib/commands/skill/flags.js +1 -1
  76. package/lib/commands/skill/index.js +1 -1
  77. package/lib/commands/skill/manifest-helpers.js +1 -1
  78. package/lib/commands/skill/push-execute.js +1 -1
  79. package/lib/commands/skill/push-flow-helpers.js +1 -1
  80. package/lib/commands/skill/push-retarget.js +1 -1
  81. package/lib/commands/skill/scopes.js +1 -1
  82. package/lib/commands/skill/summary.js +1 -1
  83. package/lib/commands/skill/templates.js +1 -1
  84. package/lib/commands/skill/validate.js +1 -1
  85. package/lib/commands/sql/detail.js +1 -1
  86. package/lib/commands/sql/exec.js +1 -1
  87. package/lib/commands/sql/index.js +1 -1
  88. package/lib/commands/update.js +1 -1
  89. package/lib/commands/user-account/bind.js +1 -1
  90. package/lib/commands/user-account/index.js +1 -1
  91. package/lib/commands/workspace/index.js +1 -1
  92. package/lib/config/domain-config.d.ts +2 -2
  93. package/lib/config/domain-config.js +1 -1
  94. package/lib/config/schema.d.ts +1 -1
  95. package/lib/config/schema.js +1 -1
  96. package/lib/constant/app.js +1 -1
  97. package/lib/constant/auth-mode.js +1 -1
  98. package/lib/constant/cli.js +1 -1
  99. package/lib/constant/defaults.js +1 -1
  100. package/lib/constant/distribution.js +1 -1
  101. package/lib/constant/domain.d.ts +4 -0
  102. package/lib/constant/domain.js +1 -1
  103. package/lib/constant/env.js +1 -1
  104. package/lib/constant/output.js +1 -1
  105. package/lib/constant/product.js +1 -1
  106. package/lib/constant/region.d.ts +1 -1
  107. package/lib/constant/region.js +1 -1
  108. package/lib/constant/risk.js +1 -1
  109. package/lib/constant/url.js +1 -1
  110. package/lib/context.js +1 -1
  111. package/lib/core/api-client.js +1 -1
  112. package/lib/core/db-resolver.js +1 -1
  113. package/lib/core/kb-search-client.js +1 -1
  114. package/lib/core/sdk-client.js +1 -1
  115. package/lib/errors.js +1 -1
  116. package/lib/framework/build-all-flags.js +1 -1
  117. package/lib/framework/dryrun.js +1 -1
  118. package/lib/framework/flags.js +1 -1
  119. package/lib/framework/help.js +1 -1
  120. package/lib/framework/index.js +1 -1
  121. package/lib/framework/output.js +1 -1
  122. package/lib/framework/preparse.js +1 -1
  123. package/lib/framework/rate-limit.js +1 -1
  124. package/lib/framework/raw-flags.js +1 -1
  125. package/lib/framework/response.js +1 -1
  126. package/lib/framework/runner-confirmation.js +1 -1
  127. package/lib/framework/runner-error.js +1 -1
  128. package/lib/framework/runner.js +1 -1
  129. package/lib/framework/schema-export.js +1 -1
  130. package/lib/framework/service-order.js +1 -1
  131. package/lib/framework/types.js +1 -1
  132. package/lib/generated/build-info.d.ts +4 -4
  133. package/lib/generated/build-info.js +1 -1
  134. package/lib/generated/official-routing.d.ts +12 -3
  135. package/lib/generated/official-routing.js +1 -1
  136. package/lib/generated/routing-contract.d.ts +2 -2
  137. package/lib/generated/routing-contract.js +1 -1
  138. package/lib/help.js +1 -1
  139. package/lib/postinstall.js +1 -1
  140. package/lib/runtime/confirmation.js +1 -1
  141. package/lib/runtime/event.js +1 -1
  142. package/lib/runtime/index.js +1 -1
  143. package/lib/runtime/queue.js +1 -1
  144. package/lib/runtime/resolve.js +1 -1
  145. package/lib/skills/builtin-skill.js +1 -1
  146. package/lib/skills/npx-skills-add.d.ts +5 -0
  147. package/lib/skills/npx-skills-add.js +1 -1
  148. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  149. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  150. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  151. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  152. package/lib/skills/runtime-skill-sync/links.js +1 -1
  153. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  154. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  155. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  156. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  157. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  158. package/lib/skills/runtime-skill-sync/push.js +1 -1
  159. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  160. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  161. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  162. package/lib/skills/runtime-skill-sync.js +1 -1
  163. package/lib/skills/skill-presence.js +1 -1
  164. package/lib/utils/access-key-redaction.js +1 -1
  165. package/lib/utils/apply-jq-filter.js +1 -1
  166. package/lib/utils/cli-version-check.js +1 -1
  167. package/lib/utils/cli-version-policy.js +1 -1
  168. package/lib/utils/logger.js +1 -1
  169. package/lib/utils/lossless-json.js +1 -1
  170. package/lib/utils/params.js +1 -1
  171. package/lib/utils/positive-safe-integer.js +1 -1
  172. package/lib/utils/redaction.js +1 -1
  173. package/lib/utils/update-notice.js +1 -1
  174. package/lib/utils/version.js +1 -1
  175. package/lib/utils/write-cli-side-channel.js +1 -1
  176. package/package.json +1 -1
  177. package/skills/lovrabet/SKILL.md +2 -2
  178. package/skills/lovrabet/guides/troubleshooting.md +1 -1
  179. package/skills/lovrabet/references/lovrabet-config-commands.md +8 -7
  180. package/skills/lovrabet/references/lovrabet-config.md +3 -2
  181. package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
  182. package/skills/lovrabet/references/lovrabet-kb-workflow.md +8 -6
  183. package/skills/lovrabet/references/lovrabet-service-tree.md +1 -1
  184. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a127_0x3d2ec0=a127_0x2454;(function(_0x5b6982,_0xb2a2a4){const _0x169988=a127_0x2454,_0x1d8877=_0x5b6982();while(!![]){try{const _0x5ba195=parseInt(_0x169988(0x114))/0x1+parseInt(_0x169988(0x118))/0x2*(parseInt(_0x169988(0x10f))/0x3)+-parseInt(_0x169988(0x113))/0x4+-parseInt(_0x169988(0x119))/0x5+-parseInt(_0x169988(0x112))/0x6*(-parseInt(_0x169988(0x11b))/0x7)+parseInt(_0x169988(0x111))/0x8+parseInt(_0x169988(0x11a))/0x9;if(_0x5ba195===_0xb2a2a4)break;else _0x1d8877['push'](_0x1d8877['shift']());}catch(_0xcb1067){_0x1d8877['push'](_0x1d8877['shift']());}}}(a127_0x3fd7,0xa0715));export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a127_0x3d2ec0(0x11c);function a127_0x2454(_0x5e85fb,_0x127bf7){_0x5e85fb=_0x5e85fb-0x10e;const _0x3fd7c8=a127_0x3fd7();let _0x2454f2=_0x3fd7c8[_0x5e85fb];return _0x2454f2;}export const ENTERPRISE_ROUTING_PROTOCOL='lovrabet-routing/v1';export const ENTERPRISE_ROUTING_KIND=a127_0x3d2ec0(0x115);function a127_0x3fd7(){const _0x16afb8=['462041GnXkIr','enterprise','apiDomain','skillDomain','23726oOUude','5778635xtysbB','2896704WiaWol','21mZlQUt','51e352a2636c432b76d331cc9ff81c215d7cbe3d1d07ab7bd7bedb7bdb91631c','userDomain','222dQGuoh','runtimeDomain','2941256AJCdqI','709326pDuYNC','2284716OvFcPz'];a127_0x3fd7=function(){return _0x16afb8;};return a127_0x3fd7();}export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a127_0x3d2ec0(0x10e),'apiDomain','runtimeDomain',a127_0x3d2ec0(0x117)];export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a127_0x3d2ec0(0x10e),a127_0x3d2ec0(0x116),a127_0x3d2ec0(0x110),a127_0x3d2ec0(0x117)];
1
+ const a127_0x5a4a1b=a127_0x7a27;(function(_0xdb94ca,_0x4214c2){const _0x1deda1=a127_0x7a27,_0x2647b3=_0xdb94ca();while(!![]){try{const _0x555d63=-parseInt(_0x1deda1(0x184))/0x1*(parseInt(_0x1deda1(0x175))/0x2)+-parseInt(_0x1deda1(0x181))/0x3+-parseInt(_0x1deda1(0x17c))/0x4*(parseInt(_0x1deda1(0x17f))/0x5)+parseInt(_0x1deda1(0x183))/0x6*(parseInt(_0x1deda1(0x179))/0x7)+parseInt(_0x1deda1(0x172))/0x8*(-parseInt(_0x1deda1(0x173))/0x9)+parseInt(_0x1deda1(0x182))/0xa+parseInt(_0x1deda1(0x178))/0xb;if(_0x555d63===_0x4214c2)break;else _0x2647b3['push'](_0x2647b3['shift']());}catch(_0x248fd2){_0x2647b3['push'](_0x2647b3['shift']());}}}(a127_0x1353,0xa1e65));function a127_0x1353(){const _0x34e45d=['skillDomain','38169483iEBfQh','552587HQWwsr','userDomain','lovrabet-routing/v1','2492asdVSK','runtimeDomain','apiDomain','9655GFOpQM','enterprise','3900990KYCwVW','2056280hzMMrz','12kKTZhR','2321wqXlfJ','32wFCeWX','962811YkPubo','e3423cad71c22edb18a8481be7bdb733ff2d4136c31aa3ae6da56271e32cced7','206FesHvM','kbServiceDomain'];a127_0x1353=function(){return _0x34e45d;};return a127_0x1353();}function a127_0x7a27(_0x36438c,_0x111c3e){_0x36438c=_0x36438c-0x172;const _0x1353be=a127_0x1353();let _0x7a27e7=_0x1353be[_0x36438c];return _0x7a27e7;}export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a127_0x5a4a1b(0x174);export const ENTERPRISE_ROUTING_PROTOCOL=a127_0x5a4a1b(0x17b);export const ENTERPRISE_ROUTING_KIND=a127_0x5a4a1b(0x180);export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a127_0x5a4a1b(0x17a),a127_0x5a4a1b(0x17e),a127_0x5a4a1b(0x17d),a127_0x5a4a1b(0x177),a127_0x5a4a1b(0x176)];export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=['userDomain',a127_0x5a4a1b(0x17e),a127_0x5a4a1b(0x17d),a127_0x5a4a1b(0x177)];
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x2be39e,_0x218d13){const _0x241821=a128_0x5620,_0x3ce3ca=_0x2be39e();while(!![]){try{const _0x417246=parseInt(_0x241821(0x16b))/0x1+parseInt(_0x241821(0x174))/0x2*(parseInt(_0x241821(0x16e))/0x3)+-parseInt(_0x241821(0x171))/0x4+parseInt(_0x241821(0x175))/0x5+parseInt(_0x241821(0x16d))/0x6+parseInt(_0x241821(0x172))/0x7*(parseInt(_0x241821(0x170))/0x8)+parseInt(_0x241821(0x173))/0x9*(-parseInt(_0x241821(0x16f))/0xa);if(_0x417246===_0x218d13)break;else _0x3ce3ca['push'](_0x3ce3ca['shift']());}catch(_0x52cc35){_0x3ce3ca['push'](_0x3ce3ca['shift']());}}}(a128_0x38a9,0x48c65));import{jsx as a128_0x1c6dd1,jsxs as a128_0x56c4ee}from'react/jsx-runtime';function a128_0x5620(_0x52c4fc,_0x10f3ca){_0x52c4fc=_0x52c4fc-0x16b;const _0x38a9cc=a128_0x38a9();let _0x56209a=_0x38a9cc[_0x52c4fc];return _0x56209a;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';function a128_0x38a9(){const _0x1eb958=['2381515PBSSws','\x20\x20Use\x20','494717HoUqLQ','\x20to\x20view\x20available\x20commands.','3503856YKxyRb','66078ouOmFM','20XaVWbY','152FMFGho','1629720FMAqeJ','114667YcKEnP','5520591sZrDHm','6MUUhfD'];a128_0x38a9=function(){return _0x1eb958;};return a128_0x38a9();}export function Help(){const _0x3d6295=a128_0x5620,{exit:_0x2207a5}=useApp();return useEffect(()=>{_0x2207a5();},[_0x2207a5]),a128_0x56c4ee(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a128_0x1c6dd1(Box,{'children':a128_0x1c6dd1(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a128_0x56c4ee(Box,{'marginTop':0x1,'children':[a128_0x1c6dd1(Text,{'dimColor':!![],'children':_0x3d6295(0x176)}),a128_0x1c6dd1(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+'\x20--help'}),a128_0x1c6dd1(Text,{'dimColor':!![],'children':_0x3d6295(0x16c)})]})]});}
1
+ (function(_0xbfd089,_0x46946c){const _0x5e159b=a128_0x5f25,_0x41bc00=_0xbfd089();while(!![]){try{const _0x24419c=-parseInt(_0x5e159b(0x1a5))/0x1+parseInt(_0x5e159b(0x1a4))/0x2*(-parseInt(_0x5e159b(0x19f))/0x3)+parseInt(_0x5e159b(0x1a7))/0x4+parseInt(_0x5e159b(0x1a6))/0x5*(-parseInt(_0x5e159b(0x1a8))/0x6)+parseInt(_0x5e159b(0x1a1))/0x7*(parseInt(_0x5e159b(0x1ab))/0x8)+-parseInt(_0x5e159b(0x1a9))/0x9+parseInt(_0x5e159b(0x1a2))/0xa;if(_0x24419c===_0x46946c)break;else _0x41bc00['push'](_0x41bc00['shift']());}catch(_0x431f47){_0x41bc00['push'](_0x41bc00['shift']());}}}(a128_0x2a73,0x798f8));import{jsx as a128_0x3276cd,jsxs as a128_0x5b07fb}from'react/jsx-runtime';function a128_0x5f25(_0x80c1da,_0x133f56){_0x80c1da=_0x80c1da-0x19e;const _0x2a7321=a128_0x2a73();let _0x5f256c=_0x2a7321[_0x80c1da];return _0x5f256c;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a128_0x2a73(){const _0x1fcc3f=['column','2786UNTjDM','20409940YXwhCe','\x20\x20Use\x20','92dlnFsQ','422525irhlnZ','1490385HTSRay','246080RUJnBF','18atBCKp','3405438tEQTER','green','5424rTYoYs','\x20to\x20view\x20available\x20commands.','11694DLwIdL'];a128_0x2a73=function(){return _0x1fcc3f;};return a128_0x2a73();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x40f1e6=a128_0x5f25,{exit:_0x587930}=useApp();return useEffect(()=>{_0x587930();},[_0x587930]),a128_0x5b07fb(Box,{'flexDirection':_0x40f1e6(0x1a0),'marginTop':0x1,'marginBottom':0x1,'children':[a128_0x3276cd(Box,{'children':a128_0x3276cd(Text,{'bold':!![],'color':'green','children':'\x20\x20'+CLI_DISPLAY_NAME})}),a128_0x5b07fb(Box,{'marginTop':0x1,'children':[a128_0x3276cd(Text,{'dimColor':!![],'children':_0x40f1e6(0x1a3)}),a128_0x3276cd(Text,{'bold':!![],'color':_0x40f1e6(0x1aa),'children':CLI_BIN_NAME+'\x20--help'}),a128_0x3276cd(Text,{'dimColor':!![],'children':_0x40f1e6(0x19e)})]})]});}
@@ -1 +1 @@
1
- (function(_0x298b87,_0x41f974){const _0x2a050f=a129_0x3384,_0x4b1c73=_0x298b87();while(!![]){try{const _0x8efed1=parseInt(_0x2a050f(0xcd))/0x1+parseInt(_0x2a050f(0xd1))/0x2+parseInt(_0x2a050f(0xc0))/0x3*(-parseInt(_0x2a050f(0xc5))/0x4)+parseInt(_0x2a050f(0xc2))/0x5*(parseInt(_0x2a050f(0xcf))/0x6)+parseInt(_0x2a050f(0xd3))/0x7+-parseInt(_0x2a050f(0xc1))/0x8*(parseInt(_0x2a050f(0xca))/0x9)+parseInt(_0x2a050f(0xc4))/0xa*(-parseInt(_0x2a050f(0xc9))/0xb);if(_0x8efed1===_0x41f974)break;else _0x4b1c73['push'](_0x4b1c73['shift']());}catch(_0xd39e33){_0x4b1c73['push'](_0x4b1c73['shift']());}}}(a129_0x3b4a,0xdf205));function a129_0x3b4a(){const _0x537c7d=['changed','installed','44187484uuZXfF','5742VJilaw','Repair\x20with:\x20','Installation\x20failed','1208852RnahDP','log','10249614mcKkvj','\x20at\x20','2322860OEPumj','code','10086181puCllL','already\x20current','1428531QCBeXQ','1408QvHwks','5JTuHtl','warn','10fDfpuB','4VIhibD','error'];a129_0x3b4a=function(){return _0x537c7d;};return a129_0x3b4a();}function a129_0x3384(_0xeb1c44,_0x328915){_0xeb1c44=_0xeb1c44-0xc0;const _0x3b4ab0=a129_0x3b4a();let _0x338483=_0x3b4ab0[_0xeb1c44];return _0x338483;}import{installBuiltinSkill}from'./skills/builtin-skill.js';export async function runPostinstall(_0x1792f4={}){const _0x4c3158=a129_0x3384,_0x4f6761=installBuiltinSkill(_0x1792f4);if(_0x4f6761['ok']){const _0x3aecea=_0x4f6761[_0x4c3158(0xc7)]?_0x4c3158(0xc8):_0x4c3158(0xd4),_0x5103fd=_0x4f6761['installedPath']?_0x4c3158(0xd0)+_0x4f6761['installedPath']:'\x20via\x20skills@latest';return console[_0x4c3158(0xce)]('Lovrabet\x20Built-in\x20Skill\x20'+_0x4f6761['skillVersion']+'\x20'+_0x3aecea+_0x5103fd),_0x4f6761;}const _0x458538='[BUILTIN_SKILL_INSTALL_'+(_0x4f6761[_0x4c3158(0xd2)]??'FAILED')+']\x20'+(_0x4f6761[_0x4c3158(0xc6)]??_0x4c3158(0xcc))+'.\x20'+(_0x4c3158(0xcb)+_0x4f6761['repairCommand']);if(_0x4f6761[_0x4c3158(0xd2)]==='SOURCE_INVALID')throw new Error(_0x458538);return console[_0x4c3158(0xc3)](_0x458538),_0x4f6761;}
1
+ function a129_0x222e(_0x690de2,_0x321d07){_0x690de2=_0x690de2-0x104;const _0x2cf0ea=a129_0x2cf0();let _0x222e37=_0x2cf0ea[_0x690de2];return _0x222e37;}(function(_0xde2643,_0x16d006){const _0xce8b12=a129_0x222e,_0x5bf0c2=_0xde2643();while(!![]){try{const _0x99dbe0=parseInt(_0xce8b12(0x107))/0x1*(parseInt(_0xce8b12(0x112))/0x2)+parseInt(_0xce8b12(0x116))/0x3*(parseInt(_0xce8b12(0x114))/0x4)+parseInt(_0xce8b12(0x113))/0x5+-parseInt(_0xce8b12(0x10e))/0x6+-parseInt(_0xce8b12(0x110))/0x7+parseInt(_0xce8b12(0x108))/0x8+parseInt(_0xce8b12(0x117))/0x9*(parseInt(_0xce8b12(0x105))/0xa);if(_0x99dbe0===_0x16d006)break;else _0x5bf0c2['push'](_0x5bf0c2['shift']());}catch(_0x5f3ae5){_0x5bf0c2['push'](_0x5bf0c2['shift']());}}}(a129_0x2cf0,0xc45b4));import{installBuiltinSkill}from'./skills/builtin-skill.js';function a129_0x2cf0(){const _0x24e016=['\x20via\x20skills@latest','7749858MWqutd','[BUILTIN_SKILL_INSTALL_','979405GcIJiE','\x20at\x20','254HutzUv','6876285iBvjKS','80528SvBLSg','already\x20current','63YDkidb','3296583GzAUHY','Repair\x20with:\x20','error','installedPath','10qOxDem','warn','233ScmPOd','335416ylPKdI','Lovrabet\x20Built-in\x20Skill\x20','log','Installation\x20failed','code'];a129_0x2cf0=function(){return _0x24e016;};return a129_0x2cf0();}export async function runPostinstall(_0x4e2cc2={}){const _0x4b59e1=a129_0x222e,_0x418e74=installBuiltinSkill(_0x4e2cc2);if(_0x418e74['ok']){const _0x367a6c=_0x418e74['changed']?'installed':_0x4b59e1(0x115),_0x2adcfd=_0x418e74[_0x4b59e1(0x104)]?_0x4b59e1(0x111)+_0x418e74['installedPath']:_0x4b59e1(0x10d);return console[_0x4b59e1(0x10a)](_0x4b59e1(0x109)+_0x418e74['skillVersion']+'\x20'+_0x367a6c+_0x2adcfd),_0x418e74;}const _0x336ed5=_0x4b59e1(0x10f)+(_0x418e74[_0x4b59e1(0x10c)]??'FAILED')+']\x20'+(_0x418e74[_0x4b59e1(0x119)]??_0x4b59e1(0x10b))+'.\x20'+(_0x4b59e1(0x118)+_0x418e74['repairCommand']);if(_0x418e74[_0x4b59e1(0x10c)]==='SOURCE_INVALID')throw new Error(_0x336ed5);return console[_0x4b59e1(0x106)](_0x336ed5),_0x418e74;}
@@ -1 +1 @@
1
- function a130_0x35f8(){const _0x2d1ed6=['9545embBLb','1062nnYGRV','string','trim','slice','risk','high-risk-write','10832AfeGty','write','1207820VYjtjp','description','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','185440bILjmB','2296qyDNXQ','689589DbGBTx','3038BcLQkN','confirmationDescription','11252889DGqVGZ','replace'];a130_0x35f8=function(){return _0x2d1ed6;};return a130_0x35f8();}(function(_0x496560,_0x6939d5){const _0x5e84c5=a130_0x4aec,_0x52ec00=_0x496560();while(!![]){try{const _0x30badd=parseInt(_0x5e84c5(0xfe))/0x1+parseInt(_0x5e84c5(0x101))/0x2+parseInt(_0x5e84c5(0x100))/0x3+parseInt(_0x5e84c5(0xfb))/0x4+parseInt(_0x5e84c5(0x105))/0x5*(parseInt(_0x5e84c5(0x106))/0x6)+parseInt(_0x5e84c5(0xff))/0x7*(parseInt(_0x5e84c5(0x10c))/0x8)+-parseInt(_0x5e84c5(0x103))/0x9;if(_0x30badd===_0x6939d5)break;else _0x52ec00['push'](_0x52ec00['shift']());}catch(_0x590080){_0x52ec00['push'](_0x52ec00['shift']());}}}(a130_0x35f8,0x3d25d));const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0xd05d90,_0x45950d,_0x3e2b61){const _0x4cdd58=a130_0x4aec,_0x214241=normalizeText(_0xd05d90[_0x4cdd58(0x102)],DESCRIPTION_MAX_LENGTH),_0x7e823d=normalizeText(_0xd05d90[_0x4cdd58(0xfc)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x45950d,'risk':requireWriteRisk(_0xd05d90),'description':_0x214241||_0x7e823d||'Run\x20this\x20write\x20operation',..._0x3e2b61?{'signal':_0x3e2b61}:{}};}function requireWriteRisk(_0x218824){const _0x261c7e=a130_0x4aec;if(_0x218824[_0x261c7e(0x10a)]===_0x261c7e(0x10d)||_0x218824[_0x261c7e(0x10a)]===_0x261c7e(0x10b))return _0x218824[_0x261c7e(0x10a)];throw new Error(_0x261c7e(0xfd));}function a130_0x4aec(_0x4a2d7d,_0x1ea226){_0x4a2d7d=_0x4a2d7d-0xfb;const _0x35f8da=a130_0x35f8();let _0x4aec88=_0x35f8da[_0x4a2d7d];return _0x4aec88;}function normalizeText(_0x1a4aad,_0x42010d){const _0x235ab6=a130_0x4aec;if(typeof _0x1a4aad!==_0x235ab6(0x107))return'';return _0x1a4aad['replace'](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x235ab6(0x104)](/\s+/g,'\x20')[_0x235ab6(0x108)]()[_0x235ab6(0x109)](0x0,_0x42010d);}
1
+ (function(_0x32be39,_0x117300){const _0x4550f1=a130_0x549c,_0x22cc3d=_0x32be39();while(!![]){try{const _0x50515c=parseInt(_0x4550f1(0x130))/0x1+-parseInt(_0x4550f1(0x13f))/0x2*(-parseInt(_0x4550f1(0x13a))/0x3)+parseInt(_0x4550f1(0x135))/0x4*(-parseInt(_0x4550f1(0x13c))/0x5)+-parseInt(_0x4550f1(0x141))/0x6*(-parseInt(_0x4550f1(0x133))/0x7)+parseInt(_0x4550f1(0x132))/0x8+-parseInt(_0x4550f1(0x13e))/0x9*(parseInt(_0x4550f1(0x138))/0xa)+-parseInt(_0x4550f1(0x134))/0xb;if(_0x50515c===_0x117300)break;else _0x22cc3d['push'](_0x22cc3d['shift']());}catch(_0x2b58d8){_0x22cc3d['push'](_0x22cc3d['shift']());}}}(a130_0x1665,0x27ba5));function a130_0x1665(){const _0x3f2fad=['slice','274624lYYBdS','string','931896XhOgLU','184793xBhvUd','3499012YojCtA','44eonLGy','write','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','3580dfpdXA','Run\x20this\x20write\x20operation','252irHDxt','replace','15955vycwDC','description','6102HcGCpI','5608RvriCl','high-risk-write','30qtGYbs','risk'];a130_0x1665=function(){return _0x3f2fad;};return a130_0x1665();}const DESCRIPTION_MAX_LENGTH=0x1f4;export function buildLovrabetConfirmationRequest(_0x5998a3,_0x1db5de,_0x38af3d){const _0x535837=a130_0x549c,_0x43b34c=normalizeText(_0x5998a3['confirmationDescription'],DESCRIPTION_MAX_LENGTH),_0x35fb2c=normalizeText(_0x5998a3[_0x535837(0x13d)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x1db5de,'risk':requireWriteRisk(_0x5998a3),'description':_0x43b34c||_0x35fb2c||_0x535837(0x139),..._0x38af3d?{'signal':_0x38af3d}:{}};}function a130_0x549c(_0x4f2c38,_0x411d0c){_0x4f2c38=_0x4f2c38-0x130;const _0x166579=a130_0x1665();let _0x549cee=_0x166579[_0x4f2c38];return _0x549cee;}function requireWriteRisk(_0x1eb2fc){const _0x1c4223=a130_0x549c;if(_0x1eb2fc[_0x1c4223(0x142)]===_0x1c4223(0x136)||_0x1eb2fc['risk']===_0x1c4223(0x140))return _0x1eb2fc[_0x1c4223(0x142)];throw new Error(_0x1c4223(0x137));}function normalizeText(_0x12b658,_0x2105d3){const _0x2edd8d=a130_0x549c;if(typeof _0x12b658!==_0x2edd8d(0x131))return'';return _0x12b658[_0x2edd8d(0x13b)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x2edd8d(0x13b)](/\s+/g,'\x20')['trim']()[_0x2edd8d(0x143)](0x0,_0x2105d3);}
@@ -1 +1 @@
1
- function a131_0x4d8f(){const _0x416288=['write','812470dbqEwB','8075vzCsaH','3099894AsJTkL','500SUjbLS','split','command','3302982Jjdjoq','lovrabet.write.completed','filter','trim','risk','536309evkDTx','4311520ptTbar','2291274CYVmRz','writeEventSubject','high-risk-write'];a131_0x4d8f=function(){return _0x416288;};return a131_0x4d8f();}(function(_0xf9c32,_0x213322){const _0x2e757c=a131_0xab22,_0x3b06d4=_0xf9c32();while(!![]){try{const _0x30fa77=-parseInt(_0x2e757c(0x1de))/0x1+parseInt(_0x2e757c(0x1e4))/0x2+-parseInt(_0x2e757c(0x1e0))/0x3+parseInt(_0x2e757c(0x1e7))/0x4*(-parseInt(_0x2e757c(0x1e5))/0x5)+parseInt(_0x2e757c(0x1d9))/0x6+parseInt(_0x2e757c(0x1e6))/0x7+parseInt(_0x2e757c(0x1df))/0x8;if(_0x30fa77===_0x213322)break;else _0x3b06d4['push'](_0x3b06d4['shift']());}catch(_0x1a728b){_0x3b06d4['push'](_0x3b06d4['shift']());}}}(a131_0x4d8f,0x6a95c));function a131_0xab22(_0x3bc013,_0x44ea4b){_0x3bc013=_0x3bc013-0x1d7;const _0x4d8fb2=a131_0x4d8f();let _0xab2200=_0x4d8fb2[_0x3bc013];return _0xab2200;}export function canonicalLovrabetOperation(_0x2860e4){const _0x50eb4f=a131_0xab22;return[_0x2860e4['service'],..._0x2860e4[_0x50eb4f(0x1d8)][_0x50eb4f(0x1dc)]()[_0x50eb4f(0x1d7)](/\s+/)][_0x50eb4f(0x1db)](Boolean)['join']('.');}export function createLovrabetWriteMetadata(_0x5de6ae,_0x59b391,_0x18d011,_0x1df9e0){const _0x54d8b1=a131_0xab22;if(_0x1df9e0||_0x18d011['ok']!==!![]||_0x5de6ae[_0x54d8b1(0x1dd)]!==_0x54d8b1(0x1e3)&&_0x5de6ae[_0x54d8b1(0x1dd)]!==_0x54d8b1(0x1e2))return undefined;const _0x4cfdf2=_0x5de6ae[_0x54d8b1(0x1e1)]?.(_0x18d011),_0x5c8e9f={'type':_0x54d8b1(0x1da),'operation':_0x59b391,'risk':_0x5de6ae[_0x54d8b1(0x1dd)],..._0x4cfdf2?{'subject':_0x4cfdf2}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x5c8e9f}};}
1
+ (function(_0x23450b,_0x33e7f2){const _0x5cf2e3=a131_0x2037,_0x504825=_0x23450b();while(!![]){try{const _0x3ac1cf=parseInt(_0x5cf2e3(0x1d5))/0x1+-parseInt(_0x5cf2e3(0x1d6))/0x2*(-parseInt(_0x5cf2e3(0x1df))/0x3)+-parseInt(_0x5cf2e3(0x1db))/0x4+parseInt(_0x5cf2e3(0x1d4))/0x5+parseInt(_0x5cf2e3(0x1e1))/0x6+parseInt(_0x5cf2e3(0x1d8))/0x7+-parseInt(_0x5cf2e3(0x1d9))/0x8*(parseInt(_0x5cf2e3(0x1dc))/0x9);if(_0x3ac1cf===_0x33e7f2)break;else _0x504825['push'](_0x504825['shift']());}catch(_0x5438ba){_0x504825['push'](_0x504825['shift']());}}}(a131_0x26f1,0x6aa34));export function canonicalLovrabetOperation(_0x5389a4){const _0x592f8d=a131_0x2037;return[_0x5389a4['service'],..._0x5389a4[_0x592f8d(0x1e0)]['trim']()[_0x592f8d(0x1d2)](/\s+/)][_0x592f8d(0x1da)](Boolean)['join']('.');}function a131_0x26f1(){const _0xa291f4=['split','risk','757665AhtmmC','83559bVOYeZ','46hZapIC','lovrabet.write.completed','3296111NYuhCb','66552nUrUSz','filter','2756544CYJECJ','396MyRLAg','write','high-risk-write','3906kdYzem','command','4536294IIhELs'];a131_0x26f1=function(){return _0xa291f4;};return a131_0x26f1();}function a131_0x2037(_0x538d50,_0x1905d9){_0x538d50=_0x538d50-0x1d2;const _0x26f1fe=a131_0x26f1();let _0x2037c3=_0x26f1fe[_0x538d50];return _0x2037c3;}export function createLovrabetWriteMetadata(_0x27460c,_0x41f2b0,_0x489f42,_0x3ba880){const _0x40cfff=a131_0x2037;if(_0x3ba880||_0x489f42['ok']!==!![]||_0x27460c[_0x40cfff(0x1d3)]!==_0x40cfff(0x1dd)&&_0x27460c['risk']!==_0x40cfff(0x1de))return undefined;const _0x2f49aa=_0x27460c['writeEventSubject']?.(_0x489f42),_0x43820e={'type':_0x40cfff(0x1d7),'operation':_0x41f2b0,'risk':_0x27460c[_0x40cfff(0x1d3)],..._0x2f49aa?{'subject':_0x2f49aa}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x43820e}};}
@@ -1 +1 @@
1
- (function(_0x58aba7,_0x182e56){const _0x2771d9=a132_0x520f,_0xfcf0ce=_0x58aba7();while(!![]){try{const _0x27f588=parseInt(_0x2771d9(0x1bf))/0x1*(parseInt(_0x2771d9(0x1be))/0x2)+-parseInt(_0x2771d9(0x1d4))/0x3+parseInt(_0x2771d9(0x1b5))/0x4*(-parseInt(_0x2771d9(0x1c2))/0x5)+parseInt(_0x2771d9(0x1b4))/0x6*(parseInt(_0x2771d9(0x1cb))/0x7)+parseInt(_0x2771d9(0x1b9))/0x8*(-parseInt(_0x2771d9(0x1c1))/0x9)+-parseInt(_0x2771d9(0x1c4))/0xa*(-parseInt(_0x2771d9(0x1d6))/0xb)+parseInt(_0x2771d9(0x1d0))/0xc;if(_0x27f588===_0x182e56)break;else _0xfcf0ce['push'](_0xfcf0ce['shift']());}catch(_0x5a54d2){_0xfcf0ce['push'](_0xfcf0ce['shift']());}}}(a132_0x1e77,0x51090));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';function a132_0x520f(_0x18a2b0,_0x31d4fd){_0x18a2b0=_0x18a2b0-0x1b3;const _0x1e777a=a132_0x1e77();let _0x520f89=_0x1e777a[_0x18a2b0];return _0x520f89;}import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x42f161,command:_0x186da2,risk:_0x4684c2,dryRun:_0x3ef280}){const _0x46e1e8=a132_0x520f;return JSON[_0x46e1e8(0x1b3)]({'ok':_0x42f161['ok'],'command':_0x186da2,'risk':_0x4684c2,..._0x3ef280?{'dryRun':!![]}:{},..._0x42f161[_0x46e1e8(0x1ce)]!==undefined?{'data':_0x42f161[_0x46e1e8(0x1ce)]}:{},..._0x42f161['message']?{'message':_0x42f161[_0x46e1e8(0x1bc)]}:{}});}};export async function invokeLovrabet(_0x55313c,_0x293119){const _0x284c47=a132_0x520f;throwIfAborted(_0x293119[_0x284c47(0x1c9)]);const _0x549f11=await resolveLovrabetInvocation(_0x55313c),_0x4700d5=canonicalLovrabetOperation(_0x549f11[_0x284c47(0x1ca)]);return await confirmWriteBeforeQueue(_0x549f11['definition'],_0x549f11[_0x284c47(0x1b7)],_0x4700d5,_0x293119),runSerialized(async()=>{const _0x362af5=_0x284c47;throwIfAborted(_0x293119[_0x362af5(0x1c9)]);const _0x2b1cb8={},_0x10e4ff=buildConfigFromFlags(_0x549f11[_0x362af5(0x1b7)]);await initGlobalEnvironment(_0x10e4ff);const _0x3c9386=createPipelineEnv(_0x10e4ff,{..._0x549f11[_0x362af5(0x1b7)],'yes':_0x549f11[_0x362af5(0x1ca)][_0x362af5(0x1d7)]===_0x362af5(0x1d2)?!![]:_0x549f11[_0x362af5(0x1b7)][_0x362af5(0x1c8)],'nonInteractive':!![]});_0x3c9386['args']=_0x549f11['args'],_0x3c9386[_0x362af5(0x1c7)]=!![],_0x3c9386[_0x362af5(0x1d3)]=_0x362af5(0x1d2);const _0x58adfb=withAbortSignal(_0x549f11[_0x362af5(0x1ca)],_0x293119[_0x362af5(0x1c9)]),_0x4f629f=createLovrabetRunnerAdapter({'formatOutput'(_0x22542e,_0xf11ece){const _0x2e5128=_0x362af5;_0x2b1cb8[_0x2e5128(0x1d5)]=_0x22542e,_0x2b1cb8[_0x2e5128(0x1ba)]=_0xf11ece['command'],_0x2b1cb8[_0x2e5128(0x1d7)]=_0xf11ece['risk'],_0x2b1cb8[_0x2e5128(0x1cc)]=_0xf11ece['format'],_0x2b1cb8[_0x2e5128(0x1b6)]=_0xf11ece[_0x2e5128(0x1b6)]===!![];},async 'confirmHighRisk'(){const _0x43894d=_0x362af5;throw new Error(_0x43894d(0x1cf));}});try{await runCommand(_0x58adfb,_0x3c9386,_0x4f629f);if(!_0x2b1cb8[_0x362af5(0x1d5)]||!_0x2b1cb8[_0x362af5(0x1ba)]||!_0x2b1cb8[_0x362af5(0x1d7)]||!_0x2b1cb8[_0x362af5(0x1cc)])throw new Error(_0x362af5(0x1c0));const _0x307b3c=_0x293119['presentation']??defaultPresentation,_0x148c79=_0x2b1cb8['dryRun']===!![],_0x4678d8={'result':_0x2b1cb8[_0x362af5(0x1d5)],'command':_0x2b1cb8['command'],'operation':_0x4700d5,'risk':_0x2b1cb8[_0x362af5(0x1d7)],'format':_0x2b1cb8[_0x362af5(0x1cc)],'dryRun':_0x148c79},_0x4f5712=createLovrabetWriteMetadata(_0x549f11[_0x362af5(0x1ca)],_0x4700d5,_0x2b1cb8[_0x362af5(0x1d5)],_0x148c79);let _0x2ba41a;try{_0x2ba41a=await _0x307b3c[_0x362af5(0x1c3)](_0x4678d8);}catch(_0x317f4b){if(!_0x4f5712||_0x307b3c===defaultPresentation)throw _0x317f4b;_0x2ba41a=await defaultPresentation['present'](_0x4678d8);}return{'operation':_0x4700d5,'risk':_0x2b1cb8[_0x362af5(0x1d7)],'mode':_0x148c79?_0x362af5(0x1cd):'execute','result':_0x2b1cb8[_0x362af5(0x1d5)],'output':_0x2ba41a,..._0x4f5712?{'metadata':_0x4f5712}:{}};}finally{await finalizeLovrabetRuntimeState();}});}function a132_0x1e77(){const _0x28df4a=['aborted','isNonInteractive','yes','signal','definition','820764iFOZzK','format','dry-run','data','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','3602964WTpVEV','AbortError','high-risk-write','riskLevel','1230798eUbRMI','result','2145gyiJUc','risk','stringify','18hAexIF','28ckhHoI','dryRun','rawFlags','confirmation','523344LmlZqK','command','reason','message','execute','82qdffkk','2044OhMKWg','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','9obkytM','191770YJXDTn','present','17450xXEiZU','write'];a132_0x1e77=function(){return _0x28df4a;};return a132_0x1e77();}async function confirmWriteBeforeQueue(_0x2f581e,_0x4c7854,_0x2743ed,_0x390b89){const _0x219928=a132_0x520f;if(_0x4c7854[_0x219928(0x1b6)]===!![]||_0x2f581e[_0x219928(0x1d7)]!==_0x219928(0x1c5)&&_0x2f581e[_0x219928(0x1d7)]!==_0x219928(0x1d2))return;await _0x390b89[_0x219928(0x1b8)]['confirm'](buildLovrabetConfirmationRequest(_0x2f581e,_0x2743ed,_0x390b89[_0x219928(0x1c9)]));}function withAbortSignal(_0x55b576,_0x2bd1d3){return{..._0x55b576,async 'execute'(_0x2bbe03){const _0x5d8129=a132_0x520f;return throwIfAborted(_0x2bd1d3),_0x55b576[_0x5d8129(0x1bd)]({..._0x2bbe03,'signal':_0x2bd1d3});}};}function throwIfAborted(_0x312a3a){const _0x24b97a=a132_0x520f;if(_0x312a3a?.[_0x24b97a(0x1c6)])throw _0x312a3a[_0x24b97a(0x1bb)]instanceof Error?_0x312a3a[_0x24b97a(0x1bb)]:new DOMException('Lovrabet\x20invocation\x20aborted.',_0x24b97a(0x1d1));}
1
+ function a132_0x50c4(){const _0x45d6d2=['23219QzFANw','write','command','high-risk-write','Lovrabet\x20invocation\x20aborted.','data','1986498jssFaV','dryRun','riskLevel','44582zWHiXj','args','message','signal','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','definition','856WbTuZA','aborted','1823005fBdUwd','risk','3AgvAVk','284655QCwIyF','dry-run','rawFlags','247024jobDFp','presentation','result','confirmation','yes','format','execute','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','7949592qJrYfJ','present'];a132_0x50c4=function(){return _0x45d6d2;};return a132_0x50c4();}function a132_0x2c4c(_0x2d4e54,_0x573acc){_0x2d4e54=_0x2d4e54-0x155;const _0x50c488=a132_0x50c4();let _0x2c4c6e=_0x50c488[_0x2d4e54];return _0x2c4c6e;}(function(_0x4a1511,_0x3686b1){const _0x320837=a132_0x2c4c,_0x4550cc=_0x4a1511();while(!![]){try{const _0x4ae919=-parseInt(_0x320837(0x175))/0x1+-parseInt(_0x320837(0x16a))/0x2*(parseInt(_0x320837(0x174))/0x3)+-parseInt(_0x320837(0x157))/0x4+parseInt(_0x320837(0x172))/0x5+-parseInt(_0x320837(0x167))/0x6+parseInt(_0x320837(0x161))/0x7*(-parseInt(_0x320837(0x170))/0x8)+parseInt(_0x320837(0x15f))/0x9;if(_0x4ae919===_0x3686b1)break;else _0x4550cc['push'](_0x4550cc['shift']());}catch(_0x1b3dac){_0x4550cc['push'](_0x4550cc['shift']());}}}(a132_0x50c4,0x2f2a1));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x51aafb,command:_0x374c83,risk:_0x1e08cd,dryRun:_0x4519f2}){const _0x3e1379=a132_0x2c4c;return JSON['stringify']({'ok':_0x51aafb['ok'],'command':_0x374c83,'risk':_0x1e08cd,..._0x4519f2?{'dryRun':!![]}:{},..._0x51aafb['data']!==undefined?{'data':_0x51aafb[_0x3e1379(0x166)]}:{},..._0x51aafb[_0x3e1379(0x16c)]?{'message':_0x51aafb[_0x3e1379(0x16c)]}:{}});}};export async function invokeLovrabet(_0x4e9be1,_0x470fb1){const _0x500604=a132_0x2c4c;throwIfAborted(_0x470fb1[_0x500604(0x16d)]);const _0x2460df=await resolveLovrabetInvocation(_0x4e9be1),_0x500f6b=canonicalLovrabetOperation(_0x2460df[_0x500604(0x16f)]);return await confirmWriteBeforeQueue(_0x2460df[_0x500604(0x16f)],_0x2460df[_0x500604(0x156)],_0x500f6b,_0x470fb1),runSerialized(async()=>{const _0x39e26d=_0x500604;throwIfAborted(_0x470fb1['signal']);const _0x33353e={},_0x1f68f7=buildConfigFromFlags(_0x2460df['rawFlags']);await initGlobalEnvironment(_0x1f68f7);const _0x5afbcd=createPipelineEnv(_0x1f68f7,{..._0x2460df[_0x39e26d(0x156)],'yes':_0x2460df['definition']['risk']===_0x39e26d(0x164)?!![]:_0x2460df['rawFlags'][_0x39e26d(0x15b)],'nonInteractive':!![]});_0x5afbcd[_0x39e26d(0x16b)]=_0x2460df[_0x39e26d(0x16b)],_0x5afbcd['isNonInteractive']=!![],_0x5afbcd[_0x39e26d(0x169)]=_0x39e26d(0x164);const _0x5072f8=withAbortSignal(_0x2460df[_0x39e26d(0x16f)],_0x470fb1[_0x39e26d(0x16d)]),_0x3baf41=createLovrabetRunnerAdapter({'formatOutput'(_0x4eeffc,_0x1786e2){const _0x4a6b1e=_0x39e26d;_0x33353e[_0x4a6b1e(0x159)]=_0x4eeffc,_0x33353e['command']=_0x1786e2['command'],_0x33353e[_0x4a6b1e(0x173)]=_0x1786e2['risk'],_0x33353e['format']=_0x1786e2[_0x4a6b1e(0x15c)],_0x33353e[_0x4a6b1e(0x168)]=_0x1786e2[_0x4a6b1e(0x168)]===!![];},async 'confirmHighRisk'(){const _0x195a4c=_0x39e26d;throw new Error(_0x195a4c(0x16e));}});try{await runCommand(_0x5072f8,_0x5afbcd,_0x3baf41);if(!_0x33353e[_0x39e26d(0x159)]||!_0x33353e[_0x39e26d(0x163)]||!_0x33353e['risk']||!_0x33353e[_0x39e26d(0x15c)])throw new Error(_0x39e26d(0x15e));const _0x2a9f3a=_0x470fb1[_0x39e26d(0x158)]??defaultPresentation,_0x24e231=_0x33353e['dryRun']===!![],_0x286853={'result':_0x33353e['result'],'command':_0x33353e['command'],'operation':_0x500f6b,'risk':_0x33353e['risk'],'format':_0x33353e[_0x39e26d(0x15c)],'dryRun':_0x24e231},_0x1d3538=createLovrabetWriteMetadata(_0x2460df[_0x39e26d(0x16f)],_0x500f6b,_0x33353e[_0x39e26d(0x159)],_0x24e231);let _0x802886;try{_0x802886=await _0x2a9f3a['present'](_0x286853);}catch(_0x1a99d9){if(!_0x1d3538||_0x2a9f3a===defaultPresentation)throw _0x1a99d9;_0x802886=await defaultPresentation[_0x39e26d(0x160)](_0x286853);}return{'operation':_0x500f6b,'risk':_0x33353e[_0x39e26d(0x173)],'mode':_0x24e231?_0x39e26d(0x155):_0x39e26d(0x15d),'result':_0x33353e[_0x39e26d(0x159)],'output':_0x802886,..._0x1d3538?{'metadata':_0x1d3538}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x564c3a,_0x593185,_0x5a36af,_0x52ab85){const _0x3bf1db=a132_0x2c4c;if(_0x593185[_0x3bf1db(0x168)]===!![]||_0x564c3a['risk']!==_0x3bf1db(0x162)&&_0x564c3a[_0x3bf1db(0x173)]!==_0x3bf1db(0x164))return;await _0x52ab85[_0x3bf1db(0x15a)]['confirm'](buildLovrabetConfirmationRequest(_0x564c3a,_0x5a36af,_0x52ab85[_0x3bf1db(0x16d)]));}function withAbortSignal(_0x18877e,_0x4a89b){return{..._0x18877e,async 'execute'(_0xe314d3){const _0x3001df=a132_0x2c4c;return throwIfAborted(_0x4a89b),_0x18877e[_0x3001df(0x15d)]({..._0xe314d3,'signal':_0x4a89b});}};}function throwIfAborted(_0x34a2c5){const _0x2cc583=a132_0x2c4c;if(_0x34a2c5?.[_0x2cc583(0x171)])throw _0x34a2c5['reason']instanceof Error?_0x34a2c5['reason']:new DOMException(_0x2cc583(0x165),'AbortError');}
@@ -1 +1 @@
1
- const a133_0x526564=a133_0x14d3;(function(_0x901962,_0x4e3f0e){const _0x124d1c=a133_0x14d3,_0x181f68=_0x901962();while(!![]){try{const _0x5884bf=parseInt(_0x124d1c(0x171))/0x1*(parseInt(_0x124d1c(0x16e))/0x2)+-parseInt(_0x124d1c(0x16d))/0x3+parseInt(_0x124d1c(0x170))/0x4*(-parseInt(_0x124d1c(0x172))/0x5)+parseInt(_0x124d1c(0x16f))/0x6*(-parseInt(_0x124d1c(0x167))/0x7)+parseInt(_0x124d1c(0x16b))/0x8*(-parseInt(_0x124d1c(0x173))/0x9)+parseInt(_0x124d1c(0x169))/0xa*(-parseInt(_0x124d1c(0x166))/0xb)+parseInt(_0x124d1c(0x168))/0xc;if(_0x5884bf===_0x4e3f0e)break;else _0x181f68['push'](_0x181f68['shift']());}catch(_0x3d40c6){_0x181f68['push'](_0x181f68['shift']());}}}(a133_0x153c,0x760ff));let tail=Promise[a133_0x526564(0x16c)]();function a133_0x14d3(_0x400cc5,_0x4d2205){_0x400cc5=_0x400cc5-0x166;const _0x153c2c=a133_0x153c();let _0x14d37a=_0x153c2c[_0x400cc5];return _0x14d37a;}export async function runSerialized(_0x3c3709){const _0x3ed4d3=a133_0x526564,_0x4ac7e5=tail;let _0x4570d0;tail=new Promise(_0x2b83c8=>{_0x4570d0=_0x2b83c8;}),await _0x4ac7e5[_0x3ed4d3(0x16a)](()=>undefined);try{return await _0x3c3709();}finally{_0x4570d0();}}function a133_0x153c(){const _0xb47cd5=['1412285IoggNM','3620097kQPFuI','5489VEpBqA','1643957zkqfSg','29006700ienpqx','730TqKbJr','catch','8VBSnAu','resolve','2747496jzRquC','20354ryBnQI','12sdxzXR','4fBvpMx','17Lcmnbs'];a133_0x153c=function(){return _0xb47cd5;};return a133_0x153c();}
1
+ function a133_0x8bf7(_0x48516d,_0x24cd81){_0x48516d=_0x48516d-0x97;const _0x16ef25=a133_0x16ef();let _0x8bf7c2=_0x16ef25[_0x48516d];return _0x8bf7c2;}function a133_0x16ef(){const _0x30bc53=['3039831SWETav','10ZFmyJr','132ZJVelT','1155702hcNCrY','2774264jXsiwY','2409468qavtws','98330VhyeEv','1358091jFsVZa','catch','resolve','209377bVOUML','2nuXFxQ'];a133_0x16ef=function(){return _0x30bc53;};return a133_0x16ef();}const a133_0x2c455f=a133_0x8bf7;(function(_0x46b9de,_0x9a1a99){const _0x78cf8d=a133_0x8bf7,_0x356384=_0x46b9de();while(!![]){try{const _0x278354=-parseInt(_0x78cf8d(0x9c))/0x1+-parseInt(_0x78cf8d(0x9d))/0x2*(-parseInt(_0x78cf8d(0xa1))/0x3)+-parseInt(_0x78cf8d(0x97))/0x4+-parseInt(_0x78cf8d(0x98))/0x5*(-parseInt(_0x78cf8d(0xa0))/0x6)+-parseInt(_0x78cf8d(0x99))/0x7+parseInt(_0x78cf8d(0xa2))/0x8+-parseInt(_0x78cf8d(0x9e))/0x9*(-parseInt(_0x78cf8d(0x9f))/0xa);if(_0x278354===_0x9a1a99)break;else _0x356384['push'](_0x356384['shift']());}catch(_0x3604b2){_0x356384['push'](_0x356384['shift']());}}}(a133_0x16ef,0x7941f));let tail=Promise[a133_0x2c455f(0x9b)]();export async function runSerialized(_0x5cff14){const _0x6d8fa9=a133_0x2c455f,_0x67b371=tail;let _0x1d2c1e;tail=new Promise(_0x2de225=>{_0x1d2c1e=_0x2de225;}),await _0x67b371[_0x6d8fa9(0x9a)](()=>undefined);try{return await _0x5cff14();}finally{_0x1d2c1e();}}
@@ -1 +1 @@
1
- (function(_0x6a30f2,_0x2ae69e){const _0x1798d3=a134_0x8cd3,_0x37cb08=_0x6a30f2();while(!![]){try{const _0x116fb7=parseInt(_0x1798d3(0x1f4))/0x1*(parseInt(_0x1798d3(0x1ec))/0x2)+-parseInt(_0x1798d3(0x1e2))/0x3+-parseInt(_0x1798d3(0x1e3))/0x4*(-parseInt(_0x1798d3(0x1e8))/0x5)+parseInt(_0x1798d3(0x1e9))/0x6+-parseInt(_0x1798d3(0x1eb))/0x7+-parseInt(_0x1798d3(0x1f0))/0x8+-parseInt(_0x1798d3(0x1f5))/0x9*(-parseInt(_0x1798d3(0x1ee))/0xa);if(_0x116fb7===_0x2ae69e)break;else _0x37cb08['push'](_0x37cb08['shift']());}catch(_0x277949){_0x37cb08['push'](_0x37cb08['shift']());}}}(a134_0x532f,0x75e83));import a134_0x1bd0ba from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';function a134_0x8cd3(_0x59f7a9,_0x4aa43b){_0x59f7a9=_0x59f7a9-0x1e2;const _0x532f45=a134_0x532f();let _0x8cd32f=_0x532f45[_0x59f7a9];return _0x8cd32f;}import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x36f529){const _0x34ffa8=a134_0x8cd3,_0x5000dd=a134_0x1bd0ba('',{'importMeta':import.meta,'argv':_0x36f529,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x146664=[..._0x5000dd['input']],_0x435366=_0x5000dd['flags'];await correctFlags(_0x435366);const _0x1cdcee=_0x146664[0x0];if(!_0x1cdcee)throw CliErrors[_0x34ffa8(0x1e7)](_0x34ffa8(0x1e5));const _0x236aea=resolveRemovedCommand(_0x1cdcee,_0x146664[0x1]);if(_0x236aea)throw CliErrors['validation'](_0x236aea['message'],_0x236aea[_0x34ffa8(0x1ef)]);if(!isKnownService(_0x1cdcee)){const _0x188500=resolveDynamicServiceCommand(_0x146664,_0x435366);if(!_0x188500)throw CliErrors[_0x34ffa8(0x1f3)](_0x146664[_0x34ffa8(0x1f1)]('\x20'));return Object[_0x34ffa8(0x1f6)](_0x435366,_0x188500['flags']),{'definition':_0x188500[_0x34ffa8(0x1e6)],'rawFlags':_0x435366,'args':_0x188500[_0x34ffa8(0x1ed)]};}const _0x354b12=getServiceEntry(_0x1cdcee),_0x1b42df=_0x146664[0x1]||_0x354b12['defaultCommand'];if(!_0x1b42df)throw CliErrors['validation'](_0x34ffa8(0x1ea)+_0x1cdcee+'\x22.');const _0x1aa2a7=findDefinition(_0x1cdcee,_0x1b42df);if(!_0x1aa2a7)throw CliErrors[_0x34ffa8(0x1f3)](_0x1cdcee+'\x20'+_0x1b42df);return{'definition':_0x1aa2a7,'rawFlags':_0x435366,'args':_0x146664[_0x34ffa8(0x1f2)](0x2)};}async function correctFlags(_0x3220f4){const _0x12a6b5=a134_0x8cd3;try{const {correctFlags:_0x43dc8a}=await import('../framework/preparse.js'),{getAllDefinitions:_0x6bebaf}=await import(_0x12a6b5(0x1e4)),_0x2eaf91=_0x6bebaf()['flatMap'](_0x3db3db=>_0x3db3db['flags']??[]),_0x2f5b41=_0x43dc8a(_0x3220f4,_0x2eaf91);Object[_0x12a6b5(0x1f6)](_0x3220f4,_0x2f5b41['flags']);}catch{}}function a134_0x532f(){const _0x590e47=['join','slice','unknownCommand','6200JzpxNR','1026711ZautxF','assign','1639533gUfZNa','2504ztAhWd','../commands/registry.js','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','definition','validation','3560oygyur','2355984nuFmwd','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','4264533LjpHOp','262nyrZja','args','10UwfTYy','hint','1007824asWXTR'];a134_0x532f=function(){return _0x590e47;};return a134_0x532f();}
1
+ (function(_0x4d126a,_0x1fa120){const _0x1862a7=a134_0x1e8b,_0x4e0b16=_0x4d126a();while(!![]){try{const _0x387b8c=-parseInt(_0x1862a7(0x92))/0x1*(-parseInt(_0x1862a7(0x8d))/0x2)+-parseInt(_0x1862a7(0x9b))/0x3*(-parseInt(_0x1862a7(0x8c))/0x4)+parseInt(_0x1862a7(0x85))/0x5+-parseInt(_0x1862a7(0x91))/0x6+-parseInt(_0x1862a7(0x9d))/0x7*(-parseInt(_0x1862a7(0x9a))/0x8)+-parseInt(_0x1862a7(0x84))/0x9*(parseInt(_0x1862a7(0x8a))/0xa)+-parseInt(_0x1862a7(0x95))/0xb;if(_0x387b8c===_0x1fa120)break;else _0x4e0b16['push'](_0x4e0b16['shift']());}catch(_0x49fc18){_0x4e0b16['push'](_0x4e0b16['shift']());}}}(a134_0x54de,0x7aca7));function a134_0x54de(){const _0x41a49f=['../framework/preparse.js','721tkpDYT','90mwWODV','1182250zcmarx','input','assign','slice','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','24390JwOQAd','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','95908mhnqqf','10AcVugj','message','defaultCommand','args','3139662WgoDQd','110455wJBQEU','flags','join','2100736aUjMer','validation','../commands/registry.js','definition','unknownCommand','33312rJgaKZ','3XlIRwC'];a134_0x54de=function(){return _0x41a49f;};return a134_0x54de();}import a134_0x4d4d66 from'meow';function a134_0x1e8b(_0x33eb57,_0x3648d3){_0x33eb57=_0x33eb57-0x84;const _0x54de1f=a134_0x54de();let _0x1e8bfc=_0x54de1f[_0x33eb57];return _0x1e8bfc;}import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';import{CliErrors}from'../errors.js';export async function resolveLovrabetInvocation(_0x5c5880){const _0x8f8c30=a134_0x1e8b,_0x6fc3c9=a134_0x4d4d66('',{'importMeta':import.meta,'argv':_0x5c5880,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x55eccb=[..._0x6fc3c9[_0x8f8c30(0x86)]],_0x2d60e9=_0x6fc3c9[_0x8f8c30(0x93)];await correctFlags(_0x2d60e9);const _0x2c56ec=_0x55eccb[0x0];if(!_0x2c56ec)throw CliErrors[_0x8f8c30(0x96)](_0x8f8c30(0x89));const _0x140bdf=resolveRemovedCommand(_0x2c56ec,_0x55eccb[0x1]);if(_0x140bdf)throw CliErrors[_0x8f8c30(0x96)](_0x140bdf[_0x8f8c30(0x8e)],_0x140bdf['hint']);if(!isKnownService(_0x2c56ec)){const _0x33d093=resolveDynamicServiceCommand(_0x55eccb,_0x2d60e9);if(!_0x33d093)throw CliErrors[_0x8f8c30(0x99)](_0x55eccb[_0x8f8c30(0x94)]('\x20'));return Object[_0x8f8c30(0x87)](_0x2d60e9,_0x33d093[_0x8f8c30(0x93)]),{'definition':_0x33d093[_0x8f8c30(0x98)],'rawFlags':_0x2d60e9,'args':_0x33d093[_0x8f8c30(0x90)]};}const _0x2b6e23=getServiceEntry(_0x2c56ec),_0x290ae6=_0x55eccb[0x1]||_0x2b6e23[_0x8f8c30(0x8f)];if(!_0x290ae6)throw CliErrors[_0x8f8c30(0x96)](_0x8f8c30(0x8b)+_0x2c56ec+'\x22.');const _0x425d2b=findDefinition(_0x2c56ec,_0x290ae6);if(!_0x425d2b)throw CliErrors[_0x8f8c30(0x99)](_0x2c56ec+'\x20'+_0x290ae6);return{'definition':_0x425d2b,'rawFlags':_0x2d60e9,'args':_0x55eccb[_0x8f8c30(0x88)](0x2)};}async function correctFlags(_0x361a2d){const _0x18df7c=a134_0x1e8b;try{const {correctFlags:_0x5d9f66}=await import(_0x18df7c(0x9c)),{getAllDefinitions:_0x17fd56}=await import(_0x18df7c(0x97)),_0x6538d=_0x17fd56()['flatMap'](_0x234102=>_0x234102[_0x18df7c(0x93)]??[]),_0x11e78d=_0x5d9f66(_0x361a2d,_0x6538d);Object[_0x18df7c(0x87)](_0x361a2d,_0x11e78d[_0x18df7c(0x93)]);}catch{}}
@@ -1 +1 @@
1
- function a136_0x4721(){const _0x319fcf=['flatMap','startsWith','20826GwNacV','path','1460352QbLyMg','digest','4293070EgLTnQ','message','current','VERIFY_FAILED','present','utf8','length','every','version','includes','skills@latest\x20exited\x20','skillVersion','version_mismatch','skills','unknown','installedPath','packageVersion','SKILL.md','match','state','content_mismatch','14483iGhhsP','root',':\x5cs*(.+)$','isSymbolicLink','INSTALL_FAILED','reason','lovrabet','Installed\x20Skill\x20state\x20is\x20','Unsupported\x20Skill\x20entry:\x20','absent','468181cgGjwu','sha256','parse','unverifiable','missing','Symbolic\x20link\x20is\x20not\x20allowed:\x20','hex','join','files','error','packageRoot','update','9dKIcPn','status','home','schemaVersion','name','136CxFKIv','manifest','pipe','16qFvUAV','split','85200QzRyVX','package.json','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','15860OiBPIE'];a136_0x4721=function(){return _0x319fcf;};return a136_0x4721();}const a136_0x46a372=a136_0x5e52;(function(_0x6dfcc8,_0x836ce5){const _0x15cbbc=a136_0x5e52,_0x10710e=_0x6dfcc8();while(!![]){try{const _0x478703=parseInt(_0x15cbbc(0x122))/0x1+-parseInt(_0x15cbbc(0x13b))/0x2+parseInt(_0x15cbbc(0x13e))/0x3*(-parseInt(_0x15cbbc(0x136))/0x4)+-parseInt(_0x15cbbc(0x138))/0x5+parseInt(_0x15cbbc(0x140))/0x6+-parseInt(_0x15cbbc(0x118))/0x7*(-parseInt(_0x15cbbc(0x133))/0x8)+parseInt(_0x15cbbc(0x12e))/0x9*(-parseInt(_0x15cbbc(0x142))/0xa);if(_0x478703===_0x836ce5)break;else _0x10710e['push'](_0x10710e['shift']());}catch(_0xe812c0){_0x10710e['push'](_0x10710e['shift']());}}}(a136_0x4721,0x409fd));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND='lovrabet\x20cli-skill\x20install',SKILL_NAME=a136_0x46a372(0x11e);function frontmatterValue(_0x2c53cc,_0x3a7ee4){const _0x3094db=a136_0x46a372;return _0x2c53cc[_0x3094db(0x115)](new RegExp('^'+_0x3a7ee4+_0x3094db(0x11a),'m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x5606ff,_0xa11f09=_0x5606ff){const _0x4d38a3=a136_0x46a372;return readdirSync(_0xa11f09,{'withFileTypes':!![]})[_0x4d38a3(0x13c)](_0x1e11fd=>{const _0x8385a0=_0x4d38a3,_0x3828a8=join(_0xa11f09,_0x1e11fd['name']),_0x13d924=lstatSync(_0x3828a8);if(_0x13d924[_0x8385a0(0x11b)]())throw new Error(_0x8385a0(0x127)+_0x3828a8);if(_0x13d924['isDirectory']())return listFiles(_0x5606ff,_0x3828a8);if(!_0x13d924['isFile']())throw new Error(_0x8385a0(0x120)+_0x3828a8);return[relative(_0x5606ff,_0x3828a8)[_0x8385a0(0x137)](sep)[_0x8385a0(0x129)]('/')];})['sort']((_0x14fd6a,_0x2b9f39)=>_0x14fd6a<_0x2b9f39?-0x1:_0x14fd6a>_0x2b9f39?0x1:0x0);}function digestFiles(_0x4266c1,_0x1da61b){const _0x182a6f=a136_0x46a372,_0x2264b6=createHash(_0x182a6f(0x123));for(const _0x435cef of _0x1da61b){if(_0x435cef[_0x182a6f(0x13d)]('/')||_0x435cef['split']('/')[_0x182a6f(0x14b)]('..')||_0x435cef[_0x182a6f(0x14b)]('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x435cef);_0x2264b6['update'](_0x435cef),_0x2264b6[_0x182a6f(0x12d)]('\x00'),_0x2264b6['update'](readFileSync(join(_0x4266c1,..._0x435cef['split']('/')))),_0x2264b6[_0x182a6f(0x12d)]('\x00');}return _0x2264b6[_0x182a6f(0x141)](_0x182a6f(0x128));}function sameFiles(_0x2fcf37,_0x45e641){const _0x38b577=a136_0x46a372;return _0x2fcf37['length']===_0x45e641[_0x38b577(0x148)]&&_0x2fcf37[_0x38b577(0x149)]((_0x146858,_0x1d35d1)=>_0x146858===_0x45e641[_0x1d35d1]);}function readSource(_0x26ce66){const _0x3ed253=a136_0x46a372,_0x546ba9=JSON['parse'](readFileSync(join(_0x26ce66,_0x3ed253(0x139)),_0x3ed253(0x147))),_0xab99fe=JSON[_0x3ed253(0x124)](readFileSync(join(_0x26ce66,_0x3ed253(0x14f),'lovrabet.manifest.json'),_0x3ed253(0x147))),_0x4ebcf2=join(_0x26ce66,_0x3ed253(0x14f),SKILL_NAME),_0x5f4be8=frontmatterValue(readFileSync(join(_0x4ebcf2,_0x3ed253(0x114)),_0x3ed253(0x147)),_0x3ed253(0x14a)),_0x46411f=listFiles(_0x4ebcf2);if(_0xab99fe[_0x3ed253(0x131)]!==0x1||_0xab99fe[_0x3ed253(0x132)]!==SKILL_NAME||!_0x546ba9['version']||_0xab99fe[_0x3ed253(0x113)]!==_0x546ba9[_0x3ed253(0x14a)]||_0xab99fe[_0x3ed253(0x14d)]!==_0x546ba9[_0x3ed253(0x14a)]||_0x5f4be8!==_0x546ba9['version']||!sameFiles(_0x46411f,_0xab99fe[_0x3ed253(0x12a)])||digestFiles(_0x4ebcf2,_0x46411f)!==_0xab99fe[_0x3ed253(0x141)])throw new Error(_0x3ed253(0x13a));return{'packageVersion':_0x546ba9['version'],'skillVersion':_0x5f4be8,'root':_0x4ebcf2,'manifest':_0xab99fe};}function installedSkillPath(_0x2936d4){const _0x1adea9=a136_0x46a372,_0x45fff3=resolveInstalledSkill(SKILL_NAME,{'home':_0x2936d4});if(_0x45fff3['state']===_0x1adea9(0x146))return{'state':_0x1adea9(0x146),'path':dirname(_0x45fff3['path'])};if(_0x45fff3[_0x1adea9(0x116)]===_0x1adea9(0x121))return{'state':_0x1adea9(0x126)};return{'state':_0x1adea9(0x125),'reason':_0x45fff3[_0x1adea9(0x11d)]};}function a136_0x5e52(_0xe56e30,_0x7fc7d){_0xe56e30=_0xe56e30-0x111;const _0x4721aa=a136_0x4721();let _0x5e52bf=_0x4721aa[_0xe56e30];return _0x5e52bf;}export function inspectInstalledBuiltinSkillVersion(_0x1ef990,_0x1b0008={}){const _0x42a7ac=a136_0x46a372,_0x34b630=installedSkillPath(_0x1b0008['home']??homedir());if(_0x34b630['state']===_0x42a7ac(0x126))return{'state':_0x42a7ac(0x126),'expectedVersion':_0x1ef990,'repairCommand':REPAIR_COMMAND};if(_0x34b630['state']===_0x42a7ac(0x125))return{'state':'unverifiable','expectedVersion':_0x1ef990,'reason':_0x34b630[_0x42a7ac(0x11d)],'repairCommand':REPAIR_COMMAND};try{const _0x3abd4a=frontmatterValue(readFileSync(join(_0x34b630[_0x42a7ac(0x13f)],_0x42a7ac(0x114)),_0x42a7ac(0x147)),_0x42a7ac(0x14a));return{'state':_0x3abd4a===_0x1ef990?'current':_0x42a7ac(0x14e),'expectedVersion':_0x1ef990,'skillVersion':_0x3abd4a,'installedPath':_0x34b630[_0x42a7ac(0x13f)],'repairCommand':REPAIR_COMMAND};}catch(_0x1bbfe6){return{'state':_0x42a7ac(0x125),'expectedVersion':_0x1ef990,'installedPath':_0x34b630[_0x42a7ac(0x13f)],'reason':_0x1bbfe6 instanceof Error?_0x1bbfe6[_0x42a7ac(0x143)]:String(_0x1bbfe6),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x3bebc1={}){const _0x41c217=a136_0x46a372,_0x33ef43=_0x3bebc1['packageRoot']??DEFAULT_PACKAGE_ROOT;let _0x4c833d;try{_0x4c833d=readSource(_0x33ef43);}catch(_0x4d33e0){return{'state':_0x41c217(0x125),'packageVersion':_0x41c217(0x111),'reason':_0x4d33e0 instanceof Error?_0x4d33e0[_0x41c217(0x143)]:String(_0x4d33e0),'repairCommand':REPAIR_COMMAND};}const _0x1f2a7e=installedSkillPath(_0x3bebc1['home']??homedir());if(_0x1f2a7e['state']===_0x41c217(0x126))return{'state':_0x41c217(0x126),'packageVersion':_0x4c833d[_0x41c217(0x113)],'repairCommand':REPAIR_COMMAND};if(_0x1f2a7e[_0x41c217(0x116)]==='unverifiable')return{'state':_0x41c217(0x125),'packageVersion':_0x4c833d[_0x41c217(0x113)],'reason':_0x1f2a7e['reason'],'repairCommand':REPAIR_COMMAND};try{const _0x17833b=frontmatterValue(readFileSync(join(_0x1f2a7e[_0x41c217(0x13f)],_0x41c217(0x114)),_0x41c217(0x147)),_0x41c217(0x14a));if(_0x17833b!==_0x4c833d[_0x41c217(0x14d)])return{'state':_0x41c217(0x14e),'packageVersion':_0x4c833d['packageVersion'],'skillVersion':_0x17833b,'installedPath':_0x1f2a7e[_0x41c217(0x13f)],'repairCommand':REPAIR_COMMAND};const _0x48b704=listFiles(_0x1f2a7e[_0x41c217(0x13f)]),_0x34855f=digestFiles(_0x1f2a7e[_0x41c217(0x13f)],_0x48b704);return{'state':sameFiles(_0x48b704,_0x4c833d['manifest'][_0x41c217(0x12a)])&&_0x34855f===_0x4c833d[_0x41c217(0x134)][_0x41c217(0x141)]?_0x41c217(0x144):_0x41c217(0x117),'packageVersion':_0x4c833d[_0x41c217(0x113)],'skillVersion':_0x17833b,'installedPath':_0x1f2a7e[_0x41c217(0x13f)],'digest':_0x34855f,'repairCommand':REPAIR_COMMAND};}catch(_0x220cc5){return{'state':_0x41c217(0x125),'packageVersion':_0x4c833d[_0x41c217(0x113)],'installedPath':_0x1f2a7e[_0x41c217(0x13f)],'reason':_0x220cc5 instanceof Error?_0x220cc5[_0x41c217(0x143)]:String(_0x220cc5),'repairCommand':REPAIR_COMMAND};}}function failure(_0x264c12,_0x3dd2a9,_0x44eafd,_0x503444){const _0xb79be=a136_0x46a372;return{'ok':![],'code':_0x264c12,'packageVersion':_0x3dd2a9[_0xb79be(0x113)],'skillVersion':_0x3dd2a9['skillVersion'],'installedPath':_0x503444,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x44eafd instanceof Error?_0x44eafd['message']:String(_0x44eafd)};}export function installBuiltinSkill(_0x20a79c={}){const _0xa1fd94=a136_0x46a372,_0x32c07c=_0x20a79c[_0xa1fd94(0x12c)]??DEFAULT_PACKAGE_ROOT,_0x2d4e25=_0x20a79c[_0xa1fd94(0x130)]??homedir();let _0x5bbb8a;try{_0x5bbb8a=readSource(_0x32c07c);}catch(_0x196343){return failure('SOURCE_INVALID',{'packageVersion':_0xa1fd94(0x111),'skillVersion':_0xa1fd94(0x111)},_0x196343);}const _0x1cf0ba=inspectBuiltinSkill({'packageRoot':_0x32c07c,'home':_0x2d4e25}),_0xf9b5a3=runNpxSkillsAddGlobal(_0x32c07c,_0x5bbb8a[_0xa1fd94(0x119)],{'stdio':_0x20a79c['stdio']??_0xa1fd94(0x135),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x2d4e25}});if(_0xf9b5a3['skipped'])return{'ok':!![],'packageVersion':_0x5bbb8a['packageVersion'],'skillVersion':_0x5bbb8a[_0xa1fd94(0x14d)],'installedPath':_0x1cf0ba['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0xf9b5a3['ok'])return failure(_0xa1fd94(0x11c),_0x5bbb8a,_0xf9b5a3[_0xa1fd94(0x12b)]??_0xa1fd94(0x14c)+_0xf9b5a3[_0xa1fd94(0x12f)]);const _0x273931=inspectBuiltinSkill({'packageRoot':_0x32c07c,'home':_0x2d4e25});if(_0x273931[_0xa1fd94(0x116)]!==_0xa1fd94(0x144))return failure(_0xa1fd94(0x145),_0x5bbb8a,_0x273931['reason']??_0xa1fd94(0x11f)+_0x273931[_0xa1fd94(0x116)],_0x273931[_0xa1fd94(0x112)]);return{'ok':!![],'packageVersion':_0x5bbb8a[_0xa1fd94(0x113)],'skillVersion':_0x5bbb8a['skillVersion'],'installedPath':_0x273931['installedPath'],'changed':_0x1cf0ba[_0xa1fd94(0x116)]!==_0xa1fd94(0x144),'repairCommand':REPAIR_COMMAND};}
1
+ const a136_0x4fbbb2=a136_0x5e50;(function(_0x21ddac,_0x401138){const _0x182f34=a136_0x5e50,_0x3ac120=_0x21ddac();while(!![]){try{const _0x3ea1c2=parseInt(_0x182f34(0x21f))/0x1+-parseInt(_0x182f34(0x1f8))/0x2+parseInt(_0x182f34(0x22f))/0x3*(parseInt(_0x182f34(0x21c))/0x4)+parseInt(_0x182f34(0x224))/0x5+-parseInt(_0x182f34(0x22e))/0x6*(-parseInt(_0x182f34(0x221))/0x7)+parseInt(_0x182f34(0x200))/0x8+-parseInt(_0x182f34(0x206))/0x9;if(_0x3ea1c2===_0x401138)break;else _0x3ac120['push'](_0x3ac120['shift']());}catch(_0x598f6d){_0x3ac120['push'](_0x3ac120['shift']());}}}(a136_0x55a5,0x938c8));import{createHash}from'node:crypto';import{lstatSync,readFileSync,readdirSync}from'node:fs';import{homedir}from'node:os';import{dirname,join,relative,resolve,sep}from'node:path';import{fileURLToPath}from'node:url';import{debuglog}from'node:util';import{runNpxSkillsAddGlobal}from'../skills/npx-skills-add.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND=a136_0x4fbbb2(0x220),SKILL_NAME=a136_0x4fbbb2(0x1fd),debug=debuglog(a136_0x4fbbb2(0x22c));function frontmatterValue(_0x4675db,_0x3c9699){const _0x58e3a3=a136_0x4fbbb2;return _0x4675db[_0x58e3a3(0x21d)](new RegExp('^'+_0x3c9699+_0x58e3a3(0x1ed),'m'))?.[0x1]?.[_0x58e3a3(0x1ec)]()??'';}function listFiles(_0x46cf9e,_0x2c6bad=_0x46cf9e){const _0x450d85=a136_0x4fbbb2;return readdirSync(_0x2c6bad,{'withFileTypes':!![]})['flatMap'](_0x24b911=>{const _0x3a2d68=a136_0x5e50,_0x90fa28=join(_0x2c6bad,_0x24b911[_0x3a2d68(0x21a)]),_0x259351=lstatSync(_0x90fa28);if(_0x259351[_0x3a2d68(0x1f5)]())throw new Error(_0x3a2d68(0x20a)+_0x90fa28);if(_0x259351['isDirectory']())return listFiles(_0x46cf9e,_0x90fa28);if(!_0x259351[_0x3a2d68(0x1ee)]())throw new Error(_0x3a2d68(0x1f2)+_0x90fa28);return[relative(_0x46cf9e,_0x90fa28)[_0x3a2d68(0x215)](sep)[_0x3a2d68(0x1ea)]('/')];})[_0x450d85(0x204)]((_0x5f30fd,_0x1c6b09)=>_0x5f30fd<_0x1c6b09?-0x1:_0x5f30fd>_0x1c6b09?0x1:0x0);}function digestFiles(_0x43d910,_0x3e3c30){const _0x242d5b=a136_0x4fbbb2,_0x3aa876=createHash(_0x242d5b(0x202));for(const _0x2d2d9f of _0x3e3c30){if(_0x2d2d9f[_0x242d5b(0x208)]('/')||_0x2d2d9f[_0x242d5b(0x215)]('/')['includes']('..')||_0x2d2d9f[_0x242d5b(0x21e)]('\x5c'))throw new Error('Unsafe\x20manifest\x20path:\x20'+_0x2d2d9f);_0x3aa876[_0x242d5b(0x1ff)](_0x2d2d9f),_0x3aa876['update']('\x00'),_0x3aa876[_0x242d5b(0x1ff)](readFileSync(join(_0x43d910,..._0x2d2d9f[_0x242d5b(0x215)]('/')))),_0x3aa876[_0x242d5b(0x1ff)]('\x00');}return _0x3aa876['digest']('hex');}function sameFiles(_0x202457,_0x4965de){const _0x489016=a136_0x4fbbb2;return _0x202457[_0x489016(0x1fe)]===_0x4965de[_0x489016(0x1fe)]&&_0x202457[_0x489016(0x209)]((_0x780bc,_0x3f6152)=>_0x780bc===_0x4965de[_0x3f6152]);}function readSource(_0x30ad94){const _0x2171ab=a136_0x4fbbb2,_0xb0b6bc=JSON[_0x2171ab(0x20f)](readFileSync(join(_0x30ad94,'package.json'),_0x2171ab(0x1f3))),_0x53af89=JSON[_0x2171ab(0x20f)](readFileSync(join(_0x30ad94,_0x2171ab(0x210),_0x2171ab(0x201)),_0x2171ab(0x1f3))),_0x5614a8=join(_0x30ad94,_0x2171ab(0x210),SKILL_NAME),_0x1b1631=frontmatterValue(readFileSync(join(_0x5614a8,_0x2171ab(0x1fc)),'utf8'),'version'),_0xf46465=listFiles(_0x5614a8);if(_0x53af89[_0x2171ab(0x1eb)]!==0x1||_0x53af89['name']!==SKILL_NAME||!_0xb0b6bc[_0x2171ab(0x222)]||_0x53af89[_0x2171ab(0x228)]!==_0xb0b6bc[_0x2171ab(0x222)]||_0x53af89[_0x2171ab(0x20e)]!==_0xb0b6bc[_0x2171ab(0x222)]||_0x1b1631!==_0xb0b6bc[_0x2171ab(0x222)]||!sameFiles(_0xf46465,_0x53af89[_0x2171ab(0x225)])||digestFiles(_0x5614a8,_0xf46465)!==_0x53af89[_0x2171ab(0x1f9)])throw new Error(_0x2171ab(0x22b));return{'packageVersion':_0xb0b6bc[_0x2171ab(0x222)],'skillVersion':_0x1b1631,'root':_0x5614a8,'manifest':_0x53af89};}function a136_0x55a5(){const _0x3e7cc5=['unverifiable','reason','\x20verified;\x20','Unsupported\x20Skill\x20entry:\x20','utf8','home','isSymbolicLink','content_mismatch','absent','784764upnKCd','digest','Installed\x20Skill\x20state\x20is\x20','skipped','SKILL.md','lovrabet','length','update','1809032lRJWun','lovrabet.manifest.json','sha256','partialFailure','sort','packageRoot','14586741vQUOCn','status','startsWith','every','Symbolic\x20link\x20is\x20not\x20allowed:\x20','installedPath','VERIFY_FAILED','current','skillVersion','parse','skills','path','message','SOURCE_INVALID','present','split','root','skills@latest\x20exited\x20','state','unknown','name','stdio','9404NJxbnj','match','includes','734130MnlfYX','lovrabet\x20cli-skill\x20install','1057icgzyY','version','Installer\x20reported\x20partial\x20target\x20failures:\x0a%s','293045xTKaDF','files','missing','CLI\x20Built-in\x20Skill\x20','packageVersion','log','count','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','lovrabet-skills','manifest','44838FPcuSj','600xFcmPU','version_mismatch','join','schemaVersion','trim',':\x5cs*(.+)$','isFile'];a136_0x55a5=function(){return _0x3e7cc5;};return a136_0x55a5();}function installedSkillPath(_0x458351){const _0x23a9b2=a136_0x4fbbb2,_0x1d11bc=resolveInstalledSkill(SKILL_NAME,{'home':_0x458351});if(_0x1d11bc['state']===_0x23a9b2(0x214))return{'state':_0x23a9b2(0x214),'path':dirname(_0x1d11bc[_0x23a9b2(0x211)])};if(_0x1d11bc[_0x23a9b2(0x218)]===_0x23a9b2(0x1f7))return{'state':_0x23a9b2(0x226)};return{'state':_0x23a9b2(0x1ef),'reason':_0x1d11bc['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x436579,_0x3f63be={}){const _0x100aee=a136_0x4fbbb2,_0x98fb56=installedSkillPath(_0x3f63be[_0x100aee(0x1f4)]??homedir());if(_0x98fb56[_0x100aee(0x218)]===_0x100aee(0x226))return{'state':_0x100aee(0x226),'expectedVersion':_0x436579,'repairCommand':REPAIR_COMMAND};if(_0x98fb56[_0x100aee(0x218)]===_0x100aee(0x1ef))return{'state':_0x100aee(0x1ef),'expectedVersion':_0x436579,'reason':_0x98fb56[_0x100aee(0x1f0)],'repairCommand':REPAIR_COMMAND};try{const _0x6dcbb7=frontmatterValue(readFileSync(join(_0x98fb56[_0x100aee(0x211)],_0x100aee(0x1fc)),_0x100aee(0x1f3)),_0x100aee(0x222));return{'state':_0x6dcbb7===_0x436579?_0x100aee(0x20d):_0x100aee(0x1e9),'expectedVersion':_0x436579,'skillVersion':_0x6dcbb7,'installedPath':_0x98fb56[_0x100aee(0x211)],'repairCommand':REPAIR_COMMAND};}catch(_0x4c419c){return{'state':_0x100aee(0x1ef),'expectedVersion':_0x436579,'installedPath':_0x98fb56['path'],'reason':_0x4c419c instanceof Error?_0x4c419c[_0x100aee(0x212)]:String(_0x4c419c),'repairCommand':REPAIR_COMMAND};}}function a136_0x5e50(_0x3d53a0,_0x497534){_0x3d53a0=_0x3d53a0-0x1e9;const _0x55a55c=a136_0x55a5();let _0x5e508c=_0x55a55c[_0x3d53a0];return _0x5e508c;}export function inspectBuiltinSkill(_0x389a05={}){const _0x3fcdc1=a136_0x4fbbb2,_0xde313f=_0x389a05[_0x3fcdc1(0x205)]??DEFAULT_PACKAGE_ROOT;let _0x30fd6b;try{_0x30fd6b=readSource(_0xde313f);}catch(_0x43cfa8){return{'state':_0x3fcdc1(0x1ef),'packageVersion':'unknown','reason':_0x43cfa8 instanceof Error?_0x43cfa8[_0x3fcdc1(0x212)]:String(_0x43cfa8),'repairCommand':REPAIR_COMMAND};}const _0x2d4b4a=installedSkillPath(_0x389a05['home']??homedir());if(_0x2d4b4a[_0x3fcdc1(0x218)]===_0x3fcdc1(0x226))return{'state':_0x3fcdc1(0x226),'packageVersion':_0x30fd6b[_0x3fcdc1(0x228)],'repairCommand':REPAIR_COMMAND};if(_0x2d4b4a[_0x3fcdc1(0x218)]==='unverifiable')return{'state':_0x3fcdc1(0x1ef),'packageVersion':_0x30fd6b[_0x3fcdc1(0x228)],'reason':_0x2d4b4a[_0x3fcdc1(0x1f0)],'repairCommand':REPAIR_COMMAND};try{const _0xf3225a=frontmatterValue(readFileSync(join(_0x2d4b4a[_0x3fcdc1(0x211)],_0x3fcdc1(0x1fc)),_0x3fcdc1(0x1f3)),_0x3fcdc1(0x222));if(_0xf3225a!==_0x30fd6b[_0x3fcdc1(0x20e)])return{'state':_0x3fcdc1(0x1e9),'packageVersion':_0x30fd6b[_0x3fcdc1(0x228)],'skillVersion':_0xf3225a,'installedPath':_0x2d4b4a[_0x3fcdc1(0x211)],'repairCommand':REPAIR_COMMAND};const _0x4cd12f=listFiles(_0x2d4b4a[_0x3fcdc1(0x211)]),_0x3ce5f5=digestFiles(_0x2d4b4a[_0x3fcdc1(0x211)],_0x4cd12f);return{'state':sameFiles(_0x4cd12f,_0x30fd6b[_0x3fcdc1(0x22d)]['files'])&&_0x3ce5f5===_0x30fd6b['manifest']['digest']?_0x3fcdc1(0x20d):_0x3fcdc1(0x1f6),'packageVersion':_0x30fd6b[_0x3fcdc1(0x228)],'skillVersion':_0xf3225a,'installedPath':_0x2d4b4a[_0x3fcdc1(0x211)],'digest':_0x3ce5f5,'repairCommand':REPAIR_COMMAND};}catch(_0x4a7b94){return{'state':_0x3fcdc1(0x1ef),'packageVersion':_0x30fd6b['packageVersion'],'installedPath':_0x2d4b4a[_0x3fcdc1(0x211)],'reason':_0x4a7b94 instanceof Error?_0x4a7b94['message']:String(_0x4a7b94),'repairCommand':REPAIR_COMMAND};}}function failure(_0xd9ecf0,_0x2a803a,_0x4471bc,_0x56fd29){const _0x2f3d03=a136_0x4fbbb2;return{'ok':![],'code':_0xd9ecf0,'packageVersion':_0x2a803a[_0x2f3d03(0x228)],'skillVersion':_0x2a803a['skillVersion'],'installedPath':_0x56fd29,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x4471bc instanceof Error?_0x4471bc[_0x2f3d03(0x212)]:String(_0x4471bc)};}export function installBuiltinSkill(_0xbe5128={}){const _0x5a1451=a136_0x4fbbb2,_0x1f3d92=_0xbe5128[_0x5a1451(0x205)]??DEFAULT_PACKAGE_ROOT,_0x403d5c=_0xbe5128[_0x5a1451(0x1f4)]??homedir();let _0x47fff3;try{_0x47fff3=readSource(_0x1f3d92);}catch(_0x4a1e7f){return failure(_0x5a1451(0x213),{'packageVersion':_0x5a1451(0x219),'skillVersion':_0x5a1451(0x219)},_0x4a1e7f);}const _0x808e30=inspectBuiltinSkill({'packageRoot':_0x1f3d92,'home':_0x403d5c}),_0x32b31b=runNpxSkillsAddGlobal(_0x1f3d92,_0x47fff3[_0x5a1451(0x216)],{'stdio':_0xbe5128[_0x5a1451(0x21b)]??'pipe','expectedSkillName':SKILL_NAME,'presence':{'home':_0x403d5c}});if(_0x32b31b[_0x5a1451(0x1fb)])return{'ok':!![],'packageVersion':_0x47fff3[_0x5a1451(0x228)],'skillVersion':_0x47fff3[_0x5a1451(0x20e)],'installedPath':_0x808e30[_0x5a1451(0x20b)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x32b31b['ok'])return failure('INSTALL_FAILED',_0x47fff3,_0x32b31b['error']??_0x5a1451(0x217)+_0x32b31b[_0x5a1451(0x207)]);const _0x59de44=inspectBuiltinSkill({'packageRoot':_0x1f3d92,'home':_0x403d5c});if(_0x59de44[_0x5a1451(0x218)]!==_0x5a1451(0x20d)){const _0xf87ec4=_0x59de44[_0x5a1451(0x1f0)]??_0x5a1451(0x1fa)+_0x59de44['state'];return failure(_0x5a1451(0x20c),_0x47fff3,_0x32b31b['partialFailure']?_0xf87ec4+'\x0a'+_0x32b31b[_0x5a1451(0x203)]['output']:_0xf87ec4,_0x59de44[_0x5a1451(0x20b)]);}return _0x32b31b[_0x5a1451(0x203)]&&(debug(_0x5a1451(0x223),_0x32b31b[_0x5a1451(0x203)]['output']),console[_0x5a1451(0x229)](_0x5a1451(0x227)+_0x47fff3[_0x5a1451(0x20e)]+_0x5a1451(0x1f1)+_0x32b31b[_0x5a1451(0x203)][_0x5a1451(0x22a)]+'\x20automatically\x20selected\x20installation\x20target(s)\x20could\x20not\x20be\x20installed.')),{'ok':!![],'packageVersion':_0x47fff3[_0x5a1451(0x228)],'skillVersion':_0x47fff3[_0x5a1451(0x20e)],'installedPath':_0x59de44[_0x5a1451(0x20b)],'changed':_0x808e30[_0x5a1451(0x218)]!=='current','repairCommand':REPAIR_COMMAND};}
@@ -35,6 +35,11 @@ export interface RunNpxSkillsAddResult {
35
35
  status: number | null;
36
36
  code?: NpxSkillsErrorCode;
37
37
  error?: string;
38
+ /** Some auto-selected targets failed; caller must verify the installed Skill before display. */
39
+ partialFailure?: {
40
+ count: number;
41
+ output: string;
42
+ };
38
43
  /** `true` when execution was intentionally skipped via env var. */
39
44
  skipped?: boolean;
40
45
  }
@@ -1 +1 @@
1
- function a137_0x94ac(){const _0x33c117=['message','CHILD_EXIT_NONZERO','shortMessage','stdout','SPAWN_FAILED','336750ViJFjX','SKILL_NOT_INSTALLED','54666TxvfgY','stdio','INSTALL_PARTIAL','Skill\x20\x22','246yVsjJT','failed','warn','pipe','npx','absent','state','949616xvntJl','add','skipNpxSkillsEnvSuffix','PERMISSION_DENIED','158747qHigQA','npx\x20terminated\x20by\x20signal\x20','code','\x22\x20install\x20state:\x20','ENOENT','stderr','Installer\x20reported\x20','EPERM','exitCode','filter','signal','25735bDTZPp','1060NqsKhy','8UHAvnD','join','174600MbeCdx','checked','!\x20Could\x20not\x20verify\x20\x22','260302OqzEUv','match','reason','unknown','NPX_NOT_FOUND','log','presence','trim','npx\x20failed\x20to\x20start','globalSkillName','NPM_CONFIG_GLOBAL','internalSkillSource'];a137_0x94ac=function(){return _0x33c117;};return a137_0x94ac();}const a137_0x54e360=a137_0xd9b7;(function(_0x16aa8d,_0x40bc3e){const _0x2ec239=a137_0xd9b7,_0x58345e=_0x16aa8d();while(!![]){try{const _0x3d7245=parseInt(_0x2ec239(0x17c))/0x1+-parseInt(_0x2ec239(0x16b))/0x2+parseInt(_0x2ec239(0x18b))/0x3*(-parseInt(_0x2ec239(0x189))/0x4)+parseInt(_0x2ec239(0x187))/0x5*(-parseInt(_0x2ec239(0x171))/0x6)+-parseInt(_0x2ec239(0x18e))/0x7+-parseInt(_0x2ec239(0x178))/0x8+-parseInt(_0x2ec239(0x16d))/0x9*(-parseInt(_0x2ec239(0x188))/0xa);if(_0x3d7245===_0x40bc3e)break;else _0x58345e['push'](_0x58345e['shift']());}catch(_0x8a300b){_0x58345e['push'](_0x58345e['shift']());}}}(a137_0x94ac,0x24d75));import{execaSync}from'execa';import{LOVRABET_SKILL_SOURCE as a137_0x35977b}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a137_0x35977b;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a137_0x54e360(0x199)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a137_0x54e360(0x197)];function a137_0xd9b7(_0x2df32d,_0x3c37ad){_0x2df32d=_0x2df32d-0x16a;const _0x94aca9=a137_0x94ac();let _0xd9b76c=_0x94aca9[_0x2df32d];return _0xd9b76c;}export function resolveGlobalSkillName(_0x3933a0){const _0x3ecd7e=a137_0x54e360;switch(_0x3933a0[_0x3ecd7e(0x195)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a137_0x54e360(0x17a)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x26200d,_0xfa70d2,_0x403761){return{'ok':![],'status':_0xfa70d2,'code':_0x26200d,'error':'['+_0x26200d+']\x20'+_0x403761};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x57cbd3,_0x2894da=LOVRABET_SKILL_SOURCE,_0x2178e2){const _0x246bbf=a137_0x54e360;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5d6f60=['-y','skills@latest',_0x246bbf(0x179),_0x2894da,'-g','-y'],_0x2cc200=[_0x246bbf(0x175),..._0x5d6f60][_0x246bbf(0x18a)]('\x20');console[_0x246bbf(0x193)]('*\x20'+_0x2cc200);const _0xcdf548={...process.env};delete _0xcdf548['npm_config_global'],delete _0xcdf548[_0x246bbf(0x198)];const _0x477a43=execaSync(_0x246bbf(0x175),_0x5d6f60,{'cwd':_0x57cbd3,'stdio':'pipe','env':_0xcdf548,'extendEnv':![],'shell':![],'reject':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x5123ac=[_0x477a43['stdout']?String(_0x477a43[_0x246bbf(0x19d)]):'',_0x477a43['stderr']?String(_0x477a43[_0x246bbf(0x181)]):''][_0x246bbf(0x185)](Boolean)['join']('\x0a')[_0x246bbf(0x195)](),_0x37c363=_0x477a43[_0x246bbf(0x184)]??null;_0x2178e2?.[_0x246bbf(0x16e)]!==_0x246bbf(0x174)&&_0x5123ac&&console[_0x246bbf(0x193)](_0x5123ac);if(_0x477a43[_0x246bbf(0x17e)]){const _0x1fb433=_0x477a43['code']===_0x246bbf(0x180)?_0x246bbf(0x192):_0x477a43[_0x246bbf(0x17e)]===_0x246bbf(0x183)||_0x477a43['code']==='EACCES'?_0x246bbf(0x17b):_0x246bbf(0x16a);return failure(_0x1fb433,_0x37c363,_0x477a43[_0x246bbf(0x19c)]??_0x477a43[_0x246bbf(0x19a)]??_0x477a43[_0x246bbf(0x17e)]);}if(_0x477a43[_0x246bbf(0x186)])return failure('CHILD_TERMINATED',_0x37c363,_0x246bbf(0x17d)+_0x477a43[_0x246bbf(0x186)]);if(_0x477a43[_0x246bbf(0x172)]&&_0x37c363===null)return failure(_0x246bbf(0x16a),_0x37c363,_0x477a43['shortMessage']??_0x477a43[_0x246bbf(0x19a)]??_0x246bbf(0x196));if(_0x37c363!==0x0)return failure(_0x246bbf(0x19b),_0x37c363,_0x5123ac||_0x477a43['shortMessage']||'exit\x20'+(_0x37c363??_0x246bbf(0x191)));const _0x5859f1=_0x2178e2?.['expectedSkillName']??resolveGlobalSkillName(_0x2894da),_0x450b40=_0x5859f1?resolveInstalledSkill(_0x5859f1,_0x2178e2?.[_0x246bbf(0x194)]):undefined,_0x15a063=_0x5123ac[_0x246bbf(0x18f)](/Failed to install\s+(\d+)/i);if(_0x15a063&&Number(_0x15a063[0x1])>0x0){const _0xc34dee=_0x246bbf(0x182)+_0x15a063[0x1]+'\x20failed\x20target(s)'+(_0x5123ac?':\x0a'+_0x5123ac:'');if(_0x450b40?.[_0x246bbf(0x177)]==='present')return console[_0x246bbf(0x173)]('!\x20'+_0xc34dee),{'ok':!![],'status':0x0};return failure(_0x246bbf(0x16f),0x0,_0xc34dee);}if(_0x5859f1&&_0x450b40){if(_0x450b40[_0x246bbf(0x177)]===_0x246bbf(0x176))return failure(_0x246bbf(0x16c),0x0,_0x246bbf(0x170)+_0x5859f1+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0x450b40[_0x246bbf(0x18c)][_0x246bbf(0x18a)](',\x20')+')');_0x450b40[_0x246bbf(0x177)]==='unverifiable'&&console[_0x246bbf(0x173)](_0x246bbf(0x18d)+_0x5859f1+_0x246bbf(0x17f)+_0x450b40[_0x246bbf(0x190)]);}return{'ok':!![],'status':0x0};}
1
+ const a137_0x3ed1c5=a137_0x3bab;(function(_0x29baac,_0x5914e1){const _0x457082=a137_0x3bab,_0x404c3c=_0x29baac();while(!![]){try{const _0x59f80b=parseInt(_0x457082(0x1f0))/0x1*(-parseInt(_0x457082(0x207))/0x2)+parseInt(_0x457082(0x1f4))/0x3+-parseInt(_0x457082(0x1fc))/0x4+parseInt(_0x457082(0x209))/0x5*(-parseInt(_0x457082(0x1de))/0x6)+-parseInt(_0x457082(0x1ec))/0x7+parseInt(_0x457082(0x1ea))/0x8*(parseInt(_0x457082(0x1ff))/0x9)+parseInt(_0x457082(0x1da))/0xa;if(_0x59f80b===_0x5914e1)break;else _0x404c3c['push'](_0x404c3c['shift']());}catch(_0x5bde07){_0x404c3c['push'](_0x404c3c['shift']());}}}(a137_0x359b,0x7130e));import{execaSync}from'execa';function a137_0x359b(){const _0x25380d=['CHILD_TERMINATED','1467365JNQgLq','present','stderr','SKILL_NOT_INSTALLED','ENOENT','15881270acQDIN','!\x20Could\x20not\x20verify\x20\x22','skipNpxSkillsEnvSuffix','\x22\x20install\x20state:\x20','6hHOvVB','presence','state','stdio','partialFailure','pipe','CHILD_EXIT_NONZERO','exit\x20','npx\x20terminated\x20by\x20signal\x20','join','npx','EACCES','8mzGqHD','npm_config_global','5720680WPnEkJ','log','failed','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','217687zQONpe','checked','code','unverifiable','146310CVrwbc','absent','NPX_NOT_FOUND','Skill\x20\x22','skills@latest','\x20failed\x20target(s)','stdout','reason','1343304MVrTQy','SPAWN_FAILED','message','6377814LPfZEe','exitCode','INSTALL_PARTIAL','shortMessage','filter','add','PERMISSION_DENIED','npx\x20failed\x20to\x20start','4TCCxtg'];a137_0x359b=function(){return _0x25380d;};return a137_0x359b();}import{LOVRABET_SKILL_SOURCE as a137_0x27d034}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a137_0x27d034;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG['internalSkillSource'];function a137_0x3bab(_0x5a13df,_0x6b201f){_0x5a13df=_0x5a13df-0x1d6;const _0x359b47=a137_0x359b();let _0x3bab7c=_0x359b47[_0x5a13df];return _0x3bab7c;}export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG['globalSkillName'];export function resolveGlobalSkillName(_0x59bbf2){switch(_0x59bbf2['trim']()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a137_0x3ed1c5(0x1dc)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x3eef3a,_0x2cda28,_0x82a79f){return{'ok':![],'status':_0x2cda28,'code':_0x3eef3a,'error':'['+_0x3eef3a+']\x20'+_0x82a79f};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x52cabf,_0xab20c=LOVRABET_SKILL_SOURCE,_0xe8f85b){const _0x1eb365=a137_0x3ed1c5;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1b54d2=['-y',_0x1eb365(0x1f8),_0x1eb365(0x204),_0xab20c,'-g','-y'],_0x537e92=[_0x1eb365(0x1e8),..._0x1b54d2]['join']('\x20');console[_0x1eb365(0x1ed)]('*\x20'+_0x537e92);const _0x436dc1={...process.env};delete _0x436dc1[_0x1eb365(0x1eb)],delete _0x436dc1['NPM_CONFIG_GLOBAL'];const _0x48591c=execaSync('npx',_0x1b54d2,{'cwd':_0x52cabf,'stdio':'pipe','env':_0x436dc1,'extendEnv':![],'shell':![],'reject':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x4345f5=[_0x48591c[_0x1eb365(0x1fa)]?String(_0x48591c['stdout']):'',_0x48591c[_0x1eb365(0x1d7)]?String(_0x48591c['stderr']):''][_0x1eb365(0x203)](Boolean)[_0x1eb365(0x1e7)]('\x0a')['trim'](),_0x57bf82=_0x48591c[_0x1eb365(0x200)]??null,_0x92791a=_0x21f8b6=>{const _0x2df123=_0x1eb365;return _0xe8f85b?.[_0x2df123(0x1e1)]!==_0x2df123(0x1e3)&&!_0x21f8b6[_0x2df123(0x1e2)]&&_0x4345f5&&console[_0x2df123(0x1ed)](_0x4345f5),_0x21f8b6;};if(_0x48591c[_0x1eb365(0x1f2)]){const _0x9d39a3=_0x48591c[_0x1eb365(0x1f2)]===_0x1eb365(0x1d9)?_0x1eb365(0x1f6):_0x48591c['code']==='EPERM'||_0x48591c[_0x1eb365(0x1f2)]===_0x1eb365(0x1e9)?_0x1eb365(0x205):_0x1eb365(0x1fd);return _0x92791a(failure(_0x9d39a3,_0x57bf82,_0x48591c['shortMessage']??_0x48591c[_0x1eb365(0x1fe)]??_0x48591c[_0x1eb365(0x1f2)]));}if(_0x48591c['signal'])return _0x92791a(failure(_0x1eb365(0x208),_0x57bf82,_0x1eb365(0x1e6)+_0x48591c['signal']));if(_0x48591c[_0x1eb365(0x1ee)]&&_0x57bf82===null)return _0x92791a(failure(_0x1eb365(0x1fd),_0x57bf82,_0x48591c[_0x1eb365(0x202)]??_0x48591c[_0x1eb365(0x1fe)]??_0x1eb365(0x206)));if(_0x57bf82!==0x0)return _0x92791a(failure(_0x1eb365(0x1e4),_0x57bf82,_0x4345f5||_0x48591c[_0x1eb365(0x202)]||_0x1eb365(0x1e5)+(_0x57bf82??'unknown')));const _0xb7b705=_0xe8f85b?.['expectedSkillName']??resolveGlobalSkillName(_0xab20c),_0x2a22a6=_0xb7b705?resolveInstalledSkill(_0xb7b705,_0xe8f85b?.[_0x1eb365(0x1df)]):undefined,_0x2f42e5=_0x4345f5['match'](/Failed to install\s+(\d+)/i);if(_0x2f42e5&&Number(_0x2f42e5[0x1])>0x0){const _0x125ae2='Installer\x20reported\x20'+_0x2f42e5[0x1]+_0x1eb365(0x1f9)+(_0x4345f5?':\x0a'+_0x4345f5:'');if(_0x2a22a6?.[_0x1eb365(0x1e0)]===_0x1eb365(0x1d6))return{'ok':!![],'status':0x0,'partialFailure':{'count':Number(_0x2f42e5[0x1]),'output':_0x4345f5}};return _0x92791a(failure(_0x1eb365(0x201),0x0,_0x125ae2));}if(_0xb7b705&&_0x2a22a6){if(_0x2a22a6[_0x1eb365(0x1e0)]===_0x1eb365(0x1f5))return _0x92791a(failure(_0x1eb365(0x1d8),0x0,_0x1eb365(0x1f7)+_0xb7b705+_0x1eb365(0x1ef)+_0x2a22a6[_0x1eb365(0x1f1)][_0x1eb365(0x1e7)](',\x20')+')'));_0x2a22a6[_0x1eb365(0x1e0)]===_0x1eb365(0x1f3)&&console['warn'](_0x1eb365(0x1db)+_0xb7b705+_0x1eb365(0x1dd)+_0x2a22a6[_0x1eb365(0x1fb)]);}return _0x92791a({'ok':!![],'status':0x0});}
@@ -1 +1 @@
1
- const a138_0x2c3d8c=a138_0x5720;(function(_0x2e7a82,_0x50f3bb){const _0x3cafe7=a138_0x5720,_0x2730f6=_0x2e7a82();while(!![]){try{const _0x38e8c4=-parseInt(_0x3cafe7(0xf3))/0x1*(parseInt(_0x3cafe7(0xf6))/0x2)+parseInt(_0x3cafe7(0xed))/0x3+parseInt(_0x3cafe7(0xf7))/0x4+-parseInt(_0x3cafe7(0xfa))/0x5+-parseInt(_0x3cafe7(0xf9))/0x6+parseInt(_0x3cafe7(0xf4))/0x7+-parseInt(_0x3cafe7(0xec))/0x8*(-parseInt(_0x3cafe7(0xeb))/0x9);if(_0x38e8c4===_0x50f3bb)break;else _0x2730f6['push'](_0x2730f6['shift']());}catch(_0x2a2f00){_0x2730f6['push'](_0x2730f6['shift']());}}}(a138_0x16ba,0xcfb57));function a138_0x16ba(){const _0xe27681=['node_modules','.svn','.DS_Store','.hg','.git','16429lbzboR','9119215PQIPfr','build','162AqAbCd','6394248Cndnbh','.cache','3551064ESbovX','7286365jJUmFk','SKILL.md','594tiLaLh','36488ZiRknj','3084924eusqTq'];a138_0x16ba=function(){return _0xe27681;};return a138_0x16ba();}export const METADATA_FILE='lovrabet.skill.json';export const SKILL_FILE=a138_0x2c3d8c(0xfb);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a138_0x2c3d8c(0xf0)]);function a138_0x5720(_0xb03182,_0x5db023){_0xb03182=_0xb03182-0xeb;const _0x16ba13=a138_0x16ba();let _0x5720bf=_0x16ba13[_0xb03182];return _0x5720bf;}export const IGNORED_DIR_NAMES=new Set([a138_0x2c3d8c(0xf2),a138_0x2c3d8c(0xf1),a138_0x2c3d8c(0xef),a138_0x2c3d8c(0xee),'.next','dist',a138_0x2c3d8c(0xf5),'coverage','.turbo',a138_0x2c3d8c(0xf8)]);
1
+ const a138_0x24014a=a138_0x3f18;function a138_0x3f18(_0x2207db,_0xb30597){_0x2207db=_0x2207db-0x194;const _0x3b07ef=a138_0x3b07();let _0x3f1873=_0x3b07ef[_0x2207db];return _0x3f1873;}(function(_0x40e854,_0x19d8b5){const _0x189f0e=a138_0x3f18,_0x18777f=_0x40e854();while(!![]){try{const _0x3f09fa=-parseInt(_0x189f0e(0x1a4))/0x1*(parseInt(_0x189f0e(0x1a1))/0x2)+parseInt(_0x189f0e(0x19d))/0x3+-parseInt(_0x189f0e(0x1a2))/0x4*(-parseInt(_0x189f0e(0x1a9))/0x5)+-parseInt(_0x189f0e(0x1a6))/0x6+parseInt(_0x189f0e(0x19b))/0x7+-parseInt(_0x189f0e(0x1a7))/0x8*(parseInt(_0x189f0e(0x194))/0x9)+-parseInt(_0x189f0e(0x1a0))/0xa;if(_0x3f09fa===_0x19d8b5)break;else _0x18777f['push'](_0x18777f['shift']());}catch(_0x39dd8b){_0x18777f['push'](_0x18777f['shift']());}}}(a138_0x3b07,0x23f09));export const METADATA_FILE=a138_0x24014a(0x199);export const SKILL_FILE=a138_0x24014a(0x1a5);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a138_0x24014a(0x195)]);function a138_0x3b07(){const _0x16b210=['.DS_Store','.hg','.cache','dist','lovrabet.skill.json','.next','1001105yOrumi','.turbo','619638dLeJdZ','coverage','build','810610XNhSoD','158JEMLrE','88exIKPy','.git','977tgLWzJ','SKILL.md','1723554GzUChO','8psqFGT','.svn','61075LPFzLc','230211vuHaTX'];a138_0x3b07=function(){return _0x16b210;};return a138_0x3b07();}export const IGNORED_DIR_NAMES=new Set([a138_0x24014a(0x1a3),a138_0x24014a(0x196),a138_0x24014a(0x1a8),'node_modules',a138_0x24014a(0x19a),a138_0x24014a(0x198),a138_0x24014a(0x19f),a138_0x24014a(0x19e),a138_0x24014a(0x19c),a138_0x24014a(0x197)]);
@@ -1 +1 @@
1
- (function(_0x25c221,_0x5b5fd6){const _0x5d4852=a139_0x77ee,_0x238a57=_0x25c221();while(!![]){try{const _0x39b539=-parseInt(_0x5d4852(0x13c))/0x1*(-parseInt(_0x5d4852(0x146))/0x2)+parseInt(_0x5d4852(0x144))/0x3+-parseInt(_0x5d4852(0x140))/0x4+parseInt(_0x5d4852(0x14a))/0x5+-parseInt(_0x5d4852(0x143))/0x6*(-parseInt(_0x5d4852(0x13f))/0x7)+parseInt(_0x5d4852(0x149))/0x8+-parseInt(_0x5d4852(0x145))/0x9;if(_0x39b539===_0x5b5fd6)break;else _0x238a57['push'](_0x238a57['shift']());}catch(_0xefe3ed){_0x238a57['push'](_0x238a57['shift']());}}}(a139_0x3193,0x1a873));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';function a139_0x77ee(_0x6af751,_0x58608e){_0x6af751=_0x6af751-0x13a;const _0x3193a6=a139_0x3193();let _0x77ee94=_0x3193a6[_0x6af751];return _0x77ee94;}import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';function a139_0x3193(){const _0x421367=['142816TqvgMs','305880ybbyns','validation','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','Unsafe\x20Skill\x20file\x20path:\x20','3oyUTGn','endsWith','from','28GXICmr','286656ngUqcK','startsWith','split','117408ZiKpZf','176739zpFDEP','2074365OSyQCu','129730kTwMyy','.tmp','isSymbolicLink'];a139_0x3193=function(){return _0x421367;};return a139_0x3193();}export function resolveManagedFilePath(_0x22edf5,_0x3984a3){const _0x33bec3=a139_0x77ee,_0x219487=normalizeSkillRelativePath(_0x3984a3),_0x3d2224=realOrResolved(_0x22edf5),_0x2716e1=resolve(_0x3d2224,..._0x219487[_0x33bec3(0x142)]('/'));if(!isPathInside(_0x2716e1,_0x3d2224))throw CliErrors[_0x33bec3(0x14b)](_0x33bec3(0x13b)+_0x3984a3);return ensureNoSymlinkInManagedPath(_0x3d2224,_0x219487),_0x2716e1;}export function ensureNoSymlinkInManagedPath(_0x571812,_0x54a55b){const _0x56d79c=a139_0x77ee;let _0x2eb6a6=_0x571812;for(const _0x30cbea of _0x54a55b[_0x56d79c(0x142)]('/')){_0x2eb6a6=resolve(_0x2eb6a6,_0x30cbea);const _0x40fdda=lstatIfPresent(_0x2eb6a6);if(_0x40fdda?.[_0x56d79c(0x148)]())throw CliErrors[_0x56d79c(0x14b)](_0x56d79c(0x13a)+_0x54a55b);}}export function isDanglingSymlink(_0x306977){const _0x119656=a139_0x77ee;try{return lstatSync(_0x306977)[_0x119656(0x148)]();}catch{return![];}}export function resolveSymlinkTarget(_0x489c74){const _0x25c332=readlinkSync(_0x489c74);return isAbsolute(_0x25c332)?_0x25c332:resolve(dirname(_0x489c74),_0x25c332);}export function isPathInside(_0x4d8a0c,_0x2456d5){const _0x491e80=a139_0x77ee,_0x428275=_0x4d8a0c[_0x491e80(0x13d)](sep)?_0x4d8a0c:''+_0x4d8a0c+sep,_0x42f617=_0x2456d5[_0x491e80(0x13d)](sep)?_0x2456d5:''+_0x2456d5+sep;return _0x4d8a0c===_0x2456d5||_0x428275[_0x491e80(0x141)](_0x42f617);}export function realOrResolved(_0x50355f){try{return realpathSync(_0x50355f);}catch{return resolve(_0x50355f);}}export function lstatIfPresent(_0x3809d5){try{return lstatSync(_0x3809d5);}catch{return undefined;}}export function writeTextAtomic(_0x5e0b50,_0x5bbe98,_0x176477){const _0x2ad33e=a139_0x77ee;writeBytesAtomic(_0x5e0b50,Buffer[_0x2ad33e(0x13e)](_0x5bbe98,'utf8'),_0x176477);}export function writeBytesAtomic(_0x300374,_0x4d8b3d,_0x23002f){const _0x3bf53b=a139_0x77ee,_0x1e9435=_0x300374+_0x3bf53b(0x147);try{writeFileSync(_0x1e9435,_0x4d8b3d,{'mode':_0x23002f}),renameSync(_0x1e9435,_0x300374);}catch(_0x1e771e){try{rmSync(_0x1e9435,{'force':!![]});}catch{}throw _0x1e771e;}}export function writeJsonAtomic(_0xc6fa51,_0x495b6c){writeTextAtomic(_0xc6fa51,JSON['stringify'](_0x495b6c,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x856f2,_0x203479){const _0xc2b6b6=a139_0x3796,_0x1f6f99=_0x856f2();while(!![]){try{const _0x3ae9c7=parseInt(_0xc2b6b6(0x1f8))/0x1*(-parseInt(_0xc2b6b6(0x200))/0x2)+parseInt(_0xc2b6b6(0x1f4))/0x3*(-parseInt(_0xc2b6b6(0x1fd))/0x4)+parseInt(_0xc2b6b6(0x1f9))/0x5*(-parseInt(_0xc2b6b6(0x1fa))/0x6)+parseInt(_0xc2b6b6(0x1f0))/0x7*(parseInt(_0xc2b6b6(0x1f5))/0x8)+-parseInt(_0xc2b6b6(0x1ed))/0x9*(parseInt(_0xc2b6b6(0x1fe))/0xa)+-parseInt(_0xc2b6b6(0x1ef))/0xb*(-parseInt(_0xc2b6b6(0x1f1))/0xc)+parseInt(_0xc2b6b6(0x1fb))/0xd;if(_0x3ae9c7===_0x203479)break;else _0x1f6f99['push'](_0x1f6f99['shift']());}catch(_0x198c2a){_0x1f6f99['push'](_0x1f6f99['shift']());}}}(a139_0x156f,0xc8efb));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(_0x357fec,_0xcbbb31){const _0x6eb6ee=a139_0x3796,_0x5407e0=normalizeSkillRelativePath(_0xcbbb31),_0x52a28b=realOrResolved(_0x357fec),_0x17555f=resolve(_0x52a28b,..._0x5407e0[_0x6eb6ee(0x201)]('/'));if(!isPathInside(_0x17555f,_0x52a28b))throw CliErrors[_0x6eb6ee(0x1ee)](_0x6eb6ee(0x202)+_0xcbbb31);return ensureNoSymlinkInManagedPath(_0x52a28b,_0x5407e0),_0x17555f;}export function ensureNoSymlinkInManagedPath(_0x3e9b29,_0x2433f5){const _0x5de7b4=a139_0x3796;let _0x2f8df3=_0x3e9b29;for(const _0x2f6a9a of _0x2433f5[_0x5de7b4(0x201)]('/')){_0x2f8df3=resolve(_0x2f8df3,_0x2f6a9a);const _0x5d7484=lstatIfPresent(_0x2f8df3);if(_0x5d7484?.[_0x5de7b4(0x1fc)]())throw CliErrors[_0x5de7b4(0x1ee)](_0x5de7b4(0x1f3)+_0x2433f5);}}function a139_0x3796(_0x3fd62f,_0x22bde0){_0x3fd62f=_0x3fd62f-0x1ed;const _0x156fe2=a139_0x156f();let _0x379612=_0x156fe2[_0x3fd62f];return _0x379612;}export function isDanglingSymlink(_0x814730){try{return lstatSync(_0x814730)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x121023){const _0xd39e76=readlinkSync(_0x121023);return isAbsolute(_0xd39e76)?_0xd39e76:resolve(dirname(_0x121023),_0xd39e76);}export function isPathInside(_0x3d8c83,_0x3b4888){const _0x4f67b3=a139_0x3796,_0x33db58=_0x3d8c83[_0x4f67b3(0x1f7)](sep)?_0x3d8c83:''+_0x3d8c83+sep,_0x1bda83=_0x3b4888[_0x4f67b3(0x1f7)](sep)?_0x3b4888:''+_0x3b4888+sep;return _0x3d8c83===_0x3b4888||_0x33db58['startsWith'](_0x1bda83);}export function realOrResolved(_0x37c11d){try{return realpathSync(_0x37c11d);}catch{return resolve(_0x37c11d);}}export function lstatIfPresent(_0x27b78d){try{return lstatSync(_0x27b78d);}catch{return undefined;}}export function writeTextAtomic(_0x3f97ef,_0x17b122,_0x386f99){const _0x318780=a139_0x3796;writeBytesAtomic(_0x3f97ef,Buffer[_0x318780(0x1f2)](_0x17b122,'utf8'),_0x386f99);}export function writeBytesAtomic(_0xd10f61,_0x24e148,_0xe1c093){const _0x36581c=a139_0x3796,_0x26f702=_0xd10f61+_0x36581c(0x1f6);try{writeFileSync(_0x26f702,_0x24e148,{'mode':_0xe1c093}),renameSync(_0x26f702,_0xd10f61);}catch(_0xb5656){try{rmSync(_0x26f702,{'force':!![]});}catch{}throw _0xb5656;}}function a139_0x156f(){const _0x54fb9d=['24ZfXYSq','38315290YOoHAx','isSymbolicLink','508PnGWce','1850cVjSbv','stringify','1054674bLwoHK','split','Unsafe\x20Skill\x20file\x20path:\x20','75564fWKDlZ','validation','740465FMXWkS','33992EWQbci','228GbfcBd','from','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','18375javlHo','1464PpQOqW','.tmp','endsWith','1kApODb','1791820gqoVXZ'];a139_0x156f=function(){return _0x54fb9d;};return a139_0x156f();}export function writeJsonAtomic(_0x584b8b,_0x5b43df){const _0x1e18f4=a139_0x3796;writeTextAtomic(_0x584b8b,JSON[_0x1e18f4(0x1ff)](_0x5b43df,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- function a140_0x58fd(_0x48a158,_0x1848cb){_0x48a158=_0x48a158-0x1e1;const _0x2f8587=a140_0x2f85();let _0x58fd1e=_0x2f8587[_0x48a158];return _0x58fd1e;}(function(_0x208f5b,_0x1ff84c){const _0x595ec4=a140_0x58fd,_0xb94f02=_0x208f5b();while(!![]){try{const _0xbf45da=-parseInt(_0x595ec4(0x1e5))/0x1+-parseInt(_0x595ec4(0x1ec))/0x2*(parseInt(_0x595ec4(0x1e9))/0x3)+-parseInt(_0x595ec4(0x1e7))/0x4*(parseInt(_0x595ec4(0x1f0))/0x5)+-parseInt(_0x595ec4(0x1e8))/0x6*(parseInt(_0x595ec4(0x1ea))/0x7)+-parseInt(_0x595ec4(0x1ed))/0x8+parseInt(_0x595ec4(0x1ef))/0x9+parseInt(_0x595ec4(0x1e2))/0xa;if(_0xbf45da===_0x1ff84c)break;else _0xb94f02['push'](_0xb94f02['shift']());}catch(_0x17a42e){_0xb94f02['push'](_0xb94f02['shift']());}}}(a140_0x2f85,0x87442));import{createHash}from'node:crypto';function a140_0x2f85(){const _0x44ae11=['update','60QwFlnj','12jMXErU','1374VRSTbb','332633JrAQsm','path','116LPEnjC','3440056WdSJjs','hex','5877441OfwQXP','72895lcFMOy','size','17041410FQIoxv','digest','sha256','1032846zmDVvP'];a140_0x2f85=function(){return _0x44ae11;};return a140_0x2f85();}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x510db3){const _0x439abf=a140_0x58fd;return createHash(_0x439abf(0x1e4))[_0x439abf(0x1e6)](_0x510db3)[_0x439abf(0x1e3)]('hex');}export function fileHash(_0x2703e9){return bufferSha256(fileContent(_0x2703e9));}export function bufferSha256(_0x1a087c){const _0x285717=a140_0x58fd;return createHash(_0x285717(0x1e4))[_0x285717(0x1e6)](_0x1a087c)[_0x285717(0x1e3)](_0x285717(0x1ee));}export function fileTreeHash(_0x518e99){const _0x5d3640=a140_0x58fd,_0x4a209c=createHash(_0x5d3640(0x1e4));for(const _0x36f95d of normalizeManifestFiles(_0x518e99)){_0x4a209c[_0x5d3640(0x1e6)](_0x36f95d[_0x5d3640(0x1eb)]),_0x4a209c[_0x5d3640(0x1e6)]('\x00'),_0x4a209c[_0x5d3640(0x1e6)](_0x36f95d['sha256']),_0x4a209c['update']('\x00'),_0x4a209c[_0x5d3640(0x1e6)](String(_0x36f95d[_0x5d3640(0x1e1)])),_0x4a209c[_0x5d3640(0x1e6)]('\x00');}return _0x4a209c['digest'](_0x5d3640(0x1ee));}
1
+ function a140_0x55b9(){const _0x2ade38=['3842520gfOFdS','3ACPXqR','7fyhquh','165147RiNtNh','sha256','path','77877JdEcRj','update','hex','567926xrCklx','752pTEYCX','digest','3213186YBunXQ','394755YZkUpm','4BGopUK','size','4851033rtIbYY'];a140_0x55b9=function(){return _0x2ade38;};return a140_0x55b9();}(function(_0x28a028,_0x3b82ea){const _0x95b8=a140_0x18f6,_0x325107=_0x28a028();while(!![]){try{const _0x41e316=-parseInt(_0x95b8(0x184))/0x1*(-parseInt(_0x95b8(0x18c))/0x2)+parseInt(_0x95b8(0x186))/0x3*(parseInt(_0x95b8(0x180))/0x4)+parseInt(_0x95b8(0x190))/0x5+-parseInt(_0x95b8(0x18f))/0x6*(parseInt(_0x95b8(0x185))/0x7)+parseInt(_0x95b8(0x18d))/0x8*(parseInt(_0x95b8(0x189))/0x9)+-parseInt(_0x95b8(0x183))/0xa+-parseInt(_0x95b8(0x182))/0xb;if(_0x41e316===_0x3b82ea)break;else _0x325107['push'](_0x325107['shift']());}catch(_0x35b747){_0x325107['push'](_0x325107['shift']());}}}(a140_0x55b9,0x6b0d5));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0xa97acd){const _0x2e94c7=a140_0x18f6;return createHash(_0x2e94c7(0x187))['update'](_0xa97acd)[_0x2e94c7(0x18e)](_0x2e94c7(0x18b));}export function fileHash(_0x5e279b){return bufferSha256(fileContent(_0x5e279b));}function a140_0x18f6(_0xae0ff4,_0x1cae1c){_0xae0ff4=_0xae0ff4-0x180;const _0x55b9e7=a140_0x55b9();let _0x18f602=_0x55b9e7[_0xae0ff4];return _0x18f602;}export function bufferSha256(_0x1d81ab){const _0x1fa187=a140_0x18f6;return createHash(_0x1fa187(0x187))[_0x1fa187(0x18a)](_0x1d81ab)[_0x1fa187(0x18e)](_0x1fa187(0x18b));}export function fileTreeHash(_0x4b7ca7){const _0x282861=a140_0x18f6,_0x325703=createHash(_0x282861(0x187));for(const _0x5dd179 of normalizeManifestFiles(_0x4b7ca7)){_0x325703[_0x282861(0x18a)](_0x5dd179[_0x282861(0x188)]),_0x325703[_0x282861(0x18a)]('\x00'),_0x325703[_0x282861(0x18a)](_0x5dd179[_0x282861(0x187)]),_0x325703['update']('\x00'),_0x325703[_0x282861(0x18a)](String(_0x5dd179[_0x282861(0x181)])),_0x325703[_0x282861(0x18a)]('\x00');}return _0x325703[_0x282861(0x18e)](_0x282861(0x18b));}
@@ -1 +1 @@
1
- function a141_0x2aba(_0x1d5459,_0x20d8a0){_0x1d5459=_0x1d5459-0x93;const _0x40ce5b=a141_0x40ce();let _0x2abac0=_0x40ce5b[_0x1d5459];return _0x2abac0;}const a141_0x5b2882=a141_0x2aba;(function(_0x14d88f,_0x2fcd79){const _0x3364a4=a141_0x2aba,_0x53571e=_0x14d88f();while(!![]){try{const _0x3d52ef=-parseInt(_0x3364a4(0x99))/0x1*(parseInt(_0x3364a4(0x9f))/0x2)+parseInt(_0x3364a4(0x9d))/0x3+parseInt(_0x3364a4(0x95))/0x4*(parseInt(_0x3364a4(0x9b))/0x5)+parseInt(_0x3364a4(0xa2))/0x6*(-parseInt(_0x3364a4(0x96))/0x7)+parseInt(_0x3364a4(0x94))/0x8+parseInt(_0x3364a4(0xa4))/0x9+-parseInt(_0x3364a4(0x98))/0xa*(-parseInt(_0x3364a4(0x97))/0xb);if(_0x3d52ef===_0x2fcd79)break;else _0x53571e['push'](_0x53571e['shift']());}catch(_0x289f12){_0x53571e['push'](_0x53571e['shift']());}}}(a141_0x40ce,0xc0e57));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x3e5729,_0x1a65fd=a141_0x5b2882(0x9a),_0x319213={}){const _0x2c6523=a141_0x5b2882,_0x10565d=resolveSkillSyncPaths(_0x319213),_0x1eacf1=safePathSegment(_0x3e5729,_0x2c6523(0xa1)),_0x398a22=_0x1a65fd===_0x2c6523(0xa0)?[resolve(_0x319213[_0x2c6523(0x93)]??process[_0x2c6523(0x93)](),_0x2c6523(0x9c),'skills')]:runtimeAgentSkillRoots(_0x10565d);return Object[_0x2c6523(0xa3)]({'scope':_0x1a65fd,'appCode':_0x1eacf1,'skillRoots':Object[_0x2c6523(0xa3)](_0x398a22),'managedRoot':_0x10565d[_0x2c6523(0x9e)]});}function a141_0x40ce(){const _0x3c9f7b=['948970yotoHC','project','appCode','4880994owewIi','freeze','6118488IfaJQl','cwd','2669896ePTVoh','8DTaMwL','7WBrhkf','11IBBMom','2859820VYISAC','2XeyIlZ','global','2352770laLhHU','.agents','935739BPVsvj','managedRoot'];a141_0x40ce=function(){return _0x3c9f7b;};return a141_0x40ce();}
1
+ const a141_0x104175=a141_0xf4ba;(function(_0x20af1e,_0x3b6143){const _0x152a6d=a141_0xf4ba,_0x1e80f4=_0x20af1e();while(!![]){try{const _0x2facb3=parseInt(_0x152a6d(0xf4))/0x1*(parseInt(_0x152a6d(0xf3))/0x2)+-parseInt(_0x152a6d(0xfe))/0x3+parseInt(_0x152a6d(0x100))/0x4+parseInt(_0x152a6d(0xf6))/0x5+-parseInt(_0x152a6d(0xff))/0x6+parseInt(_0x152a6d(0xf8))/0x7*(parseInt(_0x152a6d(0xfd))/0x8)+parseInt(_0x152a6d(0xf7))/0x9;if(_0x2facb3===_0x3b6143)break;else _0x1e80f4['push'](_0x1e80f4['shift']());}catch(_0x5de121){_0x1e80f4['push'](_0x1e80f4['shift']());}}}(a141_0xc62b,0x7d1a5));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a141_0xf4ba(_0x5efb97,_0x520f15){_0x5efb97=_0x5efb97-0xf1;const _0xc62b28=a141_0xc62b();let _0xf4ba2e=_0xc62b28[_0x5efb97];return _0xf4ba2e;}function a141_0xc62b(){const _0x1342a1=['116347VlmvbN','skills','freeze','cwd','project','152YgIgTR','1011162lisork','3667068gfQIcB','901460vWCsso','global','managedRoot','2mANLPg','267237jtOjPa','.agents','594630wocBMT','4799934CZMegI'];a141_0xc62b=function(){return _0x1342a1;};return a141_0xc62b();}export function resolveRuntimeSkillInstallTarget(_0x421506,_0x4c90de=a141_0x104175(0xf1),_0x1c67f7={}){const _0x5248d4=a141_0x104175,_0x14db08=resolveSkillSyncPaths(_0x1c67f7),_0x3cf79c=safePathSegment(_0x421506,'appCode'),_0x528aa6=_0x4c90de===_0x5248d4(0xfc)?[resolve(_0x1c67f7['cwd']??process[_0x5248d4(0xfb)](),_0x5248d4(0xf5),_0x5248d4(0xf9))]:runtimeAgentSkillRoots(_0x14db08);return Object[_0x5248d4(0xfa)]({'scope':_0x4c90de,'appCode':_0x3cf79c,'skillRoots':Object[_0x5248d4(0xfa)](_0x528aa6),'managedRoot':_0x14db08[_0x5248d4(0xf2)]});}
@@ -1 +1 @@
1
- const a142_0x581b36=a142_0x3852;(function(_0x959768,_0x317602){const _0x53e541=a142_0x3852,_0x4b7fa1=_0x959768();while(!![]){try{const _0x155d27=parseInt(_0x53e541(0x16f))/0x1*(-parseInt(_0x53e541(0x169))/0x2)+parseInt(_0x53e541(0x16a))/0x3+-parseInt(_0x53e541(0x17a))/0x4+parseInt(_0x53e541(0x18f))/0x5+-parseInt(_0x53e541(0x18e))/0x6+-parseInt(_0x53e541(0x18a))/0x7*(parseInt(_0x53e541(0x18b))/0x8)+-parseInt(_0x53e541(0x171))/0x9*(-parseInt(_0x53e541(0x16c))/0xa);if(_0x155d27===_0x317602)break;else _0x4b7fa1['push'](_0x4b7fa1['shift']());}catch(_0x6cab92){_0x4b7fa1['push'](_0x4b7fa1['shift']());}}}(a142_0x229f,0x2ee9c));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a142_0xf9ae13 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a142_0xf9ae13,RESERVED_PROJECT_SKILL_CODES=new Set([a142_0x581b36(0x199),a142_0x581b36(0x19d),a142_0x581b36(0x187)]);export function linkEffectiveRuntimeSkills(_0x19b406,_0x1ece1d){const _0x85844f=a142_0x581b36,_0x57b057=new Map();for(const _0x54b441 of _0x19b406){const _0xbe8768=_0x54b441[_0x85844f(0x177)][_0x85844f(0x190)];if(!_0xbe8768)continue;const _0x279125=_0x57b057[_0x85844f(0x19a)](_0xbe8768);(!_0x279125||_0x54b441[_0x85844f(0x195)]===_0x85844f(0x180))&&_0x57b057[_0x85844f(0x162)](_0xbe8768,_0x54b441);}const _0x850747=[];for(const _0x2df78a of _0x57b057['values']()){const _0x2a4c37=requireSkillCode(_0x2df78a[_0x85844f(0x177)]),_0x32ef80=readMetadataIfPresent(_0x2df78a[_0x85844f(0x186)]);if(_0x32ef80?.['appCode']!==_0x1ece1d['appCode']||_0x32ef80['skillCode']!==_0x2a4c37)throw CliErrors['validation'](_0x85844f(0x194)+_0x1ece1d[_0x85844f(0x18c)]+':\x20'+_0x2df78a['metadataPath']);const _0x197b44=runtimeSkillLinkName(_0x1ece1d,_0x2a4c37);for(const _0x49cb9e of _0x1ece1d[_0x85844f(0x175)]){_0x850747[_0x85844f(0x182)](ensureManagedSymlink(resolve(_0x49cb9e,_0x197b44),_0x2df78a['dir'],_0x1ece1d,_0x2a4c37));}}return _0x850747;}export function pruneStaleRuntimeSkillLinks(_0x49a8c2,_0x299c78,_0x43d8e0){const _0x41d90a=a142_0x581b36,_0x614281=new Set([..._0x299c78]['map'](_0x461418=>_0x461418[_0x41d90a(0x166)]())[_0x41d90a(0x188)](Boolean)),_0xf8721=_0x43d8e0?new Set([..._0x43d8e0]['map'](_0x435930=>_0x435930[_0x41d90a(0x166)]())[_0x41d90a(0x188)](Boolean)):undefined,_0xd331d2=[];for(const _0x4e8c9a of _0x49a8c2['skillRoots']){for(const _0x4523a0 of managedTargetSkillLinkPaths(_0x4e8c9a,_0x49a8c2)){const _0x12b2d6=runtimeSkillCodeFromLink(_0x49a8c2,_0x4523a0);if(_0xf8721&&!_0xf8721[_0x41d90a(0x168)](_0x12b2d6))continue;if(_0x614281[_0x41d90a(0x168)](_0x12b2d6))continue;_0xd331d2['push'](removeManagedSkillLink(_0x4523a0,_0x49a8c2,_0x12b2d6));}}return _0xd331d2;}export function pruneStaleRuntimeSkillCache(_0xc415d,_0x3cc3b1={}){const _0x463975=a142_0x581b36,_0x507480=new Set([..._0xc415d[_0x463975(0x173)]][_0x463975(0x165)](_0x4dc5e9=>_0x4dc5e9[_0x463975(0x166)]())['filter'](Boolean)),_0x3b08e4=_0xc415d['pruneSkillCodes']?new Set([..._0xc415d[_0x463975(0x196)]][_0x463975(0x165)](_0x511bfe=>_0x511bfe[_0x463975(0x166)]())['filter'](Boolean)):undefined,_0x563427=_0xc415d[_0x463975(0x197)]??[_0x463975(0x180),_0x463975(0x172)],_0x17d4b1=resolve(getRuntimeSkillCacheRoot(_0xc415d[_0x463975(0x17d)],_0xc415d[_0x463975(0x19b)],_0x3cc3b1),safePathSegment(_0xc415d['appCode'],'appCode')),_0x31a818=[];for(const _0x45e668 of _0x563427){const _0x137f0e=resolve(_0x17d4b1,_0x45e668);if(!existsSync(_0x137f0e))continue;for(const _0x52b7bb of readdirSync(_0x137f0e,{'withFileTypes':!![]})){if(!_0x52b7bb[_0x463975(0x179)]())continue;const _0x18c050=_0x52b7bb['name'];if(_0x3b08e4&&!_0x3b08e4[_0x463975(0x168)](_0x18c050))continue;if(_0x507480[_0x463975(0x168)](_0x18c050))continue;const _0x277668=resolve(_0x137f0e,_0x18c050),_0x1e0f2c=readMetadataIfPresent(resolve(_0x277668,METADATA_FILE));if(_0x1e0f2c?.[_0x463975(0x18c)]!==_0xc415d['appCode']||_0x1e0f2c[_0x463975(0x195)]!==_0x45e668||_0x1e0f2c[_0x463975(0x190)]!==_0x18c050){_0x31a818[_0x463975(0x182)]({'path':_0x277668,'action':_0x463975(0x191),'reason':_0x463975(0x181)});continue;}if(isLinkedFromAnyRoot(_0x277668,_0xc415d['protectedLinkRoots']??[])){_0x31a818[_0x463975(0x182)]({'path':_0x277668,'action':_0x463975(0x191),'reason':_0x463975(0x16d)});continue;}removeSync(_0x277668),_0x31a818['push']({'path':_0x277668,'action':'removed'});}}return _0x31a818;}export function linkGlobalRuntimeSkills(_0xde5f0f,_0x1b4ba3={}){const _0x52d86b=a142_0x581b36,_0x3f9b84=resolveSkillSyncPaths(_0x1b4ba3),_0x1568a3=[];for(const _0x1aa955 of _0xde5f0f){if(_0x1aa955[_0x52d86b(0x195)]!==_0x52d86b(0x164))throw CliErrors[_0x52d86b(0x163)](_0x52d86b(0x185)+_0x1aa955[_0x52d86b(0x195)]);const _0x2154d2=requireSkillCode(_0x1aa955[_0x52d86b(0x177)]),_0x162030=copyManagedSkillDirectory(_0x1aa955[_0x52d86b(0x18d)],resolve(_0x3f9b84[_0x52d86b(0x184)],_0x2154d2));_0x1568a3['push']({..._0x162030,'contentHash':_0x1aa955[_0x52d86b(0x16b)]});}return _0x1568a3;}function ensureManagedSymlink(_0x3bc33b,_0x5af908,_0x12e2fc,_0x4472dc){const _0x54b026=a142_0x581b36;mkdirSync(dirname(_0x3bc33b),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3bc33b)||isDanglingSymlink(_0x3bc33b)){const _0x581719=lstatSync(_0x3bc33b);if(!_0x581719[_0x54b026(0x167)]())throw CliErrors[_0x54b026(0x163)](_0x54b026(0x174)+_0x3bc33b);const _0x3136b9=resolveSymlinkTarget(_0x3bc33b);if(!isPathInside(realOrResolved(_0x3136b9),realOrResolved(_0x12e2fc[_0x54b026(0x178)])))throw CliErrors[_0x54b026(0x163)](_0x54b026(0x17e)+_0x3bc33b);if(realOrResolved(_0x3136b9)===realOrResolved(_0x5af908))return{'path':_0x3bc33b,'target':_0x5af908,'action':_0x54b026(0x183)};const _0xe4571a=readMetadataIfPresent(resolve(_0x3136b9,METADATA_FILE));if(_0x12e2fc[_0x54b026(0x195)]==='project'&&(_0xe4571a?.[_0x54b026(0x18c)]!==_0x12e2fc['appCode']||_0xe4571a['skillCode']!==_0x4472dc))throw CliErrors['validation'](_0x54b026(0x17c)+_0x3bc33b);return unlinkSync(_0x3bc33b),symlinkSync(_0x5af908,_0x3bc33b,'dir'),{'path':_0x3bc33b,'target':_0x5af908,'action':'updated'};}return symlinkSync(_0x5af908,_0x3bc33b,_0x54b026(0x18d)),{'path':_0x3bc33b,'target':_0x5af908,'action':_0x54b026(0x192)};}function a142_0x229f(){const _0x54569f=['356552GqIjoj','appCode','dir','902286CJvPTe','510560nkRQmC','skillCode','skipped','created','removed','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','scope','pruneSkillCodes','scopes','startsWith','lovrabet','get','accessKey','not-managed-symlink','runtime-observe','set','validation','builtin','map','trim','isSymbolicLink','has','2yqHzNN','726873kzGpUo','contentHash','100CeXPsi','linked-from-protected-root','external-symlink','80947ANGkXV','slice','455571CLdXdI','company','activeSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','skillRoots','project','skill','managedRoot','isDirectory','460504frYAHw','name','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','env','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','personal','metadata-mismatch','push','unchanged','agentsSkillsDir','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','metadataPath','secret-retriever','filter','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','49vXqMZx'];a142_0x229f=function(){return _0x54569f;};return a142_0x229f();}function managedTargetSkillLinkPaths(_0x2da9c9,_0x3a8f02){const _0x3486c8=a142_0x581b36;if(!existsSync(_0x2da9c9))return[];const _0x544249=_0x3a8f02['appCode']+'--';return readdirSync(_0x2da9c9,{'withFileTypes':!![]})[_0x3486c8(0x188)](_0x577938=>_0x3a8f02[_0x3486c8(0x195)]===_0x3486c8(0x176)||_0x577938[_0x3486c8(0x17b)][_0x3486c8(0x198)](_0x544249))[_0x3486c8(0x165)](_0x1c188b=>resolve(_0x2da9c9,_0x1c188b[_0x3486c8(0x17b)]));}function removeManagedSkillLink(_0x5cbffe,_0x433c35,_0x3f7fe3){const _0x3e9309=a142_0x581b36,_0x3e4e94=lstatIfPresent(_0x5cbffe);if(!_0x3e4e94?.[_0x3e9309(0x167)]())return{'path':_0x5cbffe,'action':'skipped','reason':_0x3e9309(0x19c)};const _0xc8022c=resolveSymlinkTarget(_0x5cbffe);if(!isPathInside(realOrResolved(_0xc8022c),realOrResolved(_0x433c35[_0x3e9309(0x178)])))return{'path':_0x5cbffe,'action':_0x3e9309(0x191),'reason':_0x3e9309(0x16e)};const _0x1253c3=readMetadataIfPresent(resolve(_0xc8022c,METADATA_FILE));if(_0x433c35['scope']==='project'&&(_0x1253c3?.[_0x3e9309(0x18c)]!==_0x433c35[_0x3e9309(0x18c)]||_0x1253c3['skillCode']!==_0x3f7fe3))return{'path':_0x5cbffe,'action':_0x3e9309(0x191),'reason':'metadata-mismatch'};return unlinkSync(_0x5cbffe),{'path':_0x5cbffe,'action':_0x3e9309(0x193)};}function isLinkedFromAnyRoot(_0xdba4ec,_0xedc0ce){const _0x1b1154=a142_0x581b36,_0x141fc8=realOrResolved(_0xdba4ec);for(const _0x10bb28 of _0xedc0ce){if(!existsSync(_0x10bb28))continue;for(const _0x3c7f1b of readdirSync(_0x10bb28,{'withFileTypes':!![]})){if(!_0x3c7f1b[_0x1b1154(0x167)]())continue;const _0x7781bb=resolve(_0x10bb28,_0x3c7f1b[_0x1b1154(0x17b)]);if(realOrResolved(resolveSymlinkTarget(_0x7781bb))===_0x141fc8)return!![];}}return![];}function runtimeSkillLinkName(_0x3daacb,_0x1d3b94){const _0x12e1f7=a142_0x581b36,_0x3c79f6=safePathSegment(_0x1d3b94,'skillCode');if(_0x3daacb[_0x12e1f7(0x195)]===_0x12e1f7(0x176)&&RESERVED_PROJECT_SKILL_CODES[_0x12e1f7(0x168)](_0x3c79f6))throw CliErrors[_0x12e1f7(0x163)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0x3c79f6);return _0x3daacb[_0x12e1f7(0x195)]===_0x12e1f7(0x176)?_0x3c79f6:_0x3daacb[_0x12e1f7(0x18c)]+'--'+_0x3c79f6;}function a142_0x3852(_0x310f71,_0x3bd54e){_0x310f71=_0x310f71-0x162;const _0x229ffa=a142_0x229f();let _0x3852a7=_0x229ffa[_0x310f71];return _0x3852a7;}function runtimeSkillCodeFromLink(_0x53ab57,_0x136f5b){const _0x4366b3=a142_0x581b36,_0x1d01fa=basename(_0x136f5b);return _0x53ab57[_0x4366b3(0x195)]===_0x4366b3(0x176)?_0x1d01fa:_0x1d01fa[_0x4366b3(0x170)]((_0x53ab57[_0x4366b3(0x18c)]+'--')['length']);}export function copyManagedSkillDirectory(_0x2acfa0,_0x42f730){const _0x39d1d1=a142_0x581b36,_0x1eed2f=resolve(_0x42f730,METADATA_FILE),_0x3b2bc9=existsSync(_0x42f730);if(_0x3b2bc9){const _0x51c00e=lstatSync(_0x42f730);if(_0x51c00e[_0x39d1d1(0x167)]())throw CliErrors[_0x39d1d1(0x163)](_0x39d1d1(0x189)+_0x42f730);if(!_0x51c00e['isDirectory']())throw CliErrors[_0x39d1d1(0x163)](_0x39d1d1(0x17f)+_0x42f730);const _0x48c651=readMetadataIfPresent(_0x1eed2f);if(_0x48c651?.[_0x39d1d1(0x195)]!==_0x39d1d1(0x164))throw CliErrors[_0x39d1d1(0x163)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x42f730);}ensureDirSync(dirname(_0x42f730));const _0x272969=_0x3b2bc9?readMetadataIfPresent(_0x1eed2f)?.[_0x39d1d1(0x16b)]:undefined,_0x2224e2=readMetadataIfPresent(resolve(_0x2acfa0,METADATA_FILE))?.[_0x39d1d1(0x16b)];return _0x3b2bc9&&removeSync(_0x42f730),copySkillDirectory(_0x2acfa0,_0x42f730),{'path':_0x42f730,'target':_0x2acfa0,'action':!_0x3b2bc9?_0x39d1d1(0x192):_0x272969===_0x2224e2?_0x39d1d1(0x183):'updated'};}function copySkillDirectory(_0x4c3c05,_0x7108c9){copySync(_0x4c3c05,_0x7108c9,{'dereference':![],'overwrite':!![],'filter'(_0x4291c5){const _0x2d11fd=a142_0x3852;if(lstatSync(_0x4291c5)[_0x2d11fd(0x167)]())throw CliErrors[_0x2d11fd(0x163)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x4291c5);return!![];}});}
1
+ const a142_0x1ba98f=a142_0x47da;(function(_0x211c5f,_0x390375){const _0x54b7bc=a142_0x47da,_0x38f7a9=_0x211c5f();while(!![]){try{const _0x5ea58d=-parseInt(_0x54b7bc(0x1cd))/0x1+-parseInt(_0x54b7bc(0x1a8))/0x2+-parseInt(_0x54b7bc(0x1d5))/0x3+-parseInt(_0x54b7bc(0x1c0))/0x4+parseInt(_0x54b7bc(0x1be))/0x5*(-parseInt(_0x54b7bc(0x1c9))/0x6)+-parseInt(_0x54b7bc(0x1bc))/0x7+parseInt(_0x54b7bc(0x1de))/0x8;if(_0x5ea58d===_0x390375)break;else _0x38f7a9['push'](_0x38f7a9['shift']());}catch(_0x4e8c54){_0x38f7a9['push'](_0x38f7a9['shift']());}}}(a142_0x1818,0x66837));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a142_0x3dda41 from'fs-extra';import{CliErrors}from'../../errors.js';function a142_0x47da(_0x107daf,_0x45bf1d){_0x107daf=_0x107daf-0x1a7;const _0x18182a=a142_0x1818();let _0x47dada=_0x18182a[_0x107daf];return _0x47dada;}import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a142_0x3dda41,RESERVED_PROJECT_SKILL_CODES=new Set([a142_0x1ba98f(0x1cf),a142_0x1ba98f(0x1d0),a142_0x1ba98f(0x1bd)]);export function linkEffectiveRuntimeSkills(_0x921e9d,_0x2be23b){const _0x2205fe=a142_0x1ba98f,_0x2c3ea5=new Map();for(const _0x303570 of _0x921e9d){const _0x1f36e7=_0x303570['skill'][_0x2205fe(0x1c4)];if(!_0x1f36e7)continue;const _0x2d6065=_0x2c3ea5['get'](_0x1f36e7);(!_0x2d6065||_0x303570[_0x2205fe(0x1b0)]===_0x2205fe(0x1dc))&&_0x2c3ea5[_0x2205fe(0x1bf)](_0x1f36e7,_0x303570);}const _0x247aed=[];for(const _0x5639a7 of _0x2c3ea5[_0x2205fe(0x1ab)]()){const _0x58b9fa=requireSkillCode(_0x5639a7['skill']),_0x1b9fd4=readMetadataIfPresent(_0x5639a7['metadataPath']);if(_0x1b9fd4?.[_0x2205fe(0x1d3)]!==_0x2be23b['appCode']||_0x1b9fd4['skillCode']!==_0x58b9fa)throw CliErrors[_0x2205fe(0x1c1)](_0x2205fe(0x1b8)+_0x2be23b[_0x2205fe(0x1d3)]+':\x20'+_0x5639a7[_0x2205fe(0x1c5)]);const _0x10848a=runtimeSkillLinkName(_0x2be23b,_0x58b9fa);for(const _0x51ba90 of _0x2be23b[_0x2205fe(0x1a9)]){_0x247aed['push'](ensureManagedSymlink(resolve(_0x51ba90,_0x10848a),_0x5639a7[_0x2205fe(0x1d6)],_0x2be23b,_0x58b9fa));}}return _0x247aed;}export function pruneStaleRuntimeSkillLinks(_0x5b5d9c,_0x467af7,_0x2734bf){const _0x205dcb=a142_0x1ba98f,_0x3b0aea=new Set([..._0x467af7][_0x205dcb(0x1b5)](_0x48100e=>_0x48100e['trim']())[_0x205dcb(0x1b6)](Boolean)),_0x4af6cd=_0x2734bf?new Set([..._0x2734bf][_0x205dcb(0x1b5)](_0x4de217=>_0x4de217['trim']())[_0x205dcb(0x1b6)](Boolean)):undefined,_0x192976=[];for(const _0x37cc3e of _0x5b5d9c[_0x205dcb(0x1a9)]){for(const _0x48ecf8 of managedTargetSkillLinkPaths(_0x37cc3e,_0x5b5d9c)){const _0x59eee4=runtimeSkillCodeFromLink(_0x5b5d9c,_0x48ecf8);if(_0x4af6cd&&!_0x4af6cd[_0x205dcb(0x1da)](_0x59eee4))continue;if(_0x3b0aea[_0x205dcb(0x1da)](_0x59eee4))continue;_0x192976['push'](removeManagedSkillLink(_0x48ecf8,_0x5b5d9c,_0x59eee4));}}return _0x192976;}export function pruneStaleRuntimeSkillCache(_0x6bdb7c,_0x211bb5={}){const _0x1ec56e=a142_0x1ba98f,_0x1f16d6=new Set([..._0x6bdb7c[_0x1ec56e(0x1a7)]][_0x1ec56e(0x1b5)](_0x5ea56b=>_0x5ea56b[_0x1ec56e(0x1aa)]())[_0x1ec56e(0x1b6)](Boolean)),_0xe4525d=_0x6bdb7c[_0x1ec56e(0x1db)]?new Set([..._0x6bdb7c[_0x1ec56e(0x1db)]][_0x1ec56e(0x1b5)](_0x801099=>_0x801099['trim']())[_0x1ec56e(0x1b6)](Boolean)):undefined,_0x4480a9=_0x6bdb7c['scopes']??[_0x1ec56e(0x1dc),_0x1ec56e(0x1af)],_0x3d2725=resolve(getRuntimeSkillCacheRoot(_0x6bdb7c[_0x1ec56e(0x1c3)],_0x6bdb7c['accessKey'],_0x211bb5),safePathSegment(_0x6bdb7c[_0x1ec56e(0x1d3)],'appCode')),_0x28ec6e=[];for(const _0x10b101 of _0x4480a9){const _0x13880b=resolve(_0x3d2725,_0x10b101);if(!existsSync(_0x13880b))continue;for(const _0x3eab2b of readdirSync(_0x13880b,{'withFileTypes':!![]})){if(!_0x3eab2b[_0x1ec56e(0x1ae)]())continue;const _0x2497d4=_0x3eab2b[_0x1ec56e(0x1c7)];if(_0xe4525d&&!_0xe4525d['has'](_0x2497d4))continue;if(_0x1f16d6[_0x1ec56e(0x1da)](_0x2497d4))continue;const _0x3e007e=resolve(_0x13880b,_0x2497d4),_0xeae061=readMetadataIfPresent(resolve(_0x3e007e,METADATA_FILE));if(_0xeae061?.[_0x1ec56e(0x1d3)]!==_0x6bdb7c[_0x1ec56e(0x1d3)]||_0xeae061[_0x1ec56e(0x1b0)]!==_0x10b101||_0xeae061[_0x1ec56e(0x1c4)]!==_0x2497d4){_0x28ec6e['push']({'path':_0x3e007e,'action':_0x1ec56e(0x1b1),'reason':_0x1ec56e(0x1bb)});continue;}if(isLinkedFromAnyRoot(_0x3e007e,_0x6bdb7c[_0x1ec56e(0x1c2)]??[])){_0x28ec6e[_0x1ec56e(0x1d1)]({'path':_0x3e007e,'action':'skipped','reason':'linked-from-protected-root'});continue;}removeSync(_0x3e007e),_0x28ec6e[_0x1ec56e(0x1d1)]({'path':_0x3e007e,'action':_0x1ec56e(0x1ad)});}}return _0x28ec6e;}export function linkGlobalRuntimeSkills(_0xfd006e,_0x3d7bc8={}){const _0xece92c=a142_0x1ba98f,_0x229fe2=resolveSkillSyncPaths(_0x3d7bc8),_0x21b3da=[];for(const _0x5e4ada of _0xfd006e){if(_0x5e4ada['scope']!=='builtin')throw CliErrors[_0xece92c(0x1c1)](_0xece92c(0x1b4)+_0x5e4ada[_0xece92c(0x1b0)]);const _0x5a692b=requireSkillCode(_0x5e4ada[_0xece92c(0x1d9)]),_0xde12c1=copyManagedSkillDirectory(_0x5e4ada[_0xece92c(0x1d6)],resolve(_0x229fe2[_0xece92c(0x1ac)],_0x5a692b));_0x21b3da[_0xece92c(0x1d1)]({..._0xde12c1,'contentHash':_0x5e4ada['contentHash']});}return _0x21b3da;}function ensureManagedSymlink(_0x31e5fc,_0x5c9a63,_0x39ac8f,_0x5df7df){const _0x476963=a142_0x1ba98f;mkdirSync(dirname(_0x31e5fc),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x31e5fc)||isDanglingSymlink(_0x31e5fc)){const _0x231ed8=lstatSync(_0x31e5fc);if(!_0x231ed8[_0x476963(0x1b2)]())throw CliErrors[_0x476963(0x1c1)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x31e5fc);const _0xe5c4cb=resolveSymlinkTarget(_0x31e5fc);if(!isPathInside(realOrResolved(_0xe5c4cb),realOrResolved(_0x39ac8f['managedRoot'])))throw CliErrors[_0x476963(0x1c1)](_0x476963(0x1b7)+_0x31e5fc);if(realOrResolved(_0xe5c4cb)===realOrResolved(_0x5c9a63))return{'path':_0x31e5fc,'target':_0x5c9a63,'action':_0x476963(0x1ce)};const _0x560a1c=readMetadataIfPresent(resolve(_0xe5c4cb,METADATA_FILE));if(_0x39ac8f[_0x476963(0x1b0)]===_0x476963(0x1b9)&&(_0x560a1c?.[_0x476963(0x1d3)]!==_0x39ac8f[_0x476963(0x1d3)]||_0x560a1c[_0x476963(0x1c4)]!==_0x5df7df))throw CliErrors[_0x476963(0x1c1)](_0x476963(0x1cc)+_0x31e5fc);return unlinkSync(_0x31e5fc),symlinkSync(_0x5c9a63,_0x31e5fc,'dir'),{'path':_0x31e5fc,'target':_0x5c9a63,'action':_0x476963(0x1df)};}return symlinkSync(_0x5c9a63,_0x31e5fc,_0x476963(0x1d6)),{'path':_0x31e5fc,'target':_0x5c9a63,'action':_0x476963(0x1ca)};}function managedTargetSkillLinkPaths(_0x531095,_0x5540e2){const _0x31774a=a142_0x1ba98f;if(!existsSync(_0x531095))return[];const _0x4c06df=_0x5540e2[_0x31774a(0x1d3)]+'--';return readdirSync(_0x531095,{'withFileTypes':!![]})[_0x31774a(0x1b6)](_0x16401f=>_0x5540e2[_0x31774a(0x1b0)]===_0x31774a(0x1b9)||_0x16401f[_0x31774a(0x1c7)][_0x31774a(0x1d4)](_0x4c06df))[_0x31774a(0x1b5)](_0x4314ef=>resolve(_0x531095,_0x4314ef[_0x31774a(0x1c7)]));}function removeManagedSkillLink(_0x1df3c1,_0x2a6ac7,_0x30194d){const _0x1f31b1=a142_0x1ba98f,_0x379c95=lstatIfPresent(_0x1df3c1);if(!_0x379c95?.[_0x1f31b1(0x1b2)]())return{'path':_0x1df3c1,'action':_0x1f31b1(0x1b1),'reason':_0x1f31b1(0x1c6)};const _0x4deb05=resolveSymlinkTarget(_0x1df3c1);if(!isPathInside(realOrResolved(_0x4deb05),realOrResolved(_0x2a6ac7['managedRoot'])))return{'path':_0x1df3c1,'action':_0x1f31b1(0x1b1),'reason':_0x1f31b1(0x1c8)};const _0x531c93=readMetadataIfPresent(resolve(_0x4deb05,METADATA_FILE));if(_0x2a6ac7[_0x1f31b1(0x1b0)]===_0x1f31b1(0x1b9)&&(_0x531c93?.[_0x1f31b1(0x1d3)]!==_0x2a6ac7[_0x1f31b1(0x1d3)]||_0x531c93[_0x1f31b1(0x1c4)]!==_0x30194d))return{'path':_0x1df3c1,'action':_0x1f31b1(0x1b1),'reason':_0x1f31b1(0x1bb)};return unlinkSync(_0x1df3c1),{'path':_0x1df3c1,'action':_0x1f31b1(0x1ad)};}function isLinkedFromAnyRoot(_0x11fe6b,_0x2d9dc6){const _0x4fb063=a142_0x1ba98f,_0x247c21=realOrResolved(_0x11fe6b);for(const _0x476616 of _0x2d9dc6){if(!existsSync(_0x476616))continue;for(const _0x27f379 of readdirSync(_0x476616,{'withFileTypes':!![]})){if(!_0x27f379[_0x4fb063(0x1b2)]())continue;const _0x16edbf=resolve(_0x476616,_0x27f379[_0x4fb063(0x1c7)]);if(realOrResolved(resolveSymlinkTarget(_0x16edbf))===_0x247c21)return!![];}}return![];}function runtimeSkillLinkName(_0x45dff6,_0x733403){const _0x5a2c2a=a142_0x1ba98f,_0x9eee46=safePathSegment(_0x733403,_0x5a2c2a(0x1c4));if(_0x45dff6['scope']===_0x5a2c2a(0x1b9)&&RESERVED_PROJECT_SKILL_CODES[_0x5a2c2a(0x1da)](_0x9eee46))throw CliErrors[_0x5a2c2a(0x1c1)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0x9eee46);return _0x45dff6[_0x5a2c2a(0x1b0)]===_0x5a2c2a(0x1b9)?_0x9eee46:_0x45dff6[_0x5a2c2a(0x1d3)]+'--'+_0x9eee46;}function runtimeSkillCodeFromLink(_0xbe252f,_0xf0d290){const _0x1bdbef=a142_0x1ba98f,_0x1f0c86=basename(_0xf0d290);return _0xbe252f['scope']===_0x1bdbef(0x1b9)?_0x1f0c86:_0x1f0c86[_0x1bdbef(0x1cb)]((_0xbe252f[_0x1bdbef(0x1d3)]+'--')[_0x1bdbef(0x1ba)]);}function a142_0x1818(){const _0x2e20d1=['length','metadata-mismatch','1940029nwlshY','secret-retriever','6410slncDB','set','1136436cNTYAa','validation','protectedLinkRoots','env','skillCode','metadataPath','not-managed-symlink','name','external-symlink','132oBGMQK','created','slice','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','419452MiELAM','unchanged','lovrabet','runtime-observe','push','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','appCode','startsWith','183054rUaccS','dir','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skill','has','pruneSkillCodes','personal','contentHash','12753680SvRsDa','updated','activeSkillCodes','208770flZgmf','skillRoots','trim','values','agentsSkillsDir','removed','isDirectory','company','scope','skipped','isSymbolicLink','builtin','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','map','filter','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','project'];a142_0x1818=function(){return _0x2e20d1;};return a142_0x1818();}export function copyManagedSkillDirectory(_0x256964,_0xf7892b){const _0x4821e0=a142_0x1ba98f,_0x102550=resolve(_0xf7892b,METADATA_FILE),_0x4cda1e=existsSync(_0xf7892b);if(_0x4cda1e){const _0x8427cb=lstatSync(_0xf7892b);if(_0x8427cb[_0x4821e0(0x1b2)]())throw CliErrors[_0x4821e0(0x1c1)](_0x4821e0(0x1d7)+_0xf7892b);if(!_0x8427cb[_0x4821e0(0x1ae)]())throw CliErrors[_0x4821e0(0x1c1)](_0x4821e0(0x1d8)+_0xf7892b);const _0xdbc5aa=readMetadataIfPresent(_0x102550);if(_0xdbc5aa?.['scope']!==_0x4821e0(0x1b3))throw CliErrors[_0x4821e0(0x1c1)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0xf7892b);}ensureDirSync(dirname(_0xf7892b));const _0x247312=_0x4cda1e?readMetadataIfPresent(_0x102550)?.[_0x4821e0(0x1dd)]:undefined,_0x170932=readMetadataIfPresent(resolve(_0x256964,METADATA_FILE))?.[_0x4821e0(0x1dd)];return _0x4cda1e&&removeSync(_0xf7892b),copySkillDirectory(_0x256964,_0xf7892b),{'path':_0xf7892b,'target':_0x256964,'action':!_0x4cda1e?_0x4821e0(0x1ca):_0x247312===_0x170932?'unchanged':_0x4821e0(0x1df)};}function copySkillDirectory(_0x83b497,_0x3a460a){copySync(_0x83b497,_0x3a460a,{'dereference':![],'overwrite':!![],'filter'(_0x5eaa19){const _0xbd5c9b=a142_0x47da;if(lstatSync(_0x5eaa19)[_0xbd5c9b(0x1b2)]())throw CliErrors[_0xbd5c9b(0x1c1)](_0xbd5c9b(0x1d2)+_0x5eaa19);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x4127c8,_0x56613e){const _0xf0bcd9=a143_0x1f51,_0x2651b2=_0x4127c8();while(!![]){try{const _0xe5198c=parseInt(_0xf0bcd9(0x17c))/0x1*(parseInt(_0xf0bcd9(0x191))/0x2)+-parseInt(_0xf0bcd9(0x18f))/0x3*(-parseInt(_0xf0bcd9(0x17f))/0x4)+-parseInt(_0xf0bcd9(0x184))/0x5*(parseInt(_0xf0bcd9(0x16f))/0x6)+parseInt(_0xf0bcd9(0x195))/0x7*(-parseInt(_0xf0bcd9(0x178))/0x8)+-parseInt(_0xf0bcd9(0x181))/0x9+parseInt(_0xf0bcd9(0x16b))/0xa*(-parseInt(_0xf0bcd9(0x192))/0xb)+-parseInt(_0xf0bcd9(0x177))/0xc*(-parseInt(_0xf0bcd9(0x179))/0xd);if(_0xe5198c===_0x56613e)break;else _0x2651b2['push'](_0x2651b2['shift']());}catch(_0x48a76a){_0x2651b2['push'](_0x2651b2['shift']());}}}(a143_0x5579,0x6b193));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a143_0x1f51(_0x319570,_0x965fae){_0x319570=_0x319570-0x168;const _0x5579fe=a143_0x5579();let _0x1f51cf=_0x5579fe[_0x319570];return _0x1f51cf;}import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x3dc9d2,_0x1ff3a7,_0x3da10f={}){const _0x2a4856=a143_0x1f51,_0x422e29=safePathSegment(_0x3dc9d2['appCode'],_0x2a4856(0x168));if(_0x1ff3a7[_0x2a4856(0x168)]!==_0x422e29)throw CliErrors[_0x2a4856(0x182)](_0x2a4856(0x173)+_0x1ff3a7[_0x2a4856(0x168)]+'\x20!=\x20'+_0x422e29);const _0x504b11=normalizeRuntimeSkillScopes(_0x3dc9d2[_0x2a4856(0x189)]),_0x1284ed=new Set(_0x504b11),_0x261008=_0x3dc9d2[_0x2a4856(0x196)]?.[_0x2a4856(0x16c)](),_0x5df708=new Map(),_0x2e843c=resolve(getRuntimeSkillCacheRoot(_0x3dc9d2[_0x2a4856(0x17a)],_0x3dc9d2[_0x2a4856(0x16e)],_0x3da10f),_0x422e29);for(const _0x12bc2d of _0x504b11){for(const _0x3816ce of localSkillEntryDirs(resolve(_0x2e843c,_0x12bc2d))){collectLocalRuntimeSkill(_0x5df708,_0x3816ce,{'appCode':_0x422e29,'scopes':_0x1284ed,'code':_0x261008,'source':_0x2a4856(0x197)});}}for(const _0x35b3b4 of _0x1ff3a7[_0x2a4856(0x180)]){for(const _0x5a047c of localSkillLinkCandidates(_0x35b3b4,_0x1ff3a7,_0x1284ed)){collectLocalRuntimeSkill(_0x5df708,_0x5a047c,{'appCode':_0x422e29,'scopes':_0x1284ed,'code':_0x261008,'source':_0x2a4856(0x174),'linkedPath':_0x5a047c});}}return Array[_0x2a4856(0x17b)](_0x5df708['values']())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x46ab7c){const _0x55f7c3=a143_0x1f51;if(!existsSync(_0x46ab7c))return[];return readdirSync(_0x46ab7c,{'withFileTypes':!![]})[_0x55f7c3(0x186)](_0x42ab1b=>_0x42ab1b['isDirectory']()||_0x42ab1b[_0x55f7c3(0x187)]())[_0x55f7c3(0x16a)](_0x41c409=>resolve(_0x46ab7c,_0x41c409[_0x55f7c3(0x17d)]));}function localSkillLinkCandidates(_0x2ee27b,_0x18c2f2,_0x47a982){const _0x5acc90=a143_0x1f51;if(!existsSync(_0x2ee27b))return[];const _0xae57fb=_0x18c2f2['appCode']+'--';return readdirSync(_0x2ee27b,{'withFileTypes':!![]})[_0x5acc90(0x186)](_0x2a2587=>_0x2a2587[_0x5acc90(0x18c)]()||_0x2a2587[_0x5acc90(0x187)]())[_0x5acc90(0x186)](_0x190e1e=>_0x18c2f2[_0x5acc90(0x198)]==='project'||_0x190e1e['name'][_0x5acc90(0x18e)](_0xae57fb)||_0x47a982[_0x5acc90(0x193)](_0x5acc90(0x18d)))[_0x5acc90(0x16a)](_0x1b9732=>resolve(_0x2ee27b,_0x1b9732[_0x5acc90(0x17d)]));}function collectLocalRuntimeSkill(_0x310093,_0x1db6c0,_0x560f8a){const _0x528130=a143_0x1f51,_0xd9f622=resolve(_0x1db6c0,METADATA_FILE),_0x3ec752=readMetadataIfPresent(_0xd9f622);if(!_0x3ec752)return;if(_0x3ec752['appCode']!==_0x560f8a[_0x528130(0x168)])return;if(!isRuntimeSkillScope(_0x3ec752[_0x528130(0x198)])||!_0x560f8a[_0x528130(0x189)][_0x528130(0x193)](_0x3ec752[_0x528130(0x198)]))return;const _0x2571cc=_0x3ec752[_0x528130(0x175)]?.[_0x528130(0x16c)]();if(!_0x2571cc)return;if(_0x560f8a[_0x528130(0x196)]&&_0x2571cc!==_0x560f8a[_0x528130(0x196)])return;const _0x4d7c54=_0x3ec752[_0x528130(0x198)]+':'+_0x2571cc,_0x1f834b=_0x560f8a['linkedPath']?[_0x560f8a['linkedPath']]:[],_0x2230ab=_0x310093[_0x528130(0x183)](_0x4d7c54);if(_0x2230ab){_0x560f8a[_0x528130(0x188)]===_0x528130(0x197)&&(_0x2230ab['dir']=_0x1db6c0,_0x2230ab[_0x528130(0x17e)]=_0x1db6c0,_0x2230ab['skillMdPath']=resolve(_0x1db6c0,SKILL_FILE),_0x2230ab[_0x528130(0x190)]=_0xd9f622);for(const _0x2d23f4 of _0x1f834b){!_0x2230ab[_0x528130(0x16d)][_0x528130(0x176)](_0x2d23f4)&&_0x2230ab[_0x528130(0x16d)][_0x528130(0x18a)](_0x2d23f4);}_0x2230ab['linkedPaths'][_0x528130(0x169)]();return;}_0x310093[_0x528130(0x172)](_0x4d7c54,{..._0x3ec752,'tags':Array[_0x528130(0x170)](_0x3ec752[_0x528130(0x194)])?_0x3ec752[_0x528130(0x194)]:[],'scope':_0x3ec752[_0x528130(0x198)],'source':_0x528130(0x18b),'dir':_0x1db6c0,'cacheDir':_0x560f8a[_0x528130(0x188)]===_0x528130(0x197)?_0x1db6c0:undefined,'skillMdPath':resolve(_0x1db6c0,SKILL_FILE),'metadataPath':_0xd9f622,'linkedPaths':_0x1f834b});}function a143_0x5579(){const _0x21964d=['dir','set','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','link','skillCode','includes','24918192CLynAv','1320KwZGwB','13ibzbzd','env','from','22SaesNE','name','cacheDir','28cZFCMt','skillRoots','2327589LzoEWS','validation','get','5IXEvIW','localeCompare','filter','isSymbolicLink','source','scopes','push','local','isDirectory','builtin','startsWith','122637RhyvFY','metadataPath','32860kAGuxm','8392065XhVokL','has','tags','18949HcFVwn','code','cache','scope','appCode','sort','map','10ufZtGn','trim','linkedPaths','accessKey','4903578urCqWQ','isArray'];a143_0x5579=function(){return _0x21964d;};return a143_0x5579();}function compareLocalRuntimeSkills(_0x4ec76d,_0x508120){const _0x362cd5=a143_0x1f51,_0x3a2153={'personal':0x0,'company':0x1,'builtin':0x2};return _0x3a2153[_0x4ec76d[_0x362cd5(0x198)]]-_0x3a2153[_0x508120['scope']]||_0x4ec76d[_0x362cd5(0x175)][_0x362cd5(0x185)](_0x508120[_0x362cd5(0x175)])||_0x4ec76d[_0x362cd5(0x171)][_0x362cd5(0x185)](_0x508120[_0x362cd5(0x171)]);}
1
+ (function(_0x482bd9,_0x56143b){const _0x4baa70=a143_0x2a2f,_0x5f400e=_0x482bd9();while(!![]){try{const _0x1ab4c1=-parseInt(_0x4baa70(0x1e2))/0x1*(-parseInt(_0x4baa70(0x1fb))/0x2)+-parseInt(_0x4baa70(0x20f))/0x3*(parseInt(_0x4baa70(0x1f9))/0x4)+-parseInt(_0x4baa70(0x208))/0x5*(parseInt(_0x4baa70(0x20b))/0x6)+-parseInt(_0x4baa70(0x1f0))/0x7+parseInt(_0x4baa70(0x20a))/0x8+parseInt(_0x4baa70(0x1e5))/0x9*(-parseInt(_0x4baa70(0x202))/0xa)+-parseInt(_0x4baa70(0x205))/0xb*(-parseInt(_0x4baa70(0x1e9))/0xc);if(_0x1ab4c1===_0x56143b)break;else _0x5f400e['push'](_0x5f400e['shift']());}catch(_0xc1e039){_0x5f400e['push'](_0x5f400e['shift']());}}}(a143_0x4141,0xbb0d4));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a143_0x4141(){const _0x3eec67=['validation','skillMdPath','cache','set','tags','values','4lZwQcD','isDirectory','28KUVQXJ','isArray','link','from','push','scope','skillCode','800780oAPaCb','linkedPaths','source','520421fanbKo','builtin','get','175ZWMRkL','has','5974456BgmwCc','211938oSXvFm','sort','local','scopes','2568504BfnNvd','58261UyLatQ','skillRoots','appCode','171tUpCHA','\x20!=\x20','name','trim','828cTGZOV','map','dir','accessKey','code','localeCompare','isSymbolicLink','3127607whNIZj','includes','project'];a143_0x4141=function(){return _0x3eec67;};return a143_0x4141();}import{readMetadataIfPresent}from'./metadata.js';function a143_0x2a2f(_0x56c168,_0x2dce11){_0x56c168=_0x56c168-0x1e2;const _0x4141e2=a143_0x4141();let _0x2a2f2e=_0x4141e2[_0x56c168];return _0x2a2f2e;}import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0xea687c,_0x2d25f2,_0x283328={}){const _0x43ae11=a143_0x2a2f,_0x1c9d52=safePathSegment(_0xea687c[_0x43ae11(0x1e4)],'appCode');if(_0x2d25f2[_0x43ae11(0x1e4)]!==_0x1c9d52)throw CliErrors[_0x43ae11(0x1f3)]('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x2d25f2[_0x43ae11(0x1e4)]+_0x43ae11(0x1e6)+_0x1c9d52);const _0xca8124=normalizeRuntimeSkillScopes(_0xea687c[_0x43ae11(0x20e)]),_0x4cadb4=new Set(_0xca8124),_0xe47062=_0xea687c['code']?.[_0x43ae11(0x1e8)](),_0x540659=new Map(),_0x201f19=resolve(getRuntimeSkillCacheRoot(_0xea687c['env'],_0xea687c[_0x43ae11(0x1ec)],_0x283328),_0x1c9d52);for(const _0x4ef1ef of _0xca8124){for(const _0x3b39af of localSkillEntryDirs(resolve(_0x201f19,_0x4ef1ef))){collectLocalRuntimeSkill(_0x540659,_0x3b39af,{'appCode':_0x1c9d52,'scopes':_0x4cadb4,'code':_0xe47062,'source':_0x43ae11(0x1f5)});}}for(const _0x49c707 of _0x2d25f2[_0x43ae11(0x1e3)]){for(const _0x4af3d1 of localSkillLinkCandidates(_0x49c707,_0x2d25f2,_0x4cadb4)){collectLocalRuntimeSkill(_0x540659,_0x4af3d1,{'appCode':_0x1c9d52,'scopes':_0x4cadb4,'code':_0xe47062,'source':_0x43ae11(0x1fd),'linkedPath':_0x4af3d1});}}return Array[_0x43ae11(0x1fe)](_0x540659[_0x43ae11(0x1f8)]())[_0x43ae11(0x20c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x467dcc){const _0x3cc389=a143_0x2a2f;if(!existsSync(_0x467dcc))return[];return readdirSync(_0x467dcc,{'withFileTypes':!![]})['filter'](_0x4c0452=>_0x4c0452['isDirectory']()||_0x4c0452[_0x3cc389(0x1ef)]())[_0x3cc389(0x1ea)](_0x5b9c11=>resolve(_0x467dcc,_0x5b9c11['name']));}function localSkillLinkCandidates(_0x27558f,_0x2ad6d3,_0x2b446a){const _0xb1827c=a143_0x2a2f;if(!existsSync(_0x27558f))return[];const _0x4282d5=_0x2ad6d3[_0xb1827c(0x1e4)]+'--';return readdirSync(_0x27558f,{'withFileTypes':!![]})['filter'](_0x34551c=>_0x34551c[_0xb1827c(0x1fa)]()||_0x34551c[_0xb1827c(0x1ef)]())['filter'](_0x2fc2bb=>_0x2ad6d3['scope']===_0xb1827c(0x1f2)||_0x2fc2bb[_0xb1827c(0x1e7)]['startsWith'](_0x4282d5)||_0x2b446a[_0xb1827c(0x209)](_0xb1827c(0x206)))[_0xb1827c(0x1ea)](_0x3c620d=>resolve(_0x27558f,_0x3c620d[_0xb1827c(0x1e7)]));}function collectLocalRuntimeSkill(_0x1bfe1b,_0x9adb94,_0x257e1b){const _0x2b319b=a143_0x2a2f,_0x509853=resolve(_0x9adb94,METADATA_FILE),_0xe2d5ca=readMetadataIfPresent(_0x509853);if(!_0xe2d5ca)return;if(_0xe2d5ca[_0x2b319b(0x1e4)]!==_0x257e1b[_0x2b319b(0x1e4)])return;if(!isRuntimeSkillScope(_0xe2d5ca[_0x2b319b(0x200)])||!_0x257e1b['scopes'][_0x2b319b(0x209)](_0xe2d5ca[_0x2b319b(0x200)]))return;const _0x58cc5a=_0xe2d5ca[_0x2b319b(0x201)]?.[_0x2b319b(0x1e8)]();if(!_0x58cc5a)return;if(_0x257e1b[_0x2b319b(0x1ed)]&&_0x58cc5a!==_0x257e1b[_0x2b319b(0x1ed)])return;const _0x51b034=_0xe2d5ca['scope']+':'+_0x58cc5a,_0x488362=_0x257e1b['linkedPath']?[_0x257e1b['linkedPath']]:[],_0x34533c=_0x1bfe1b[_0x2b319b(0x207)](_0x51b034);if(_0x34533c){_0x257e1b[_0x2b319b(0x204)]==='cache'&&(_0x34533c[_0x2b319b(0x1eb)]=_0x9adb94,_0x34533c['cacheDir']=_0x9adb94,_0x34533c[_0x2b319b(0x1f4)]=resolve(_0x9adb94,SKILL_FILE),_0x34533c['metadataPath']=_0x509853);for(const _0xb2aa18 of _0x488362){!_0x34533c[_0x2b319b(0x203)][_0x2b319b(0x1f1)](_0xb2aa18)&&_0x34533c[_0x2b319b(0x203)][_0x2b319b(0x1ff)](_0xb2aa18);}_0x34533c[_0x2b319b(0x203)][_0x2b319b(0x20c)]();return;}_0x1bfe1b[_0x2b319b(0x1f6)](_0x51b034,{..._0xe2d5ca,'tags':Array[_0x2b319b(0x1fc)](_0xe2d5ca['tags'])?_0xe2d5ca[_0x2b319b(0x1f7)]:[],'scope':_0xe2d5ca[_0x2b319b(0x200)],'source':_0x2b319b(0x20d),'dir':_0x9adb94,'cacheDir':_0x257e1b['source']==='cache'?_0x9adb94:undefined,'skillMdPath':resolve(_0x9adb94,SKILL_FILE),'metadataPath':_0x509853,'linkedPaths':_0x488362});}function compareLocalRuntimeSkills(_0x1c7580,_0x20a555){const _0x1381d=a143_0x2a2f,_0x485086={'personal':0x0,'company':0x1,'builtin':0x2};return _0x485086[_0x1c7580[_0x1381d(0x200)]]-_0x485086[_0x20a555[_0x1381d(0x200)]]||_0x1c7580[_0x1381d(0x201)][_0x1381d(0x1ee)](_0x20a555[_0x1381d(0x201)])||_0x1c7580[_0x1381d(0x1eb)]['localeCompare'](_0x20a555[_0x1381d(0x1eb)]);}
@@ -1 +1 @@
1
- (function(_0xa65b,_0xf1a507){const _0x270b35=a144_0x273f,_0x3663d9=_0xa65b();while(!![]){try{const _0x102608=-parseInt(_0x270b35(0xd9))/0x1*(parseInt(_0x270b35(0xd6))/0x2)+parseInt(_0x270b35(0xce))/0x3*(parseInt(_0x270b35(0xd5))/0x4)+parseInt(_0x270b35(0xe8))/0x5*(parseInt(_0x270b35(0xe9))/0x6)+parseInt(_0x270b35(0xc2))/0x7*(parseInt(_0x270b35(0xd3))/0x8)+-parseInt(_0x270b35(0xd0))/0x9*(parseInt(_0x270b35(0xd8))/0xa)+-parseInt(_0x270b35(0xb9))/0xb+parseInt(_0x270b35(0xcb))/0xc*(parseInt(_0x270b35(0xda))/0xd);if(_0x102608===_0xf1a507)break;else _0x3663d9['push'](_0x3663d9['shift']());}catch(_0x4959e3){_0x3663d9['push'](_0x3663d9['shift']());}}}(a144_0x42ed,0x73844));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(_0x2d4256){const _0x5d756e=a144_0x273f;return _0x2d4256[_0x5d756e(0xdf)]??Buffer[_0x5d756e(0xd1)](_0x2d4256[_0x5d756e(0xcd)]??'','utf8');}export function fileText(_0xa463c2){const _0x36a33a=a144_0x273f;return fileContent(_0xa463c2)[_0x36a33a(0xc8)](_0x36a33a(0xeb));}export function normalizeLocalFiles(_0x18a311){const _0x4ca1d2=a144_0x273f;if(!Array[_0x4ca1d2(0xca)](_0x18a311)||_0x18a311['length']===0x0)return[];const _0x455477=new Map();for(const _0x5736a6 of _0x18a311){if(!_0x5736a6||typeof _0x5736a6!==_0x4ca1d2(0xc4)||typeof _0x5736a6[_0x4ca1d2(0xd7)]!==_0x4ca1d2(0xbf))throw CliErrors[_0x4ca1d2(0xbe)](_0x4ca1d2(0xde));const _0x19b7c0=normalizeSkillRelativePath(_0x5736a6[_0x4ca1d2(0xd7)]);if(_0x455477['has'](_0x19b7c0))throw CliErrors[_0x4ca1d2(0xbe)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x19b7c0);if(_0x5736a6[_0x4ca1d2(0xdf)]!==undefined&&!Buffer[_0x4ca1d2(0xe6)](_0x5736a6[_0x4ca1d2(0xdf)]))throw CliErrors[_0x4ca1d2(0xbe)](_0x4ca1d2(0xbb)+_0x19b7c0);if(_0x5736a6['bytes']===undefined&&typeof _0x5736a6['content']!=='string')throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x19b7c0);const _0x387ad9=fileContent(_0x5736a6);_0x455477[_0x4ca1d2(0xc7)](_0x19b7c0,{'path':_0x19b7c0,'bytes':_0x387ad9});}return Array[_0x4ca1d2(0xd1)](_0x455477['values']())[_0x4ca1d2(0xe3)](compareSkillFiles);}export function normalizeManifestFiles(_0x2331bf){const _0x5bd3a8=a144_0x273f;if(!Array[_0x5bd3a8(0xca)](_0x2331bf)||_0x2331bf[_0x5bd3a8(0xe2)]===0x0)return[];const _0x206700=new Map();for(const _0x25110d of _0x2331bf){if(!_0x25110d||typeof _0x25110d!==_0x5bd3a8(0xc4)||typeof _0x25110d['path']!==_0x5bd3a8(0xbf))throw CliErrors[_0x5bd3a8(0xbe)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5992f6=normalizeSkillRelativePath(_0x25110d['path']);if(_0x206700['has'](_0x5992f6))throw CliErrors['validation'](_0x5bd3a8(0xc1)+_0x5992f6);if(!isSha256Hex(_0x25110d[_0x5bd3a8(0xc5)]))throw CliErrors[_0x5bd3a8(0xbe)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x5992f6);if(!Number[_0x5bd3a8(0xe0)](_0x25110d[_0x5bd3a8(0xdb)])||_0x25110d[_0x5bd3a8(0xdb)]<0x0)throw CliErrors[_0x5bd3a8(0xbe)](_0x5bd3a8(0xc3)+_0x5992f6);_0x206700[_0x5bd3a8(0xc7)](_0x5992f6,{'path':_0x5992f6,'sha256':_0x25110d[_0x5bd3a8(0xc5)][_0x5bd3a8(0xe5)](),'size':_0x25110d[_0x5bd3a8(0xdb)]});}return Array[_0x5bd3a8(0xd1)](_0x206700['values']())['sort'](compareSkillFiles);}function a144_0x273f(_0x127cbb,_0x16dd07){_0x127cbb=_0x127cbb-0xb9;const _0x42ed5f=a144_0x42ed();let _0x273f72=_0x42ed5f[_0x127cbb];return _0x273f72;}export function scanSkillDirectory(_0x5e0d69,_0x1409d6={}){const _0x3949df=a144_0x273f,_0x34eb2e=realpathSync(_0x5e0d69),_0x4c9883=canonicalExcludedFilePaths(_0x1409d6[_0x3949df(0xd4)]),_0x5b7913=[];function _0x9c3d07(_0x5bb08c){const _0x372447=_0x3949df,_0x20269e=readdirSync(_0x5bb08c,{'withFileTypes':!![]})[_0x372447(0xe3)]((_0x4b6777,_0x340ebf)=>_0x4b6777['name'][_0x372447(0xe1)](_0x340ebf[_0x372447(0xba)]));for(const _0x130bbb of _0x20269e){if(_0x130bbb[_0x372447(0xc9)]()&&IGNORED_DIR_NAMES[_0x372447(0xea)](_0x130bbb[_0x372447(0xba)]))continue;if(IGNORED_FILE_NAMES['has'](_0x130bbb[_0x372447(0xba)]))continue;const _0x1945d3=resolve(_0x5bb08c,_0x130bbb[_0x372447(0xba)]);if(isExcludedFilePath(_0x1945d3,_0x4c9883))continue;if(_0x130bbb['isSymbolicLink']())throw CliErrors[_0x372447(0xbe)](_0x372447(0xcf)+_0x1945d3);const _0x550e13=toPosixPath(relative(_0x34eb2e,_0x1945d3));if(_0x130bbb[_0x372447(0xc9)]()){_0x9c3d07(_0x1945d3);continue;}if(!_0x130bbb[_0x372447(0xbd)]())continue;validateSkillRelativePath(_0x550e13);const _0x52d0a7=readFileSync(_0x1945d3);_0x5b7913[_0x372447(0xc0)]({'path':_0x550e13,'bytes':_0x52d0a7});}}return _0x9c3d07(_0x34eb2e),normalizeLocalFiles(_0x5b7913);}function canonicalExcludedFilePaths(_0x1b47c2){const _0x32c012=a144_0x273f,_0x5382f8=new Set();for(const _0x53de8f of _0x1b47c2??[]){const _0x5f39b5=resolve(_0x53de8f);_0x5382f8[_0x32c012(0xdd)](_0x5f39b5);try{_0x5382f8[_0x32c012(0xdd)](realpathSync(_0x5f39b5));}catch{}}return _0x5382f8;}function isExcludedFilePath(_0x1dc59e,_0x6c2f68){const _0x8ed818=a144_0x273f;if(_0x6c2f68['has'](_0x1dc59e))return!![];if(_0x6c2f68['size']===0x0)return![];try{return _0x6c2f68[_0x8ed818(0xea)](realpathSync(_0x1dc59e));}catch{return![];}}export function compareSkillFiles(_0x22a749,_0x2d86e8){const _0x348a0d=a144_0x273f;if(_0x22a749['path']===SKILL_FILE)return _0x2d86e8['path']===SKILL_FILE?0x0:-0x1;if(_0x2d86e8[_0x348a0d(0xd7)]===SKILL_FILE)return 0x1;return Buffer[_0x348a0d(0xcc)](Buffer[_0x348a0d(0xd1)](_0x22a749[_0x348a0d(0xd7)],_0x348a0d(0xeb)),Buffer[_0x348a0d(0xd1)](_0x2d86e8[_0x348a0d(0xd7)],_0x348a0d(0xeb)));}export function normalizeSkillRelativePath(_0x68a158){const _0x10b551=toPosixPath(_0x68a158['trim']());return validateSkillRelativePath(_0x10b551),_0x10b551;}export function validateSkillRelativePath(_0x312265){const _0x292ba8=a144_0x273f;if(!_0x312265||_0x312265[_0x292ba8(0xe7)]('/')||_0x312265[_0x292ba8(0xbc)]('//'))throw CliErrors[_0x292ba8(0xbe)](_0x292ba8(0xdc)+_0x312265);for(const _0x309224 of _0x312265[_0x292ba8(0xd2)]('/')){if(!_0x309224||_0x309224==='.'||_0x309224==='..')throw CliErrors['validation'](_0x292ba8(0xdc)+_0x312265);}}export function toPosixPath(_0x40dfb2){const _0x2d2d70=a144_0x273f;return _0x40dfb2[_0x2d2d70(0xc6)](/\\/g,'/');}function a144_0x42ed(){const _0x8f8431=['validation','string','push','Duplicate\x20Skill\x20file\x20path:\x20','381647wiWTrN','Skill\x20file\x20size\x20is\x20invalid:\x20','object','sha256','replace','set','toString','isDirectory','isArray','9468408OnucWD','compare','content','146154iTINxv','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','6882237AhlGqK','from','split','32OyZpdn','excludedFilePaths','68dbUnWI','68mnCweK','path','10qJaZGA','10975DQPdIj','13rNQnZt','size','Unsafe\x20Skill\x20file\x20path:\x20','add','Skill\x20file\x20path\x20must\x20be\x20text.','bytes','isSafeInteger','localeCompare','length','sort','test','toLowerCase','isBuffer','startsWith','335IxRtqS','3912bjVLXN','has','utf8','2948099HoMPww','name','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','includes','isFile'];a144_0x42ed=function(){return _0x8f8431;};return a144_0x42ed();}export function isSha256Hex(_0x11881b){const _0x43c456=a144_0x273f;return typeof _0x11881b===_0x43c456(0xbf)&&/^[a-fA-F0-9]{64}$/[_0x43c456(0xe4)](_0x11881b);}
1
+ (function(_0x31ec1b,_0x5561b6){const _0x1f8e29=a144_0x2d29,_0x597b42=_0x31ec1b();while(!![]){try{const _0x2652f9=parseInt(_0x1f8e29(0x1b4))/0x1*(parseInt(_0x1f8e29(0x1a2))/0x2)+parseInt(_0x1f8e29(0x199))/0x3+parseInt(_0x1f8e29(0x19c))/0x4+parseInt(_0x1f8e29(0x190))/0x5+-parseInt(_0x1f8e29(0x1a4))/0x6+parseInt(_0x1f8e29(0x1af))/0x7+parseInt(_0x1f8e29(0x197))/0x8*(-parseInt(_0x1f8e29(0x1b6))/0x9);if(_0x2652f9===_0x5561b6)break;else _0x597b42['push'](_0x597b42['shift']());}catch(_0x4c8564){_0x597b42['push'](_0x597b42['shift']());}}}(a144_0x2257,0x9a56a));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';function a144_0x2d29(_0x4ce1cc,_0x4bf971){_0x4ce1cc=_0x4ce1cc-0x18a;const _0x225712=a144_0x2257();let _0x2d293b=_0x225712[_0x4ce1cc];return _0x2d293b;}export function fileContent(_0x29af3f){const _0x4a02fb=a144_0x2d29;return _0x29af3f['bytes']??Buffer[_0x4a02fb(0x1b1)](_0x29af3f[_0x4a02fb(0x19b)]??'','utf8');}export function fileText(_0x27385a){const _0x24aa97=a144_0x2d29;return fileContent(_0x27385a)[_0x24aa97(0x1b5)]('utf8');}export function normalizeLocalFiles(_0x40a915){const _0x320453=a144_0x2d29;if(!Array[_0x320453(0x1ac)](_0x40a915)||_0x40a915[_0x320453(0x19d)]===0x0)return[];const _0x3413c0=new Map();for(const _0x3f8fc5 of _0x40a915){if(!_0x3f8fc5||typeof _0x3f8fc5!==_0x320453(0x1a5)||typeof _0x3f8fc5[_0x320453(0x1b3)]!==_0x320453(0x1ab))throw CliErrors[_0x320453(0x18e)](_0x320453(0x18d));const _0x2d5dc0=normalizeSkillRelativePath(_0x3f8fc5['path']);if(_0x3413c0[_0x320453(0x1a6)](_0x2d5dc0))throw CliErrors['validation'](_0x320453(0x1ad)+_0x2d5dc0);if(_0x3f8fc5['bytes']!==undefined&&!Buffer[_0x320453(0x18a)](_0x3f8fc5[_0x320453(0x1a8)]))throw CliErrors[_0x320453(0x18e)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x2d5dc0);if(_0x3f8fc5[_0x320453(0x1a8)]===undefined&&typeof _0x3f8fc5['content']!==_0x320453(0x1ab))throw CliErrors[_0x320453(0x18e)](_0x320453(0x19f)+_0x2d5dc0);const _0x3976e9=fileContent(_0x3f8fc5);_0x3413c0[_0x320453(0x193)](_0x2d5dc0,{'path':_0x2d5dc0,'bytes':_0x3976e9});}return Array['from'](_0x3413c0[_0x320453(0x1a3)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x19d37b){const _0x2dda90=a144_0x2d29;if(!Array[_0x2dda90(0x1ac)](_0x19d37b)||_0x19d37b[_0x2dda90(0x19d)]===0x0)return[];const _0x1cc863=new Map();for(const _0x5502a3 of _0x19d37b){if(!_0x5502a3||typeof _0x5502a3!==_0x2dda90(0x1a5)||typeof _0x5502a3[_0x2dda90(0x1b3)]!==_0x2dda90(0x1ab))throw CliErrors[_0x2dda90(0x18e)](_0x2dda90(0x18d));const _0x185284=normalizeSkillRelativePath(_0x5502a3['path']);if(_0x1cc863['has'](_0x185284))throw CliErrors[_0x2dda90(0x18e)](_0x2dda90(0x1ad)+_0x185284);if(!isSha256Hex(_0x5502a3[_0x2dda90(0x191)]))throw CliErrors['validation']('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x185284);if(!Number[_0x2dda90(0x19e)](_0x5502a3[_0x2dda90(0x19a)])||_0x5502a3[_0x2dda90(0x19a)]<0x0)throw CliErrors[_0x2dda90(0x18e)](_0x2dda90(0x1a0)+_0x185284);_0x1cc863['set'](_0x185284,{'path':_0x185284,'sha256':_0x5502a3[_0x2dda90(0x191)][_0x2dda90(0x1a7)](),'size':_0x5502a3[_0x2dda90(0x19a)]});}return Array['from'](_0x1cc863[_0x2dda90(0x1a3)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x4631ea,_0x68fbb4={}){const _0x149b71=realpathSync(_0x4631ea),_0xfc6f49=canonicalExcludedFilePaths(_0x68fbb4['excludedFilePaths']),_0x3274fc=[];function _0x3eb99f(_0x34805f){const _0x26f98b=a144_0x2d29,_0x3ca579=readdirSync(_0x34805f,{'withFileTypes':!![]})[_0x26f98b(0x18b)]((_0x38e826,_0x2d5f3f)=>_0x38e826['name'][_0x26f98b(0x192)](_0x2d5f3f['name']));for(const _0x1371a5 of _0x3ca579){if(_0x1371a5[_0x26f98b(0x198)]()&&IGNORED_DIR_NAMES[_0x26f98b(0x1a6)](_0x1371a5[_0x26f98b(0x1a9)]))continue;if(IGNORED_FILE_NAMES[_0x26f98b(0x1a6)](_0x1371a5[_0x26f98b(0x1a9)]))continue;const _0x5000cf=resolve(_0x34805f,_0x1371a5[_0x26f98b(0x1a9)]);if(isExcludedFilePath(_0x5000cf,_0xfc6f49))continue;if(_0x1371a5[_0x26f98b(0x1b7)]())throw CliErrors[_0x26f98b(0x18e)](_0x26f98b(0x1aa)+_0x5000cf);const _0x476c84=toPosixPath(relative(_0x149b71,_0x5000cf));if(_0x1371a5[_0x26f98b(0x198)]()){_0x3eb99f(_0x5000cf);continue;}if(!_0x1371a5[_0x26f98b(0x18c)]())continue;validateSkillRelativePath(_0x476c84);const _0x314d70=readFileSync(_0x5000cf);_0x3274fc[_0x26f98b(0x1ae)]({'path':_0x476c84,'bytes':_0x314d70});}}return _0x3eb99f(_0x149b71),normalizeLocalFiles(_0x3274fc);}function canonicalExcludedFilePaths(_0x5dacd7){const _0x4dfeb3=a144_0x2d29,_0x5d68ce=new Set();for(const _0x5c851b of _0x5dacd7??[]){const _0x294172=resolve(_0x5c851b);_0x5d68ce['add'](_0x294172);try{_0x5d68ce[_0x4dfeb3(0x194)](realpathSync(_0x294172));}catch{}}return _0x5d68ce;}function isExcludedFilePath(_0x22f626,_0x21f46d){const _0x1d0970=a144_0x2d29;if(_0x21f46d[_0x1d0970(0x1a6)](_0x22f626))return!![];if(_0x21f46d[_0x1d0970(0x19a)]===0x0)return![];try{return _0x21f46d[_0x1d0970(0x1a6)](realpathSync(_0x22f626));}catch{return![];}}export function compareSkillFiles(_0x291187,_0x21e4b7){const _0x2fd863=a144_0x2d29;if(_0x291187[_0x2fd863(0x1b3)]===SKILL_FILE)return _0x21e4b7[_0x2fd863(0x1b3)]===SKILL_FILE?0x0:-0x1;if(_0x21e4b7[_0x2fd863(0x1b3)]===SKILL_FILE)return 0x1;return Buffer[_0x2fd863(0x1b2)](Buffer[_0x2fd863(0x1b1)](_0x291187['path'],'utf8'),Buffer[_0x2fd863(0x1b1)](_0x21e4b7['path'],'utf8'));}export function normalizeSkillRelativePath(_0x4b310f){const _0x3d3fde=toPosixPath(_0x4b310f['trim']());return validateSkillRelativePath(_0x3d3fde),_0x3d3fde;}export function validateSkillRelativePath(_0x503d12){const _0x4a1dbe=a144_0x2d29;if(!_0x503d12||_0x503d12[_0x4a1dbe(0x18f)]('/')||_0x503d12[_0x4a1dbe(0x1b0)]('//'))throw CliErrors[_0x4a1dbe(0x18e)](_0x4a1dbe(0x1a1)+_0x503d12);for(const _0x68e4a of _0x503d12[_0x4a1dbe(0x196)]('/')){if(!_0x68e4a||_0x68e4a==='.'||_0x68e4a==='..')throw CliErrors[_0x4a1dbe(0x18e)](_0x4a1dbe(0x1a1)+_0x503d12);}}export function toPosixPath(_0x3bb087){return _0x3bb087['replace'](/\\/g,'/');}export function isSha256Hex(_0x35707d){const _0x213055=a144_0x2d29;return typeof _0x35707d===_0x213055(0x1ab)&&/^[a-fA-F0-9]{64}$/[_0x213055(0x195)](_0x35707d);}function a144_0x2257(){const _0x369d8b=['compare','path','149VisDXd','toString','123183cduzFh','isSymbolicLink','isBuffer','sort','isFile','Skill\x20file\x20path\x20must\x20be\x20text.','validation','startsWith','1985710hmTaWN','sha256','localeCompare','set','add','test','split','840yLUjWP','isDirectory','3742962eEBQMq','size','content','1739716vBhZic','length','isSafeInteger','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','Unsafe\x20Skill\x20file\x20path:\x20','3628OEqmUr','values','3670524ZKgQmI','object','has','toLowerCase','bytes','name','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','string','isArray','Duplicate\x20Skill\x20file\x20path:\x20','push','2317336fRpunF','includes','from'];a144_0x2257=function(){return _0x369d8b;};return a144_0x2257();}