@lovrabet/lovrabet-cli 2.3.1 → 2.3.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/README.md +10 -8
  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/artifact/index.js +1 -1
  13. package/lib/commands/auth/device.js +1 -1
  14. package/lib/commands/auth/index.js +1 -1
  15. package/lib/commands/auth/prompt.js +1 -1
  16. package/lib/commands/bff/detail.js +1 -1
  17. package/lib/commands/bff/exec.js +1 -1
  18. package/lib/commands/bff/index.js +1 -1
  19. package/lib/commands/cli-skill/index.js +1 -1
  20. package/lib/commands/common/config-policy.js +1 -1
  21. package/lib/commands/common/constraints.js +1 -1
  22. package/lib/commands/common/flags.js +1 -1
  23. package/lib/commands/common/local-file.js +1 -1
  24. package/lib/commands/config/definitions.js +1 -1
  25. package/lib/commands/config/init.d.ts +1 -2
  26. package/lib/commands/config/init.js +1 -1
  27. package/lib/commands/config/shared.js +1 -1
  28. package/lib/commands/data/index.js +1 -1
  29. package/lib/commands/dataset/detail.js +1 -1
  30. package/lib/commands/dataset/index.js +1 -1
  31. package/lib/commands/dataset/list.js +1 -1
  32. package/lib/commands/dataset/sdk-doc.js +1 -1
  33. package/lib/commands/doctor.js +1 -1
  34. package/lib/commands/file/index.js +1 -1
  35. package/lib/commands/init.js +1 -1
  36. package/lib/commands/kb/index.js +1 -1
  37. package/lib/commands/logs/index.js +1 -1
  38. package/lib/commands/notification/config-list.js +1 -1
  39. package/lib/commands/notification/index.js +1 -1
  40. package/lib/commands/notification/shared.d.ts +0 -3
  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.d.ts +2 -0
  59. package/lib/commands/role/shared.js +1 -1
  60. package/lib/commands/role/update.js +1 -1
  61. package/lib/commands/role/user-add.js +1 -1
  62. package/lib/commands/role/user-remove.js +1 -1
  63. package/lib/commands/schedule/index.js +1 -1
  64. package/lib/commands/schema.js +1 -1
  65. package/lib/commands/service/dynamic.js +1 -1
  66. package/lib/commands/service/function-name-adapter.js +1 -1
  67. package/lib/commands/service/index.js +1 -1
  68. package/lib/commands/service/registry.js +1 -1
  69. package/lib/commands/skill/commands/create.js +1 -1
  70. package/lib/commands/skill/commands/diagram.js +1 -1
  71. package/lib/commands/skill/commands/install.js +1 -1
  72. package/lib/commands/skill/commands/list.js +1 -1
  73. package/lib/commands/skill/commands/push.js +1 -1
  74. package/lib/commands/skill/commands/validate.js +1 -1
  75. package/lib/commands/skill/diagram.js +1 -1
  76. package/lib/commands/skill/flags.js +1 -1
  77. package/lib/commands/skill/index.js +1 -1
  78. package/lib/commands/skill/manifest-helpers.js +1 -1
  79. package/lib/commands/skill/push-execute.js +1 -1
  80. package/lib/commands/skill/push-flow-helpers.js +1 -1
  81. package/lib/commands/skill/push-retarget.js +1 -1
  82. package/lib/commands/skill/scopes.js +1 -1
  83. package/lib/commands/skill/summary.js +1 -1
  84. package/lib/commands/skill/templates.js +1 -1
  85. package/lib/commands/skill/validate.js +1 -1
  86. package/lib/commands/sql/detail.js +1 -1
  87. package/lib/commands/sql/exec.js +1 -1
  88. package/lib/commands/sql/index.js +1 -1
  89. package/lib/commands/update.js +1 -1
  90. package/lib/commands/user-account/bind.js +1 -1
  91. package/lib/commands/user-account/index.js +1 -1
  92. package/lib/commands/workspace/index.js +1 -1
  93. package/lib/config/domain-config.d.ts +6 -14
  94. package/lib/config/domain-config.js +1 -1
  95. package/lib/config/schema.d.ts +1 -1
  96. package/lib/config/schema.js +1 -1
  97. package/lib/constant/app.js +1 -1
  98. package/lib/constant/auth-mode.js +1 -1
  99. package/lib/constant/cli.js +1 -1
  100. package/lib/constant/defaults.js +1 -1
  101. package/lib/constant/distribution.js +1 -1
  102. package/lib/constant/domain.d.ts +0 -3
  103. package/lib/constant/domain.js +1 -1
  104. package/lib/constant/env.js +1 -1
  105. package/lib/constant/output.js +1 -1
  106. package/lib/constant/product.js +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.d.ts +5 -10
  112. package/lib/core/api-client.js +1 -1
  113. package/lib/core/db-resolver.js +1 -1
  114. package/lib/core/kb-search-client.js +1 -1
  115. package/lib/core/sdk-client.js +1 -1
  116. package/lib/errors.js +1 -1
  117. package/lib/framework/build-all-flags.js +1 -1
  118. package/lib/framework/dryrun.js +1 -1
  119. package/lib/framework/flags.js +1 -1
  120. package/lib/framework/help.js +1 -1
  121. package/lib/framework/index.js +1 -1
  122. package/lib/framework/output.js +1 -1
  123. package/lib/framework/preparse.js +1 -1
  124. package/lib/framework/rate-limit.js +1 -1
  125. package/lib/framework/raw-flags.js +1 -1
  126. package/lib/framework/response.js +1 -1
  127. package/lib/framework/runner-confirmation.js +1 -1
  128. package/lib/framework/runner-error.js +1 -1
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/service-order.js +1 -1
  132. package/lib/framework/types.js +1 -1
  133. package/lib/generated/build-info.d.ts +4 -4
  134. package/lib/generated/build-info.js +1 -1
  135. package/lib/generated/official-routing.d.ts +1 -5
  136. package/lib/generated/official-routing.js +1 -1
  137. package/lib/generated/routing-contract.d.ts +3 -7
  138. package/lib/generated/routing-contract.js +1 -1
  139. package/lib/help.js +1 -1
  140. package/lib/postinstall.js +1 -1
  141. package/lib/runtime/confirmation.js +1 -1
  142. package/lib/runtime/event.js +1 -1
  143. package/lib/runtime/index.js +1 -1
  144. package/lib/runtime/queue.js +1 -1
  145. package/lib/runtime/resolve.js +1 -1
  146. package/lib/skills/builtin-skill.js +1 -1
  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/platform.js +1 -1
  172. package/lib/utils/update-notice.js +1 -1
  173. package/lib/utils/version.js +1 -1
  174. package/lib/utils/write-cli-side-channel.js +1 -1
  175. package/package.json +1 -1
  176. package/skills/lovrabet/SKILL.md +4 -4
  177. package/skills/lovrabet/guides/role-and-permission-workflow.md +6 -4
  178. package/skills/lovrabet/references/lovrabet-config-commands.md +7 -11
  179. package/skills/lovrabet/references/lovrabet-config.md +2 -3
  180. package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
  181. package/skills/lovrabet/references/lovrabet-kb-workflow.md +1 -1
  182. package/skills/lovrabet/references/lovrabet-notification-config-list.md +2 -8
  183. package/skills/lovrabet.manifest.json +3 -3
@@ -1,4 +1,4 @@
1
- export declare const ROUTING_CATALOG_DIGEST: "ad100799ce7bf5b9cb94d2b350b42d3b42aa5956faea0e371c7bd8abc2b8c75b";
1
+ export declare const ROUTING_CATALOG_DIGEST: "41caa63f2eaa9f96327376df380668b835ef80916584dc754147daf394c2c513";
2
2
  export declare const DEFAULT_REGION: "cn";
3
3
  export declare const REGION_VALUES: readonly ["cn", "id", "global"];
4
4
  export declare const ENABLED_REGION_VALUES: readonly ["cn", "id"];
@@ -13,14 +13,12 @@ export declare const OFFICIAL_ROUTING_PROFILES: {
13
13
  readonly api: "https://api.lovrabet.com";
14
14
  readonly runtime: "https://runtime.lovrabet.com";
15
15
  readonly skill: "https://skills.lovrabet.com";
16
- readonly kb: "https://runtime.lovrabet.com";
17
16
  };
18
17
  readonly daily: {
19
18
  readonly user: "https://user-daily.lovrabet.com";
20
19
  readonly api: "https://daily-api.lovrabet.com";
21
20
  readonly runtime: "https://daily-runtime.lovrabet.com";
22
21
  readonly skill: "https://skills-daily.lovrabet.com";
23
- readonly kb: "https://daily-runtime.lovrabet.com";
24
22
  };
25
23
  };
26
24
  };
@@ -34,7 +32,6 @@ export declare const OFFICIAL_ROUTING_PROFILES: {
34
32
  readonly api: "https://api.lovrabet.id";
35
33
  readonly runtime: "https://runtime.lovrabet.id";
36
34
  readonly skill: "https://skills.lovrabet.id";
37
- readonly kb: "https://runtime.lovrabet.id";
38
35
  };
39
36
  };
40
37
  };
@@ -48,7 +45,6 @@ export declare const OFFICIAL_ROUTING_PROFILES: {
48
45
  readonly api: "https://api.lovrabet.ai";
49
46
  readonly runtime: "https://runtime.lovrabet.ai";
50
47
  readonly skill: "https://skills.lovrabet.ai";
51
- readonly kb: "https://runtime.lovrabet.ai";
52
48
  };
53
49
  };
54
50
  };
@@ -1 +1 @@
1
- function a125_0x2603(_0xbc89dc,_0x9b180b){_0xbc89dc=_0xbc89dc-0x6e;const _0x1f3730=a125_0x1f37();let _0x260351=_0x1f3730[_0xbc89dc];return _0x260351;}const a125_0x119b6b=a125_0x2603;(function(_0x4a84aa,_0x1f51aa){const _0x353849=a125_0x2603,_0xa231e5=_0x4a84aa();while(!![]){try{const _0x4de518=parseInt(_0x353849(0x85))/0x1+parseInt(_0x353849(0x79))/0x2*(-parseInt(_0x353849(0x73))/0x3)+parseInt(_0x353849(0x7f))/0x4*(-parseInt(_0x353849(0x81))/0x5)+parseInt(_0x353849(0x7d))/0x6+-parseInt(_0x353849(0x6e))/0x7+parseInt(_0x353849(0x77))/0x8*(parseInt(_0x353849(0x87))/0x9)+-parseInt(_0x353849(0x78))/0xa;if(_0x4de518===_0x1f51aa)break;else _0xa231e5['push'](_0xa231e5['shift']());}catch(_0x52998e){_0xa231e5['push'](_0xa231e5['shift']());}}}(a125_0x1f37,0x774f7));function a125_0x1f37(){const _0x1fbf9d=['9768zbuidC','8570860aeIBbF','2BSeruN','https://user.lovrabet.com','Mainland\x20China','Indonesia','3055284vmaOrY','https://daily-runtime.lovrabet.com','537996kmrvcW','https://api.lovrabet.id','5JozkYZ','indonesia','https://skills.lovrabet.com','https://api.lovrabet.ai','745408uRMyYd','https://runtime.lovrabet.ai','4869SCGYyD','global','https://user-daily.lovrabet.com','556514aawHHT','china','https://skills.lovrabet.id','https://skills-daily.lovrabet.com','ad100799ce7bf5b9cb94d2b350b42d3b42aa5956faea0e371c7bd8abc2b8c75b','1066203pFRAjw','https://runtime.lovrabet.com','https://runtime.lovrabet.id','https://daily-api.lovrabet.com'];a125_0x1f37=function(){return _0x1fbf9d;};return a125_0x1f37();}export const ROUTING_CATALOG_DIGEST=a125_0x119b6b(0x72);export const DEFAULT_REGION='cn';export const REGION_VALUES=['cn','id',a125_0x119b6b(0x88)];export const ENABLED_REGION_VALUES=['cn','id'];export const OFFICIAL_ROUTING_PROFILES={'cn':{'enabled':!![],'label':a125_0x119b6b(0x7b),'aliases':[a125_0x119b6b(0x6f)],'serviceDomains':{'production':{'user':a125_0x119b6b(0x7a),'api':'https://api.lovrabet.com','runtime':a125_0x119b6b(0x74),'skill':a125_0x119b6b(0x83),'kb':a125_0x119b6b(0x74)},'daily':{'user':a125_0x119b6b(0x89),'api':a125_0x119b6b(0x76),'runtime':a125_0x119b6b(0x7e),'skill':a125_0x119b6b(0x71),'kb':a125_0x119b6b(0x7e)}}},'id':{'enabled':!![],'label':a125_0x119b6b(0x7c),'aliases':[a125_0x119b6b(0x82)],'serviceDomains':{'production':{'user':'https://user.lovrabet.id','api':a125_0x119b6b(0x80),'runtime':a125_0x119b6b(0x75),'skill':a125_0x119b6b(0x70),'kb':a125_0x119b6b(0x75)}}},'global':{'enabled':![],'label':'Global','aliases':[],'serviceDomains':{'production':{'user':'https://user.lovrabet.ai','api':a125_0x119b6b(0x84),'runtime':a125_0x119b6b(0x86),'skill':'https://skills.lovrabet.ai','kb':a125_0x119b6b(0x86)}}}};export const REGION_ALIASES={'china':'cn','indonesia':'id'};
1
+ const a125_0x586d1f=a125_0x40fa;(function(_0x165a57,_0xf9faac){const _0x1d2e81=a125_0x40fa,_0x815be6=_0x165a57();while(!![]){try{const _0xfd6931=-parseInt(_0x1d2e81(0x1a7))/0x1+-parseInt(_0x1d2e81(0x1a0))/0x2+-parseInt(_0x1d2e81(0x19a))/0x3*(-parseInt(_0x1d2e81(0x19e))/0x4)+parseInt(_0x1d2e81(0x198))/0x5+parseInt(_0x1d2e81(0x1a4))/0x6+parseInt(_0x1d2e81(0x1a6))/0x7*(parseInt(_0x1d2e81(0x199))/0x8)+-parseInt(_0x1d2e81(0x1a5))/0x9*(-parseInt(_0x1d2e81(0x1a9))/0xa);if(_0xfd6931===_0xf9faac)break;else _0x815be6['push'](_0x815be6['shift']());}catch(_0x160b68){_0x815be6['push'](_0x815be6['shift']());}}}(a125_0x50af,0xe1d7c));export const ROUTING_CATALOG_DIGEST=a125_0x586d1f(0x1a1);export const DEFAULT_REGION='cn';export const REGION_VALUES=['cn','id','global'];export const ENABLED_REGION_VALUES=['cn','id'];export const OFFICIAL_ROUTING_PROFILES={'cn':{'enabled':!![],'label':a125_0x586d1f(0x19f),'aliases':['china'],'serviceDomains':{'production':{'user':a125_0x586d1f(0x197),'api':'https://api.lovrabet.com','runtime':'https://runtime.lovrabet.com','skill':a125_0x586d1f(0x19c)},'daily':{'user':a125_0x586d1f(0x19b),'api':'https://daily-api.lovrabet.com','runtime':a125_0x586d1f(0x196),'skill':a125_0x586d1f(0x1ab)}}},'id':{'enabled':!![],'label':a125_0x586d1f(0x19d),'aliases':[a125_0x586d1f(0x1af)],'serviceDomains':{'production':{'user':a125_0x586d1f(0x1aa),'api':'https://api.lovrabet.id','runtime':a125_0x586d1f(0x1a3),'skill':a125_0x586d1f(0x1ad)}}},'global':{'enabled':![],'label':a125_0x586d1f(0x1b0),'aliases':[],'serviceDomains':{'production':{'user':a125_0x586d1f(0x1ae),'api':a125_0x586d1f(0x1a8),'runtime':a125_0x586d1f(0x1ac),'skill':a125_0x586d1f(0x1a2)}}}};function a125_0x50af(){const _0x2fab86=['1234295EsQyck','5111792dmpYix','1851087sbsqzS','https://user-daily.lovrabet.com','https://skills.lovrabet.com','Indonesia','8eyfaBk','Mainland\x20China','3590466ptMLoc','41caa63f2eaa9f96327376df380668b835ef80916584dc754147daf394c2c513','https://skills.lovrabet.ai','https://runtime.lovrabet.id','6180258PKJuXs','18nodmzy','7Jawnpn','818551WbbHIv','https://api.lovrabet.ai','1944510hkQlLN','https://user.lovrabet.id','https://skills-daily.lovrabet.com','https://runtime.lovrabet.ai','https://skills.lovrabet.id','https://user.lovrabet.ai','indonesia','Global','https://daily-runtime.lovrabet.com','https://user.lovrabet.com'];a125_0x50af=function(){return _0x2fab86;};return a125_0x50af();}function a125_0x40fa(_0x5c37b8,_0x563652){_0x5c37b8=_0x5c37b8-0x196;const _0x50af07=a125_0x50af();let _0x40fa14=_0x50af07[_0x5c37b8];return _0x40fa14;}export const REGION_ALIASES={'china':'cn','indonesia':'id'};
@@ -1,9 +1,5 @@
1
- export declare const ENTERPRISE_ROUTING_SCHEMA_DIGEST: "0bc465ada0b5c1621a0dfd5441b91b5d7c69d95ef7417f07cc7afd3548593d8a";
1
+ export declare const ENTERPRISE_ROUTING_SCHEMA_DIGEST: "51e352a2636c432b76d331cc9ff81c215d7cbe3d1d07ab7bd7bedb7bdb91631c";
2
2
  export declare const ENTERPRISE_ROUTING_PROTOCOL: "lovrabet-routing/v1";
3
3
  export declare const ENTERPRISE_ROUTING_KIND: "enterprise";
4
- export declare const ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS: readonly ["protocol", "kind", "domains", "cdn"];
5
- export declare const ENTERPRISE_ROUTING_CONSUMERS: readonly ["rabetbase-cli", "lovrabet-cli", "lovrabet-node-sdk"];
6
- export declare const ENTERPRISE_ROUTING_DOMAIN_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain", "kbDomain", "appDomain", "localDomain", "certificateDomain"];
7
- export declare const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain", "kbDomain", "appDomain"];
8
- export declare const ENTERPRISE_ROUTING_CDN_FIELDS: readonly ["libraries", "lovrabet"];
9
- export declare const REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS: readonly ["libraries", "lovrabet"];
4
+ export declare const ENTERPRISE_ROUTING_DOMAIN_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain"];
5
+ export declare const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain"];
@@ -1 +1 @@
1
- function a126_0x31c7(_0x5cbd79,_0x316ff1){_0x5cbd79=_0x5cbd79-0x14d;const _0x18f171=a126_0x18f1();let _0x31c749=_0x18f171[_0x5cbd79];return _0x31c749;}const a126_0x3db252=a126_0x31c7;(function(_0x2bf0fd,_0x37f8da){const _0x21527c=a126_0x31c7,_0x1fd3b2=_0x2bf0fd();while(!![]){try{const _0x302123=parseInt(_0x21527c(0x155))/0x1*(parseInt(_0x21527c(0x157))/0x2)+-parseInt(_0x21527c(0x163))/0x3*(-parseInt(_0x21527c(0x154))/0x4)+-parseInt(_0x21527c(0x160))/0x5+-parseInt(_0x21527c(0x15e))/0x6+parseInt(_0x21527c(0x14f))/0x7*(parseInt(_0x21527c(0x167))/0x8)+-parseInt(_0x21527c(0x15c))/0x9+-parseInt(_0x21527c(0x159))/0xa;if(_0x302123===_0x37f8da)break;else _0x1fd3b2['push'](_0x1fd3b2['shift']());}catch(_0x56acbe){_0x1fd3b2['push'](_0x1fd3b2['shift']());}}}(a126_0x18f1,0x9356c));export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a126_0x3db252(0x15a);export const ENTERPRISE_ROUTING_PROTOCOL=a126_0x3db252(0x15b);export const ENTERPRISE_ROUTING_KIND=a126_0x3db252(0x151);export const ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS=[a126_0x3db252(0x166),a126_0x3db252(0x15f),a126_0x3db252(0x158),a126_0x3db252(0x161)];export const ENTERPRISE_ROUTING_CONSUMERS=[a126_0x3db252(0x164),a126_0x3db252(0x15d),'lovrabet-node-sdk'];export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=['userDomain',a126_0x3db252(0x152),a126_0x3db252(0x150),a126_0x3db252(0x153),a126_0x3db252(0x156),a126_0x3db252(0x162),'localDomain',a126_0x3db252(0x14e)];export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a126_0x3db252(0x165),'apiDomain','runtimeDomain',a126_0x3db252(0x153),a126_0x3db252(0x156),a126_0x3db252(0x162)];export const ENTERPRISE_ROUTING_CDN_FIELDS=['libraries',a126_0x3db252(0x14d)];export const REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS=['libraries',a126_0x3db252(0x14d)];function a126_0x18f1(){const _0x44c3bc=['lovrabet','certificateDomain','36645njBtvO','runtimeDomain','enterprise','apiDomain','skillDomain','71524rxbszg','5yRtsJs','kbDomain','353490rvHueI','domains','3935780CietsD','0bc465ada0b5c1621a0dfd5441b91b5d7c69d95ef7417f07cc7afd3548593d8a','lovrabet-routing/v1','1291842hRjcWM','lovrabet-cli','6314334JAfTVs','kind','338100AUeHBS','cdn','appDomain','195Ffuhkt','rabetbase-cli','userDomain','protocol','328swNGmL'];a126_0x18f1=function(){return _0x44c3bc;};return a126_0x18f1();}
1
+ const a126_0x411ebc=a126_0x931c;(function(_0x5104a7,_0x15eac5){const _0x330dba=a126_0x931c,_0x5008cf=_0x5104a7();while(!![]){try{const _0x53cc44=parseInt(_0x330dba(0x84))/0x1*(parseInt(_0x330dba(0x8b))/0x2)+-parseInt(_0x330dba(0x8e))/0x3+parseInt(_0x330dba(0x85))/0x4+parseInt(_0x330dba(0x8a))/0x5*(parseInt(_0x330dba(0x82))/0x6)+parseInt(_0x330dba(0x89))/0x7+-parseInt(_0x330dba(0x87))/0x8+parseInt(_0x330dba(0x8c))/0x9*(-parseInt(_0x330dba(0x83))/0xa);if(_0x53cc44===_0x15eac5)break;else _0x5008cf['push'](_0x5008cf['shift']());}catch(_0x4d807b){_0x5008cf['push'](_0x5008cf['shift']());}}}(a126_0x4130,0xc98c5));function a126_0x4130(){const _0xc2375a=['1mBEpll','5906260HmUOVI','runtimeDomain','11156448czOYQh','lovrabet-routing/v1','4831456RqYech','1046665yfChLR','1163936oQMdse','63QTqtxe','51e352a2636c432b76d331cc9ff81c215d7cbe3d1d07ab7bd7bedb7bdb91631c','2803722MpKWWF','apiDomain','userDomain','42JbJGAb','1513430QZyXjz'];a126_0x4130=function(){return _0xc2375a;};return a126_0x4130();}function a126_0x931c(_0x3595d9,_0x8250ad){_0x3595d9=_0x3595d9-0x82;const _0x413062=a126_0x4130();let _0x931c85=_0x413062[_0x3595d9];return _0x931c85;}export const ENTERPRISE_ROUTING_SCHEMA_DIGEST=a126_0x411ebc(0x8d);export const ENTERPRISE_ROUTING_PROTOCOL=a126_0x411ebc(0x88);export const ENTERPRISE_ROUTING_KIND='enterprise';export const ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a126_0x411ebc(0x90),a126_0x411ebc(0x8f),a126_0x411ebc(0x86),'skillDomain'];export const REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS=[a126_0x411ebc(0x90),a126_0x411ebc(0x8f),a126_0x411ebc(0x86),'skillDomain'];
package/lib/help.js CHANGED
@@ -1 +1 @@
1
- (function(_0x180f7d,_0x532797){const _0x3f7f59=a127_0x3b9c,_0x821acb=_0x180f7d();while(!![]){try{const _0x2e1d2e=parseInt(_0x3f7f59(0x1b6))/0x1+parseInt(_0x3f7f59(0x1bb))/0x2*(parseInt(_0x3f7f59(0x1b9))/0x3)+parseInt(_0x3f7f59(0x1bf))/0x4*(-parseInt(_0x3f7f59(0x1b8))/0x5)+parseInt(_0x3f7f59(0x1bc))/0x6*(-parseInt(_0x3f7f59(0x1c1))/0x7)+parseInt(_0x3f7f59(0x1bd))/0x8+parseInt(_0x3f7f59(0x1b7))/0x9*(-parseInt(_0x3f7f59(0x1be))/0xa)+-parseInt(_0x3f7f59(0x1ba))/0xb;if(_0x2e1d2e===_0x532797)break;else _0x821acb['push'](_0x821acb['shift']());}catch(_0x48ce17){_0x821acb['push'](_0x821acb['shift']());}}}(a127_0x2d52,0x9008e));import{jsx as a127_0x4f5889,jsxs as a127_0x35a923}from'react/jsx-runtime';import{useEffect}from'react';function a127_0x2d52(){const _0x37def9=['597047LDsrgE','228626ikYafD','150ZfGCFd','706376vLzNzv','20pcWdIr','167084OxWpSl','green','203119SPiRjC','column','\x20\x20Use\x20','704287noYYGt','1043451LuDnJQ','40UxOAXs','30jjnbtJ'];a127_0x2d52=function(){return _0x37def9;};return a127_0x2d52();}function a127_0x3b9c(_0x343bfb,_0x72118e){_0x343bfb=_0x343bfb-0x1b6;const _0x2d52dd=a127_0x2d52();let _0x3b9c4d=_0x2d52dd[_0x343bfb];return _0x3b9c4d;}import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x1f949c=a127_0x3b9c,{exit:_0x408ecd}=useApp();return useEffect(()=>{_0x408ecd();},[_0x408ecd]),a127_0x35a923(Box,{'flexDirection':_0x1f949c(0x1c2),'marginTop':0x1,'marginBottom':0x1,'children':[a127_0x4f5889(Box,{'children':a127_0x4f5889(Text,{'bold':!![],'color':_0x1f949c(0x1c0),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a127_0x35a923(Box,{'marginTop':0x1,'children':[a127_0x4f5889(Text,{'dimColor':!![],'children':_0x1f949c(0x1c3)}),a127_0x4f5889(Text,{'bold':!![],'color':_0x1f949c(0x1c0),'children':CLI_BIN_NAME+'\x20--help'}),a127_0x4f5889(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
1
+ (function(_0x17e91b,_0x1bbad9){const _0x28fb37=a127_0x81d3,_0x10af57=_0x17e91b();while(!![]){try{const _0x2f49c7=-parseInt(_0x28fb37(0x1fb))/0x1+-parseInt(_0x28fb37(0x1f2))/0x2+-parseInt(_0x28fb37(0x1fa))/0x3*(parseInt(_0x28fb37(0x1ef))/0x4)+-parseInt(_0x28fb37(0x1fe))/0x5+-parseInt(_0x28fb37(0x1f4))/0x6*(-parseInt(_0x28fb37(0x1f5))/0x7)+-parseInt(_0x28fb37(0x1f9))/0x8*(parseInt(_0x28fb37(0x1f6))/0x9)+parseInt(_0x28fb37(0x1f7))/0xa*(parseInt(_0x28fb37(0x1f1))/0xb);if(_0x2f49c7===_0x1bbad9)break;else _0x10af57['push'](_0x10af57['shift']());}catch(_0x555c94){_0x10af57['push'](_0x10af57['shift']());}}}(a127_0x51e4,0x4b195));function a127_0x51e4(){const _0x5f16eb=['\x20to\x20view\x20available\x20commands.','green','2455465ZQttNb','16sLzMwJ','\x20--help','66KJQpDx','729952XuHbCS','column','7086MIstke','2184oTyrLM','27FzRKrF','1996340Ukaxjy','\x20\x20Use\x20','634008aKAMjV','103035Xnfnva','27469pJKyWV'];a127_0x51e4=function(){return _0x5f16eb;};return a127_0x51e4();}import{jsx as a127_0x2149e2,jsxs as a127_0x3d17c6}from'react/jsx-runtime';function a127_0x81d3(_0x56a119,_0x57aa1a){_0x56a119=_0x56a119-0x1ef;const _0x51e4c8=a127_0x51e4();let _0x81d3ca=_0x51e4c8[_0x56a119];return _0x81d3ca;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x16feea=a127_0x81d3,{exit:_0x85bf37}=useApp();return useEffect(()=>{_0x85bf37();},[_0x85bf37]),a127_0x3d17c6(Box,{'flexDirection':_0x16feea(0x1f3),'marginTop':0x1,'marginBottom':0x1,'children':[a127_0x2149e2(Box,{'children':a127_0x2149e2(Text,{'bold':!![],'color':_0x16feea(0x1fd),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a127_0x3d17c6(Box,{'marginTop':0x1,'children':[a127_0x2149e2(Text,{'dimColor':!![],'children':_0x16feea(0x1f8)}),a127_0x2149e2(Text,{'bold':!![],'color':_0x16feea(0x1fd),'children':CLI_BIN_NAME+_0x16feea(0x1f0)}),a127_0x2149e2(Text,{'dimColor':!![],'children':_0x16feea(0x1fc)})]})]});}
@@ -1 +1 @@
1
- function a128_0x4f35(){const _0x4052a5=['skillVersion','Installation\x20failed','FAILED','Lovrabet\x20Built-in\x20Skill\x20','9OtfeXs','code','installedPath','log','1958698fXrPbA','\x20at\x20','4195EBIPSS','651432MHzTmL','50CExgvX','24390ohyUzI','331864SRlWkU','1744GtfVPG','Repair\x20with:\x20','\x20via\x20skills@latest','error','SOURCE_INVALID','warn','10coKmVx','[BUILTIN_SKILL_INSTALL_','already\x20current','installed','184008SEPpPb','repairCommand','1404799SpdptC'];a128_0x4f35=function(){return _0x4052a5;};return a128_0x4f35();}(function(_0xf208e4,_0x2bda4e){const _0x496d20=a128_0x59f6,_0x4f2ee2=_0xf208e4();while(!![]){try{const _0x1f12d9=-parseInt(_0x496d20(0x168))/0x1+parseInt(_0x496d20(0x166))/0x2*(parseInt(_0x496d20(0x167))/0x3)+-parseInt(_0x496d20(0x169))/0x4*(-parseInt(_0x496d20(0x164))/0x5)+parseInt(_0x496d20(0x165))/0x6+-parseInt(_0x496d20(0x162))/0x7+-parseInt(_0x496d20(0x157))/0x8*(-parseInt(_0x496d20(0x15e))/0x9)+parseInt(_0x496d20(0x153))/0xa*(parseInt(_0x496d20(0x159))/0xb);if(_0x1f12d9===_0x2bda4e)break;else _0x4f2ee2['push'](_0x4f2ee2['shift']());}catch(_0x14259c){_0x4f2ee2['push'](_0x4f2ee2['shift']());}}}(a128_0x4f35,0x34e52));function a128_0x59f6(_0x1991b5,_0x3d38bc){_0x1991b5=_0x1991b5-0x153;const _0x4f3576=a128_0x4f35();let _0x59f6cb=_0x4f3576[_0x1991b5];return _0x59f6cb;}import{installBuiltinSkill}from'./skills/builtin-skill.js';export async function runPostinstall(_0x22fb81={}){const _0x5eddf6=a128_0x59f6,_0x9b7ec3=installBuiltinSkill(_0x22fb81);if(_0x9b7ec3['ok']){const _0x1442ba=_0x9b7ec3['changed']?_0x5eddf6(0x156):_0x5eddf6(0x155),_0x59ee95=_0x9b7ec3[_0x5eddf6(0x160)]?_0x5eddf6(0x163)+_0x9b7ec3['installedPath']:_0x5eddf6(0x16b);return console[_0x5eddf6(0x161)](_0x5eddf6(0x15d)+_0x9b7ec3[_0x5eddf6(0x15a)]+'\x20'+_0x1442ba+_0x59ee95),_0x9b7ec3;}const _0x4e7e5e=_0x5eddf6(0x154)+(_0x9b7ec3[_0x5eddf6(0x15f)]??_0x5eddf6(0x15c))+']\x20'+(_0x9b7ec3[_0x5eddf6(0x16c)]??_0x5eddf6(0x15b))+'.\x20'+(_0x5eddf6(0x16a)+_0x9b7ec3[_0x5eddf6(0x158)]);if(_0x9b7ec3[_0x5eddf6(0x15f)]===_0x5eddf6(0x16d))throw new Error(_0x4e7e5e);return console[_0x5eddf6(0x16e)](_0x4e7e5e),_0x9b7ec3;}
1
+ function a128_0x1478(){const _0x3226ce=['928260MZgRcn','372ctEMZh','187NwKBlF','1601165itbEAd','skillVersion','508272FygDtx','36LxoBwK','warn','error','repairCommand','Installation\x20failed','151336CwpFmA','code','\x20via\x20skills@latest','6201NwLDFg','FAILED','Repair\x20with:\x20','140WAWtAn','already\x20current','1270nACTzt','changed','SOURCE_INVALID','110aXRANL','46083atvjjS'];a128_0x1478=function(){return _0x3226ce;};return a128_0x1478();}function a128_0x3cca(_0x53c3af,_0x1eb228){_0x53c3af=_0x53c3af-0x97;const _0x147863=a128_0x1478();let _0x3cca4b=_0x147863[_0x53c3af];return _0x3cca4b;}(function(_0x164854,_0xb59b93){const _0x2e1e3f=a128_0x3cca,_0x5b4cfb=_0x164854();while(!![]){try{const _0x2fed4e=parseInt(_0x2e1e3f(0xae))/0x1*(parseInt(_0x2e1e3f(0xad))/0x2)+-parseInt(_0x2e1e3f(0xab))/0x3*(parseInt(_0x2e1e3f(0x9a))/0x4)+parseInt(_0x2e1e3f(0x97))/0x5+-parseInt(_0x2e1e3f(0xac))/0x6+-parseInt(_0x2e1e3f(0xa5))/0x7*(parseInt(_0x2e1e3f(0x9f))/0x8)+-parseInt(_0x2e1e3f(0xa2))/0x9*(-parseInt(_0x2e1e3f(0xa7))/0xa)+-parseInt(_0x2e1e3f(0xaa))/0xb*(-parseInt(_0x2e1e3f(0x99))/0xc);if(_0x2fed4e===_0xb59b93)break;else _0x5b4cfb['push'](_0x5b4cfb['shift']());}catch(_0x998a2f){_0x5b4cfb['push'](_0x5b4cfb['shift']());}}}(a128_0x1478,0x2f8db));import{installBuiltinSkill}from'./skills/builtin-skill.js';export async function runPostinstall(_0x1027f9={}){const _0x5140fe=a128_0x3cca,_0x2dceea=installBuiltinSkill(_0x1027f9);if(_0x2dceea['ok']){const _0x3c2462=_0x2dceea[_0x5140fe(0xa8)]?'installed':_0x5140fe(0xa6),_0x5109f1=_0x2dceea['installedPath']?'\x20at\x20'+_0x2dceea['installedPath']:_0x5140fe(0xa1);return console['log']('Lovrabet\x20Built-in\x20Skill\x20'+_0x2dceea[_0x5140fe(0x98)]+'\x20'+_0x3c2462+_0x5109f1),_0x2dceea;}const _0x82601='[BUILTIN_SKILL_INSTALL_'+(_0x2dceea[_0x5140fe(0xa0)]??_0x5140fe(0xa3))+']\x20'+(_0x2dceea[_0x5140fe(0x9c)]??_0x5140fe(0x9e))+'.\x20'+(_0x5140fe(0xa4)+_0x2dceea[_0x5140fe(0x9d)]);if(_0x2dceea[_0x5140fe(0xa0)]===_0x5140fe(0xa9))throw new Error(_0x82601);return console[_0x5140fe(0x9b)](_0x82601),_0x2dceea;}
@@ -1 +1 @@
1
- (function(_0xeb523e,_0x1026c0){const _0x1c455f=a129_0x9ede,_0x306622=_0xeb523e();while(!![]){try{const _0x23673f=parseInt(_0x1c455f(0x19f))/0x1+-parseInt(_0x1c455f(0x1a9))/0x2+parseInt(_0x1c455f(0x19a))/0x3*(parseInt(_0x1c455f(0x196))/0x4)+parseInt(_0x1c455f(0x1a2))/0x5*(-parseInt(_0x1c455f(0x197))/0x6)+parseInt(_0x1c455f(0x1aa))/0x7*(parseInt(_0x1c455f(0x1a1))/0x8)+parseInt(_0x1c455f(0x1a0))/0x9+-parseInt(_0x1c455f(0x1a7))/0xa*(-parseInt(_0x1c455f(0x1a3))/0xb);if(_0x23673f===_0x1026c0)break;else _0x306622['push'](_0x306622['shift']());}catch(_0x1c039e){_0x306622['push'](_0x306622['shift']());}}}(a129_0x6898,0x4b8bd));const DESCRIPTION_MAX_LENGTH=0x1f4;function a129_0x9ede(_0x130b4a,_0x5cef1a){_0x130b4a=_0x130b4a-0x195;const _0x689876=a129_0x6898();let _0x9ede8e=_0x689876[_0x130b4a];return _0x9ede8e;}function a129_0x6898(){const _0x53be4b=['high-risk-write','1479351JrjOYr','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','slice','string','description','70240YdDOsw','614619JDVKSC','252376KUIULt','5JKeiTM','207779XzRXHN','risk','replace','write','130MKnZeD','Run\x20this\x20write\x20operation','1181896yOZoaA','21IGlrqA','trim','4TJdadN','428766GqqVFq','confirmationDescription'];a129_0x6898=function(){return _0x53be4b;};return a129_0x6898();}export function buildLovrabetConfirmationRequest(_0x2b2aa3,_0x538531,_0x1a4ef1){const _0x4a08e0=a129_0x9ede,_0x16df7c=normalizeText(_0x2b2aa3[_0x4a08e0(0x198)],DESCRIPTION_MAX_LENGTH),_0x2a7545=normalizeText(_0x2b2aa3[_0x4a08e0(0x19e)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x538531,'risk':requireWriteRisk(_0x2b2aa3),'description':_0x16df7c||_0x2a7545||_0x4a08e0(0x1a8),..._0x1a4ef1?{'signal':_0x1a4ef1}:{}};}function requireWriteRisk(_0x48ecaf){const _0xf3cbe1=a129_0x9ede;if(_0x48ecaf['risk']===_0xf3cbe1(0x1a6)||_0x48ecaf['risk']===_0xf3cbe1(0x199))return _0x48ecaf[_0xf3cbe1(0x1a4)];throw new Error(_0xf3cbe1(0x19b));}function normalizeText(_0x408464,_0x1eec8f){const _0x216df0=a129_0x9ede;if(typeof _0x408464!==_0x216df0(0x19d))return'';return _0x408464[_0x216df0(0x1a5)](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x216df0(0x1a5)](/\s+/g,'\x20')[_0x216df0(0x195)]()[_0x216df0(0x19c)](0x0,_0x1eec8f);}
1
+ (function(_0x2ee90d,_0x199d39){const _0x5472b9=a129_0x128f,_0x1ae2cb=_0x2ee90d();while(!![]){try{const _0x3a347a=-parseInt(_0x5472b9(0x91))/0x1*(parseInt(_0x5472b9(0xa3))/0x2)+parseInt(_0x5472b9(0x9d))/0x3+parseInt(_0x5472b9(0xa0))/0x4+parseInt(_0x5472b9(0x94))/0x5*(parseInt(_0x5472b9(0x99))/0x6)+parseInt(_0x5472b9(0xa5))/0x7*(-parseInt(_0x5472b9(0x95))/0x8)+-parseInt(_0x5472b9(0x98))/0x9+parseInt(_0x5472b9(0x9c))/0xa;if(_0x3a347a===_0x199d39)break;else _0x1ae2cb['push'](_0x1ae2cb['shift']());}catch(_0x13085c){_0x1ae2cb['push'](_0x1ae2cb['shift']());}}}(a129_0x4bcf,0x2cd19));function a129_0x128f(_0x59e7df,_0x2efa1b){_0x59e7df=_0x59e7df-0x91;const _0x4bcf09=a129_0x4bcf();let _0x128fa3=_0x4bcf09[_0x59e7df];return _0x128fa3;}const DESCRIPTION_MAX_LENGTH=0x1f4;function a129_0x4bcf(){const _0x58ef58=['description','Lovrabet\x20confirmation\x20requires\x20a\x20write\x20command.','1833273aYfqmW','1728954jKhVFP','risk','string','772810lXsFhR','738036xlmOcI','write','replace','765212CLtNaA','trim','slice','124xGaFIW','Run\x20this\x20write\x20operation','7nGNlXC','1277yNvzDk','confirmationDescription','high-risk-write','5bMLixm','2690456Pgyhmw'];a129_0x4bcf=function(){return _0x58ef58;};return a129_0x4bcf();}export function buildLovrabetConfirmationRequest(_0x39c588,_0x4d9f76,_0x24047e){const _0x460a9e=a129_0x128f,_0x2a75f0=normalizeText(_0x39c588[_0x460a9e(0x92)],DESCRIPTION_MAX_LENGTH),_0x49108b=normalizeText(_0x39c588[_0x460a9e(0x96)],DESCRIPTION_MAX_LENGTH);return{'operation':_0x4d9f76,'risk':requireWriteRisk(_0x39c588),'description':_0x2a75f0||_0x49108b||_0x460a9e(0xa4),..._0x24047e?{'signal':_0x24047e}:{}};}function requireWriteRisk(_0xdfd9c0){const _0x19db36=a129_0x128f;if(_0xdfd9c0['risk']===_0x19db36(0x9e)||_0xdfd9c0[_0x19db36(0x9a)]===_0x19db36(0x93))return _0xdfd9c0['risk'];throw new Error(_0x19db36(0x97));}function normalizeText(_0x5332b1,_0x2204dd){const _0x5552ad=a129_0x128f;if(typeof _0x5332b1!==_0x5552ad(0x9b))return'';return _0x5332b1['replace'](/[\u0000-\u001f\u007f]+/g,'\x20')[_0x5552ad(0x9f)](/\s+/g,'\x20')[_0x5552ad(0xa1)]()[_0x5552ad(0xa2)](0x0,_0x2204dd);}
@@ -1 +1 @@
1
- function a130_0x3676(_0x2c4835,_0x3985d3){_0x2c4835=_0x2c4835-0x6a;const _0xe6d44b=a130_0xe6d4();let _0x367656=_0xe6d44b[_0x2c4835];return _0x367656;}(function(_0x1c12d7,_0x340ecf){const _0x4a84ef=a130_0x3676,_0x552d05=_0x1c12d7();while(!![]){try{const _0x26382c=parseInt(_0x4a84ef(0x6e))/0x1+-parseInt(_0x4a84ef(0x76))/0x2+parseInt(_0x4a84ef(0x75))/0x3*(parseInt(_0x4a84ef(0x72))/0x4)+parseInt(_0x4a84ef(0x74))/0x5*(-parseInt(_0x4a84ef(0x79))/0x6)+-parseInt(_0x4a84ef(0x70))/0x7*(parseInt(_0x4a84ef(0x6f))/0x8)+-parseInt(_0x4a84ef(0x7a))/0x9+parseInt(_0x4a84ef(0x7b))/0xa;if(_0x26382c===_0x340ecf)break;else _0x552d05['push'](_0x552d05['shift']());}catch(_0x4de240){_0x552d05['push'](_0x552d05['shift']());}}}(a130_0xe6d4,0xc44ab));export function canonicalLovrabetOperation(_0x547fb4){const _0x27e267=a130_0x3676;return[_0x547fb4[_0x27e267(0x73)],..._0x547fb4[_0x27e267(0x6a)][_0x27e267(0x6d)]()['split'](/\s+/)]['filter'](Boolean)['join']('.');}export function createLovrabetWriteMetadata(_0x135910,_0x4c36df,_0x2b107f,_0x31193d){const _0x4f8e45=a130_0x3676;if(_0x31193d||_0x2b107f['ok']!==!![]||_0x135910[_0x4f8e45(0x78)]!==_0x4f8e45(0x6c)&&_0x135910['risk']!==_0x4f8e45(0x6b))return undefined;const _0xaebfbd=_0x135910[_0x4f8e45(0x71)]?.(_0x2b107f),_0x9e5966={'type':_0x4f8e45(0x77),'operation':_0x4c36df,'risk':_0x135910[_0x4f8e45(0x78)],..._0xaebfbd?{'subject':_0xaebfbd}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x9e5966}};}function a130_0xe6d4(){const _0x178dd7=['service','5fnmGpd','3MbIdTf','2167742ljZeoD','lovrabet.write.completed','risk','278796UOjYVs','3727629BrpxTQ','23180300VhurYj','command','high-risk-write','write','trim','24586pIfhLv','16CldpUu','968674fchWgN','writeEventSubject','1130708ctESwK'];a130_0xe6d4=function(){return _0x178dd7;};return a130_0xe6d4();}
1
+ (function(_0x4c7b7e,_0x244de9){const _0x426861=a130_0x75fa,_0x205122=_0x4c7b7e();while(!![]){try{const _0x2de972=parseInt(_0x426861(0xdc))/0x1+-parseInt(_0x426861(0xd1))/0x2*(-parseInt(_0x426861(0xcf))/0x3)+parseInt(_0x426861(0xd2))/0x4*(-parseInt(_0x426861(0xd4))/0x5)+-parseInt(_0x426861(0xce))/0x6+-parseInt(_0x426861(0xd9))/0x7*(-parseInt(_0x426861(0xcb))/0x8)+-parseInt(_0x426861(0xd5))/0x9+-parseInt(_0x426861(0xdb))/0xa*(-parseInt(_0x426861(0xda))/0xb);if(_0x2de972===_0x244de9)break;else _0x205122['push'](_0x205122['shift']());}catch(_0x586a7c){_0x205122['push'](_0x205122['shift']());}}}(a130_0x1656,0x27374));function a130_0x1656(){const _0x13a101=['filter','8EcegOT','join','writeEventSubject','772422NmuFou','15vMfzYY','trim','57458aunRCm','217612yXQLCB','write','10PAFnJg','1738935ufHiIz','service','split','lovrabet.write.completed','1502263lETvWD','11JhTxnH','1357130xKrEgZ','97419unkNPj','risk'];a130_0x1656=function(){return _0x13a101;};return a130_0x1656();}export function canonicalLovrabetOperation(_0x17f6fb){const _0x3c8cc2=a130_0x75fa;return[_0x17f6fb[_0x3c8cc2(0xd6)],..._0x17f6fb['command'][_0x3c8cc2(0xd0)]()[_0x3c8cc2(0xd7)](/\s+/)][_0x3c8cc2(0xca)](Boolean)[_0x3c8cc2(0xcc)]('.');}function a130_0x75fa(_0x1d53dc,_0x3f3c56){_0x1d53dc=_0x1d53dc-0xc9;const _0x16565f=a130_0x1656();let _0x75fab=_0x16565f[_0x1d53dc];return _0x75fab;}export function createLovrabetWriteMetadata(_0x1ca436,_0x43eb24,_0x876ed,_0x4e5fe3){const _0x2649d1=a130_0x75fa;if(_0x4e5fe3||_0x876ed['ok']!==!![]||_0x1ca436[_0x2649d1(0xc9)]!==_0x2649d1(0xd3)&&_0x1ca436[_0x2649d1(0xc9)]!=='high-risk-write')return undefined;const _0x174532=_0x1ca436[_0x2649d1(0xcd)]?.(_0x876ed),_0x5dc73={'type':_0x2649d1(0xd8),'operation':_0x43eb24,'risk':_0x1ca436[_0x2649d1(0xc9)],..._0x174532?{'subject':_0x174532}:{}};return{'lovrabet':{'schemaVersion':0x1,'event':_0x5dc73}};}
@@ -1 +1 @@
1
- (function(_0x3d7c9f,_0x315f4a){const _0x2158d4=a131_0x44e3,_0x48510d=_0x3d7c9f();while(!![]){try{const _0x4b2ad3=parseInt(_0x2158d4(0x87))/0x1*(parseInt(_0x2158d4(0x78))/0x2)+parseInt(_0x2158d4(0x6d))/0x3+parseInt(_0x2158d4(0x68))/0x4+-parseInt(_0x2158d4(0x8e))/0x5*(-parseInt(_0x2158d4(0x84))/0x6)+-parseInt(_0x2158d4(0x82))/0x7*(parseInt(_0x2158d4(0x6f))/0x8)+parseInt(_0x2158d4(0x7e))/0x9+-parseInt(_0x2158d4(0x7b))/0xa*(parseInt(_0x2158d4(0x8d))/0xb);if(_0x4b2ad3===_0x315f4a)break;else _0x48510d['push'](_0x48510d['shift']());}catch(_0x49ba21){_0x48510d['push'](_0x48510d['shift']());}}}(a131_0x35d6,0x4be01));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';function a131_0x35d6(){const _0x20aae0=['isNonInteractive','risk','1628262QxVtiU','args','dry-run','yes','13461NuSQim','presentation','8178xxbpDP','format','confirmation','363889eHoLsk','present','AbortError','high-risk-write','reason','dryRun','8390657CJMWSZ','245MmzmSt','125116QZgmVQ','confirm','signal','message','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','1395939iASlYU','rawFlags','144IQFYsj','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','definition','result','riskLevel','write','command','Lovrabet\x20invocation\x20aborted.','aborted','2vqrLrz','stringify','execute','10TslbYE'];a131_0x35d6=function(){return _0x20aae0;};return a131_0x35d6();}import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x5f9fee,command:_0x11b14b,risk:_0x5cf415,dryRun:_0x3573d9}){const _0x2883b0=a131_0x44e3;return JSON[_0x2883b0(0x79)]({'ok':_0x5f9fee['ok'],'command':_0x11b14b,'risk':_0x5cf415,..._0x3573d9?{'dryRun':!![]}:{},..._0x5f9fee['data']!==undefined?{'data':_0x5f9fee['data']}:{},..._0x5f9fee['message']?{'message':_0x5f9fee[_0x2883b0(0x6b)]}:{}});}};export async function invokeLovrabet(_0x18a987,_0x2105d2){const _0x4a0695=a131_0x44e3;throwIfAborted(_0x2105d2[_0x4a0695(0x6a)]);const _0x3c0d7f=await resolveLovrabetInvocation(_0x18a987),_0x10f029=canonicalLovrabetOperation(_0x3c0d7f[_0x4a0695(0x71)]);return await confirmWriteBeforeQueue(_0x3c0d7f['definition'],_0x3c0d7f[_0x4a0695(0x6e)],_0x10f029,_0x2105d2),runSerialized(async()=>{const _0x26df34=_0x4a0695;throwIfAborted(_0x2105d2[_0x26df34(0x6a)]);const _0x51894c={},_0x4dd627=buildConfigFromFlags(_0x3c0d7f[_0x26df34(0x6e)]);await initGlobalEnvironment(_0x4dd627);const _0x39c58f=createPipelineEnv(_0x4dd627,{..._0x3c0d7f['rawFlags'],'yes':_0x3c0d7f[_0x26df34(0x71)]['risk']===_0x26df34(0x8a)?!![]:_0x3c0d7f[_0x26df34(0x6e)][_0x26df34(0x81)],'nonInteractive':!![]});_0x39c58f[_0x26df34(0x7f)]=_0x3c0d7f['args'],_0x39c58f[_0x26df34(0x7c)]=!![],_0x39c58f[_0x26df34(0x73)]=_0x26df34(0x8a);const _0xd37a3=withAbortSignal(_0x3c0d7f[_0x26df34(0x71)],_0x2105d2['signal']),_0x1369de=createLovrabetRunnerAdapter({'formatOutput'(_0x286d31,_0x2cf311){const _0x3f2778=_0x26df34;_0x51894c[_0x3f2778(0x72)]=_0x286d31,_0x51894c[_0x3f2778(0x75)]=_0x2cf311[_0x3f2778(0x75)],_0x51894c['risk']=_0x2cf311[_0x3f2778(0x7d)],_0x51894c[_0x3f2778(0x85)]=_0x2cf311[_0x3f2778(0x85)],_0x51894c[_0x3f2778(0x8c)]=_0x2cf311[_0x3f2778(0x8c)]===!![];},async 'confirmHighRisk'(){const _0x4da72a=_0x26df34;throw new Error(_0x4da72a(0x70));}});try{await runCommand(_0xd37a3,_0x39c58f,_0x1369de);if(!_0x51894c[_0x26df34(0x72)]||!_0x51894c[_0x26df34(0x75)]||!_0x51894c[_0x26df34(0x7d)]||!_0x51894c[_0x26df34(0x85)])throw new Error(_0x26df34(0x6c));const _0x5ba899=_0x2105d2[_0x26df34(0x83)]??defaultPresentation,_0x2a3372=_0x51894c[_0x26df34(0x8c)]===!![],_0x3b8d91={'result':_0x51894c[_0x26df34(0x72)],'command':_0x51894c['command'],'operation':_0x10f029,'risk':_0x51894c[_0x26df34(0x7d)],'format':_0x51894c[_0x26df34(0x85)],'dryRun':_0x2a3372},_0x253490=createLovrabetWriteMetadata(_0x3c0d7f[_0x26df34(0x71)],_0x10f029,_0x51894c[_0x26df34(0x72)],_0x2a3372);let _0x2981bf;try{_0x2981bf=await _0x5ba899['present'](_0x3b8d91);}catch(_0x333a50){if(!_0x253490||_0x5ba899===defaultPresentation)throw _0x333a50;_0x2981bf=await defaultPresentation[_0x26df34(0x88)](_0x3b8d91);}return{'operation':_0x10f029,'risk':_0x51894c[_0x26df34(0x7d)],'mode':_0x2a3372?_0x26df34(0x80):_0x26df34(0x7a),'result':_0x51894c['result'],'output':_0x2981bf,..._0x253490?{'metadata':_0x253490}:{}};}finally{await finalizeLovrabetRuntimeState();}});}function a131_0x44e3(_0x4d6872,_0x17d1af){_0x4d6872=_0x4d6872-0x68;const _0x35d6e1=a131_0x35d6();let _0x44e3cd=_0x35d6e1[_0x4d6872];return _0x44e3cd;}async function confirmWriteBeforeQueue(_0x5962db,_0x21e293,_0x1c0e2c,_0x26f69b){const _0x1dbd42=a131_0x44e3;if(_0x21e293[_0x1dbd42(0x8c)]===!![]||_0x5962db['risk']!==_0x1dbd42(0x74)&&_0x5962db[_0x1dbd42(0x7d)]!==_0x1dbd42(0x8a))return;await _0x26f69b[_0x1dbd42(0x86)][_0x1dbd42(0x69)](buildLovrabetConfirmationRequest(_0x5962db,_0x1c0e2c,_0x26f69b[_0x1dbd42(0x6a)]));}function withAbortSignal(_0x37b6ce,_0x5a17fc){return{..._0x37b6ce,async 'execute'(_0x163015){const _0xfd4ef5=a131_0x44e3;return throwIfAborted(_0x5a17fc),_0x37b6ce[_0xfd4ef5(0x7a)]({..._0x163015,'signal':_0x5a17fc});}};}function throwIfAborted(_0x14c0d7){const _0x5806c0=a131_0x44e3;if(_0x14c0d7?.[_0x5806c0(0x77)])throw _0x14c0d7['reason']instanceof Error?_0x14c0d7[_0x5806c0(0x8b)]:new DOMException(_0x5806c0(0x76),_0x5806c0(0x89));}
1
+ (function(_0x2cf6d5,_0x14c317){const _0x116123=a131_0x5ea9,_0x4a960c=_0x2cf6d5();while(!![]){try{const _0x492fa9=parseInt(_0x116123(0xb9))/0x1*(-parseInt(_0x116123(0xa7))/0x2)+-parseInt(_0x116123(0xae))/0x3*(parseInt(_0x116123(0xa4))/0x4)+-parseInt(_0x116123(0xa2))/0x5+-parseInt(_0x116123(0xbb))/0x6*(-parseInt(_0x116123(0xad))/0x7)+-parseInt(_0x116123(0xa8))/0x8+-parseInt(_0x116123(0xa9))/0x9+parseInt(_0x116123(0xb8))/0xa*(parseInt(_0x116123(0x9e))/0xb);if(_0x492fa9===_0x14c317)break;else _0x4a960c['push'](_0x4a960c['shift']());}catch(_0x3fdf38){_0x4a960c['push'](_0x4a960c['shift']());}}}(a131_0x16f0,0x64554));import{buildConfigFromFlags,initGlobalEnvironment}from'../context.js';import{createLovrabetRunnerAdapter,createPipelineEnv,finalizeLovrabetRuntimeState,runCommand}from'../framework/runner.js';import{canonicalLovrabetOperation,createLovrabetWriteMetadata}from'../runtime/event.js';function a131_0x5ea9(_0x4f29f8,_0x49e4d6){_0x4f29f8=_0x4f29f8-0x9c;const _0x16f04d=a131_0x16f0();let _0x5ea9cb=_0x16f04d[_0x4f29f8];return _0x5ea9cb;}import{buildLovrabetConfirmationRequest}from'../runtime/confirmation.js';import{resolveLovrabetInvocation}from'../runtime/resolve.js';import{runSerialized}from'../runtime/queue.js';const defaultPresentation={'present'({result:_0x302231,command:_0x331043,risk:_0x296519,dryRun:_0x2f9d01}){const _0x526238=a131_0x5ea9;return JSON[_0x526238(0xb2)]({'ok':_0x302231['ok'],'command':_0x331043,'risk':_0x296519,..._0x2f9d01?{'dryRun':!![]}:{},..._0x302231[_0x526238(0xbd)]!==undefined?{'data':_0x302231[_0x526238(0xbd)]}:{},..._0x302231[_0x526238(0xb7)]?{'message':_0x302231[_0x526238(0xb7)]}:{}});}};export async function invokeLovrabet(_0x1e7060,_0x16b24e){const _0x25db19=a131_0x5ea9;throwIfAborted(_0x16b24e['signal']);const _0x3f326b=await resolveLovrabetInvocation(_0x1e7060),_0xa13e10=canonicalLovrabetOperation(_0x3f326b[_0x25db19(0xaf)]);return await confirmWriteBeforeQueue(_0x3f326b[_0x25db19(0xaf)],_0x3f326b[_0x25db19(0xbf)],_0xa13e10,_0x16b24e),runSerialized(async()=>{const _0x2b622a=_0x25db19;throwIfAborted(_0x16b24e[_0x2b622a(0xac)]);const _0x5a9009={},_0x12301c=buildConfigFromFlags(_0x3f326b['rawFlags']);await initGlobalEnvironment(_0x12301c);const _0x513ef9=createPipelineEnv(_0x12301c,{..._0x3f326b[_0x2b622a(0xbf)],'yes':_0x3f326b['definition']['risk']===_0x2b622a(0xb0)?!![]:_0x3f326b[_0x2b622a(0xbf)][_0x2b622a(0xa5)],'nonInteractive':!![]});_0x513ef9[_0x2b622a(0xaa)]=_0x3f326b['args'],_0x513ef9[_0x2b622a(0xb4)]=!![],_0x513ef9[_0x2b622a(0x9c)]=_0x2b622a(0xb0);const _0x40c8b7=withAbortSignal(_0x3f326b[_0x2b622a(0xaf)],_0x16b24e[_0x2b622a(0xac)]),_0x56d26b=createLovrabetRunnerAdapter({'formatOutput'(_0x2aa095,_0x49a2a7){const _0x19c73e=_0x2b622a;_0x5a9009['result']=_0x2aa095,_0x5a9009[_0x19c73e(0xa3)]=_0x49a2a7[_0x19c73e(0xa3)],_0x5a9009['risk']=_0x49a2a7[_0x19c73e(0xa6)],_0x5a9009[_0x19c73e(0xbc)]=_0x49a2a7['format'],_0x5a9009[_0x19c73e(0x9f)]=_0x49a2a7[_0x19c73e(0x9f)]===!![];},async 'confirmHighRisk'(){const _0x3ae6a1=_0x2b622a;throw new Error(_0x3ae6a1(0xbe));}});try{await runCommand(_0x40c8b7,_0x513ef9,_0x56d26b);if(!_0x5a9009['result']||!_0x5a9009['command']||!_0x5a9009[_0x2b622a(0xa6)]||!_0x5a9009['format'])throw new Error(_0x2b622a(0xa1));const _0x56490d=_0x16b24e['presentation']??defaultPresentation,_0x3a595c=_0x5a9009['dryRun']===!![],_0x134567={'result':_0x5a9009[_0x2b622a(0xba)],'command':_0x5a9009[_0x2b622a(0xa3)],'operation':_0xa13e10,'risk':_0x5a9009[_0x2b622a(0xa6)],'format':_0x5a9009[_0x2b622a(0xbc)],'dryRun':_0x3a595c},_0x1f6fc9=createLovrabetWriteMetadata(_0x3f326b[_0x2b622a(0xaf)],_0xa13e10,_0x5a9009[_0x2b622a(0xba)],_0x3a595c);let _0x1851d6;try{_0x1851d6=await _0x56490d['present'](_0x134567);}catch(_0x8efeb3){if(!_0x1f6fc9||_0x56490d===defaultPresentation)throw _0x8efeb3;_0x1851d6=await defaultPresentation['present'](_0x134567);}return{'operation':_0xa13e10,'risk':_0x5a9009[_0x2b622a(0xa6)],'mode':_0x3a595c?_0x2b622a(0xb3):_0x2b622a(0xb5),'result':_0x5a9009[_0x2b622a(0xba)],'output':_0x1851d6,..._0x1f6fc9?{'metadata':_0x1f6fc9}:{}};}finally{await finalizeLovrabetRuntimeState();}});}async function confirmWriteBeforeQueue(_0x53beaa,_0x2d5431,_0x456df3,_0x3e1cf4){const _0x5a12b=a131_0x5ea9;if(_0x2d5431[_0x5a12b(0x9f)]===!![]||_0x53beaa[_0x5a12b(0xa6)]!==_0x5a12b(0xb6)&&_0x53beaa[_0x5a12b(0xa6)]!==_0x5a12b(0xb0))return;await _0x3e1cf4[_0x5a12b(0xab)][_0x5a12b(0xb1)](buildLovrabetConfirmationRequest(_0x53beaa,_0x456df3,_0x3e1cf4['signal']));}function withAbortSignal(_0x5593fe,_0x2445a5){return{..._0x5593fe,async 'execute'(_0x29911a){return throwIfAborted(_0x2445a5),_0x5593fe['execute']({..._0x29911a,'signal':_0x2445a5});}};}function throwIfAborted(_0x1bbb17){const _0x364d8c=a131_0x5ea9;if(_0x1bbb17?.[_0x364d8c(0x9d)])throw _0x1bbb17['reason']instanceof Error?_0x1bbb17[_0x364d8c(0xa0)]:new DOMException('Lovrabet\x20invocation\x20aborted.','AbortError');}function a131_0x16f0(){const _0xa7e8f=['5007150daJWLz','args','confirmation','signal','177415BqQUuh','749154IcHlBL','definition','high-risk-write','confirm','stringify','dry-run','isNonInteractive','execute','write','message','30DGgqYS','706204YyQcma','result','168myIsGI','format','data','Embedded\x20Lovrabet\x20confirmation\x20must\x20run\x20inside\x20execute.','rawFlags','riskLevel','aborted','8677086GsLLnr','dryRun','reason','Lovrabet\x20invocation\x20completed\x20without\x20a\x20captured\x20command\x20result.','3038810wnZTez','command','8NLoMet','yes','risk','2vNCwfv','2363376NvSCpk'];a131_0x16f0=function(){return _0xa7e8f;};return a131_0x16f0();}
@@ -1 +1 @@
1
- function a132_0x318b(_0x1b1388,_0x478b69){_0x1b1388=_0x1b1388-0x18c;const _0x7b2a99=a132_0x7b2a();let _0x318b09=_0x7b2a99[_0x1b1388];return _0x318b09;}function a132_0x7b2a(){const _0x1d45d9=['catch','12GgQHBN','6112740BhWWfV','1025CMtxyK','25684mdXcyP','1764045wfSgTL','1iVLNQo','182JnIzDr','1197210jxlxqU','resolve','33712ihExsi','570447eyjeJv'];a132_0x7b2a=function(){return _0x1d45d9;};return a132_0x7b2a();}const a132_0x23f3cc=a132_0x318b;(function(_0x45b1f9,_0x441bcf){const _0x474ca2=a132_0x318b,_0x45c1c6=_0x45b1f9();while(!![]){try{const _0x4a153b=parseInt(_0x474ca2(0x18c))/0x1*(-parseInt(_0x474ca2(0x196))/0x2)+-parseInt(_0x474ca2(0x191))/0x3+parseInt(_0x474ca2(0x193))/0x4*(-parseInt(_0x474ca2(0x195))/0x5)+-parseInt(_0x474ca2(0x18e))/0x6+-parseInt(_0x474ca2(0x18d))/0x7*(-parseInt(_0x474ca2(0x190))/0x8)+-parseInt(_0x474ca2(0x197))/0x9+parseInt(_0x474ca2(0x194))/0xa;if(_0x4a153b===_0x441bcf)break;else _0x45c1c6['push'](_0x45c1c6['shift']());}catch(_0x866aa9){_0x45c1c6['push'](_0x45c1c6['shift']());}}}(a132_0x7b2a,0x1db5c));let tail=Promise[a132_0x23f3cc(0x18f)]();export async function runSerialized(_0x52d0ba){const _0x432a02=a132_0x23f3cc,_0x41e860=tail;let _0x132b4d;tail=new Promise(_0x50c820=>{_0x132b4d=_0x50c820;}),await _0x41e860[_0x432a02(0x192)](()=>undefined);try{return await _0x52d0ba();}finally{_0x132b4d();}}
1
+ (function(_0x5b0347,_0x449dcd){const _0x50ffdd=a132_0x1ebe,_0x477b93=_0x5b0347();while(!![]){try{const _0x5a08cb=parseInt(_0x50ffdd(0x87))/0x1*(-parseInt(_0x50ffdd(0x89))/0x2)+-parseInt(_0x50ffdd(0x84))/0x3*(parseInt(_0x50ffdd(0x80))/0x4)+parseInt(_0x50ffdd(0x81))/0x5+-parseInt(_0x50ffdd(0x83))/0x6*(parseInt(_0x50ffdd(0x88))/0x7)+-parseInt(_0x50ffdd(0x7f))/0x8*(parseInt(_0x50ffdd(0x85))/0x9)+parseInt(_0x50ffdd(0x86))/0xa+parseInt(_0x50ffdd(0x82))/0xb;if(_0x5a08cb===_0x449dcd)break;else _0x477b93['push'](_0x477b93['shift']());}catch(_0x494323){_0x477b93['push'](_0x477b93['shift']());}}}(a132_0x16d6,0x27883));let tail=Promise['resolve']();function a132_0x16d6(){const _0x5be2b8=['4zpDfes','367787YYoCkD','155534noCZje','72Fkghdx','107328cAFagj','1590020xaWbZV','6497821XdILXu','30WvSGJM','6mflFRq','190602TLVhMX','712470IEvMRb'];a132_0x16d6=function(){return _0x5be2b8;};return a132_0x16d6();}function a132_0x1ebe(_0x531b3a,_0x1cfdab){_0x531b3a=_0x531b3a-0x7f;const _0x16d6ec=a132_0x16d6();let _0x1ebe92=_0x16d6ec[_0x531b3a];return _0x1ebe92;}export async function runSerialized(_0x5b4282){const _0x29e638=tail;let _0x323b0a;tail=new Promise(_0x8dc73a=>{_0x323b0a=_0x8dc73a;}),await _0x29e638['catch'](()=>undefined);try{return await _0x5b4282();}finally{_0x323b0a();}}
@@ -1 +1 @@
1
- (function(_0x29b583,_0x2f7d58){const _0x5dc2ca=a133_0x1f8d,_0x4c2980=_0x29b583();while(!![]){try{const _0x441a02=-parseInt(_0x5dc2ca(0xfc))/0x1+parseInt(_0x5dc2ca(0xff))/0x2+-parseInt(_0x5dc2ca(0x108))/0x3+-parseInt(_0x5dc2ca(0xf8))/0x4+-parseInt(_0x5dc2ca(0xfd))/0x5*(-parseInt(_0x5dc2ca(0xfb))/0x6)+parseInt(_0x5dc2ca(0xf4))/0x7*(-parseInt(_0x5dc2ca(0x100))/0x8)+parseInt(_0x5dc2ca(0x101))/0x9;if(_0x441a02===_0x2f7d58)break;else _0x4c2980['push'](_0x4c2980['shift']());}catch(_0x403a6a){_0x4c2980['push'](_0x4c2980['shift']());}}}(a133_0x4481,0xd62dd));function a133_0x4481(){const _0x3c7704=['189575UrZEnw','slice','788814AJmsBX','328112dcnhCB','37544580mjJUNj','args','join','../commands/registry.js','Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','validation','assign','3246768GnQgPX','../framework/preparse.js','203DlpXJC','input','unknownCommand','flags','5915156HhHpZu','hint','Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22','108VDQtXS','620769ycumVK'];a133_0x4481=function(){return _0x3c7704;};return a133_0x4481();}import a133_0x1fb9ad from'meow';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';function a133_0x1f8d(_0x3f6387,_0x274094){_0x3f6387=_0x3f6387-0xf3;const _0x4481da=a133_0x4481();let _0x1f8da7=_0x4481da[_0x3f6387];return _0x1f8da7;}export async function resolveLovrabetInvocation(_0x40e3b6){const _0x123bab=a133_0x1f8d,_0x328349=a133_0x1fb9ad('',{'importMeta':import.meta,'argv':_0x40e3b6,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x2d8c62=[..._0x328349[_0x123bab(0xf5)]],_0x10880a=_0x328349[_0x123bab(0xf7)];await correctFlags(_0x10880a);const _0x25e060=_0x2d8c62[0x0];if(!_0x25e060)throw CliErrors[_0x123bab(0x106)](_0x123bab(0x105));const _0x1def1d=resolveRemovedCommand(_0x25e060,_0x2d8c62[0x1]);if(_0x1def1d)throw CliErrors[_0x123bab(0x106)](_0x1def1d['message'],_0x1def1d[_0x123bab(0xf9)]);if(!isKnownService(_0x25e060)){const _0x545ebe=resolveDynamicServiceCommand(_0x2d8c62,_0x10880a);if(!_0x545ebe)throw CliErrors['unknownCommand'](_0x2d8c62[_0x123bab(0x103)]('\x20'));return Object[_0x123bab(0x107)](_0x10880a,_0x545ebe['flags']),{'definition':_0x545ebe['definition'],'rawFlags':_0x10880a,'args':_0x545ebe[_0x123bab(0x102)]};}const _0x4fddb2=getServiceEntry(_0x25e060),_0x221220=_0x2d8c62[0x1]||_0x4fddb2['defaultCommand'];if(!_0x221220)throw CliErrors[_0x123bab(0x106)](_0x123bab(0xfa)+_0x25e060+'\x22.');const _0x557604=findDefinition(_0x25e060,_0x221220);if(!_0x557604)throw CliErrors[_0x123bab(0xf6)](_0x25e060+'\x20'+_0x221220);return{'definition':_0x557604,'rawFlags':_0x10880a,'args':_0x2d8c62[_0x123bab(0xfe)](0x2)};}async function correctFlags(_0x5655cb){const _0x1891d3=a133_0x1f8d;try{const {correctFlags:_0x3ce168}=await import(_0x1891d3(0xf3)),{getAllDefinitions:_0x8e6da0}=await import(_0x1891d3(0x104)),_0x284175=_0x8e6da0()['flatMap'](_0x4ad240=>_0x4ad240['flags']??[]),_0x21ed23=_0x3ce168(_0x5655cb,_0x284175);Object['assign'](_0x5655cb,_0x21ed23[_0x1891d3(0xf7)]);}catch{}}
1
+ (function(_0x30caa1,_0x524fea){const _0x305930=a133_0x5d49,_0x5693a5=_0x30caa1();while(!![]){try{const _0x5c1c9f=-parseInt(_0x305930(0x93))/0x1*(parseInt(_0x305930(0x9b))/0x2)+parseInt(_0x305930(0x99))/0x3*(-parseInt(_0x305930(0xa2))/0x4)+-parseInt(_0x305930(0x9d))/0x5+-parseInt(_0x305930(0x95))/0x6+parseInt(_0x305930(0x91))/0x7*(parseInt(_0x305930(0xa1))/0x8)+parseInt(_0x305930(0x92))/0x9+-parseInt(_0x305930(0x98))/0xa*(-parseInt(_0x305930(0x9e))/0xb);if(_0x5c1c9f===_0x524fea)break;else _0x5693a5['push'](_0x5693a5['shift']());}catch(_0x33d9cf){_0x5693a5['push'](_0x5693a5['shift']());}}}(a133_0x2aea,0x31ba0));import a133_0x35c72c from'meow';import{findDefinition,getServiceEntry,isKnownService,resolveRemovedCommand}from'../commands/registry.js';import{resolveDynamicServiceCommand}from'../commands/service/dynamic.js';import{buildMeowFlags}from'../constant/cli.js';function a133_0x5d49(_0x39cd0e,_0x52f3f4){_0x39cd0e=_0x39cd0e-0x8f;const _0x2aea19=a133_0x2aea();let _0x5d4991=_0x2aea19[_0x39cd0e];return _0x5d4991;}import{CliErrors}from'../errors.js';function a133_0x2aea(){const _0x166719=['Lovrabet\x20argv\x20must\x20include\x20a\x20service\x20and\x20command.','1883nHnuHz','1494936ryfFsq','1333wAHNgg','slice','2285292PYSfYj','message','flatMap','9408250fVplzw','226671gGKBPJ','definition','232pnezRt','unknownCommand','1499915dnFqIx','11qQnlVI','validation','assign','232pAwvWD','4sJooVP','args','hint','input','flags'];a133_0x2aea=function(){return _0x166719;};return a133_0x2aea();}export async function resolveLovrabetInvocation(_0x211906){const _0x2a4596=a133_0x5d49,_0x368faa=a133_0x35c72c('',{'importMeta':import.meta,'argv':_0x211906,'flags':buildMeowFlags(),'autoHelp':![],'autoVersion':![]}),_0x2937e8=[..._0x368faa[_0x2a4596(0xa5)]],_0x5ae316=_0x368faa[_0x2a4596(0x8f)];await correctFlags(_0x5ae316);const _0x5a9cfb=_0x2937e8[0x0];if(!_0x5a9cfb)throw CliErrors[_0x2a4596(0x9f)](_0x2a4596(0x90));const _0x1d7ecf=resolveRemovedCommand(_0x5a9cfb,_0x2937e8[0x1]);if(_0x1d7ecf)throw CliErrors[_0x2a4596(0x9f)](_0x1d7ecf[_0x2a4596(0x96)],_0x1d7ecf[_0x2a4596(0xa4)]);if(!isKnownService(_0x5a9cfb)){const _0x184055=resolveDynamicServiceCommand(_0x2937e8,_0x5ae316);if(!_0x184055)throw CliErrors[_0x2a4596(0x9c)](_0x2937e8['join']('\x20'));return Object[_0x2a4596(0xa0)](_0x5ae316,_0x184055[_0x2a4596(0x8f)]),{'definition':_0x184055[_0x2a4596(0x9a)],'rawFlags':_0x5ae316,'args':_0x184055[_0x2a4596(0xa3)]};}const _0xdc6847=getServiceEntry(_0x5a9cfb),_0x3ee1bf=_0x2937e8[0x1]||_0xdc6847['defaultCommand'];if(!_0x3ee1bf)throw CliErrors[_0x2a4596(0x9f)]('Lovrabet\x20argv\x20must\x20include\x20a\x20command\x20for\x20service\x20\x22'+_0x5a9cfb+'\x22.');const _0x2f0f7e=findDefinition(_0x5a9cfb,_0x3ee1bf);if(!_0x2f0f7e)throw CliErrors['unknownCommand'](_0x5a9cfb+'\x20'+_0x3ee1bf);return{'definition':_0x2f0f7e,'rawFlags':_0x5ae316,'args':_0x2937e8[_0x2a4596(0x94)](0x2)};}async function correctFlags(_0x472f76){const _0x142b47=a133_0x5d49;try{const {correctFlags:_0x12bd1f}=await import('../framework/preparse.js'),{getAllDefinitions:_0x354a5e}=await import('../commands/registry.js'),_0x1ef417=_0x354a5e()[_0x142b47(0x97)](_0x55be13=>_0x55be13[_0x142b47(0x8f)]??[]),_0x1a1c7a=_0x12bd1f(_0x472f76,_0x1ef417);Object[_0x142b47(0xa0)](_0x472f76,_0x1a1c7a[_0x142b47(0x8f)]);}catch{}}
@@ -1 +1 @@
1
- const a135_0x3c9c02=a135_0x2d33;(function(_0x1b407e,_0x291880){const _0x3de1b8=a135_0x2d33,_0x1f6ffa=_0x1b407e();while(!![]){try{const _0x4ee3e4=-parseInt(_0x3de1b8(0x173))/0x1*(-parseInt(_0x3de1b8(0x175))/0x2)+-parseInt(_0x3de1b8(0x15d))/0x3*(parseInt(_0x3de1b8(0x192))/0x4)+-parseInt(_0x3de1b8(0x17c))/0x5+parseInt(_0x3de1b8(0x19c))/0x6+parseInt(_0x3de1b8(0x181))/0x7*(-parseInt(_0x3de1b8(0x19b))/0x8)+parseInt(_0x3de1b8(0x196))/0x9+-parseInt(_0x3de1b8(0x15b))/0xa;if(_0x4ee3e4===_0x291880)break;else _0x1f6ffa['push'](_0x1f6ffa['shift']());}catch(_0x491afe){_0x1f6ffa['push'](_0x1f6ffa['shift']());}}}(a135_0x275b,0xf05f4));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=a135_0x3c9c02(0x17d),SKILL_NAME=a135_0x3c9c02(0x163);function frontmatterValue(_0x5bce13,_0x44fa6f){const _0x1aabe6=a135_0x3c9c02;return _0x5bce13[_0x1aabe6(0x179)](new RegExp('^'+_0x44fa6f+_0x1aabe6(0x195),'m'))?.[0x1]?.[_0x1aabe6(0x189)]()??'';}function listFiles(_0x376bdc,_0x342022=_0x376bdc){const _0xdb7732=a135_0x3c9c02;return readdirSync(_0x342022,{'withFileTypes':!![]})[_0xdb7732(0x174)](_0x1a7850=>{const _0x33719f=_0xdb7732,_0x4c3a4d=join(_0x342022,_0x1a7850[_0x33719f(0x15c)]),_0x1e58fe=lstatSync(_0x4c3a4d);if(_0x1e58fe[_0x33719f(0x161)]())throw new Error(_0x33719f(0x18a)+_0x4c3a4d);if(_0x1e58fe[_0x33719f(0x16d)]())return listFiles(_0x376bdc,_0x4c3a4d);if(!_0x1e58fe['isFile']())throw new Error('Unsupported\x20Skill\x20entry:\x20'+_0x4c3a4d);return[relative(_0x376bdc,_0x4c3a4d)[_0x33719f(0x171)](sep)[_0x33719f(0x16e)]('/')];})[_0xdb7732(0x17b)]((_0x27441d,_0x579fcc)=>_0x27441d<_0x579fcc?-0x1:_0x27441d>_0x579fcc?0x1:0x0);}function digestFiles(_0xdb33,_0x573d4e){const _0x4ee732=a135_0x3c9c02,_0x125cbb=createHash('sha256');for(const _0xdb5f9 of _0x573d4e){if(_0xdb5f9[_0x4ee732(0x17a)]('/')||_0xdb5f9[_0x4ee732(0x171)]('/')[_0x4ee732(0x17f)]('..')||_0xdb5f9['includes']('\x5c'))throw new Error(_0x4ee732(0x198)+_0xdb5f9);_0x125cbb[_0x4ee732(0x178)](_0xdb5f9),_0x125cbb[_0x4ee732(0x178)]('\x00'),_0x125cbb['update'](readFileSync(join(_0xdb33,..._0xdb5f9[_0x4ee732(0x171)]('/')))),_0x125cbb[_0x4ee732(0x178)]('\x00');}return _0x125cbb[_0x4ee732(0x188)](_0x4ee732(0x160));}function a135_0x2d33(_0x2e974a,_0x27c80b){_0x2e974a=_0x2e974a-0x15b;const _0x275b65=a135_0x275b();let _0x2d3360=_0x275b65[_0x2e974a];return _0x2d3360;}function sameFiles(_0x3e4bb0,_0x2fdcdc){const _0x2640e7=a135_0x3c9c02;return _0x3e4bb0[_0x2640e7(0x190)]===_0x2fdcdc[_0x2640e7(0x190)]&&_0x3e4bb0[_0x2640e7(0x167)]((_0x458c12,_0x1db866)=>_0x458c12===_0x2fdcdc[_0x1db866]);}function readSource(_0x211d6a){const _0x2ede76=a135_0x3c9c02,_0x1092ef=JSON['parse'](readFileSync(join(_0x211d6a,_0x2ede76(0x191)),_0x2ede76(0x164))),_0xf233d6=JSON[_0x2ede76(0x182)](readFileSync(join(_0x211d6a,_0x2ede76(0x197),_0x2ede76(0x18b)),_0x2ede76(0x164))),_0x307c1f=join(_0x211d6a,_0x2ede76(0x197),SKILL_NAME),_0xb2ecca=frontmatterValue(readFileSync(join(_0x307c1f,'SKILL.md'),_0x2ede76(0x164)),_0x2ede76(0x18f)),_0x337d6f=listFiles(_0x307c1f);if(_0xf233d6[_0x2ede76(0x19d)]!==0x1||_0xf233d6['name']!==SKILL_NAME||!_0x1092ef['version']||_0xf233d6[_0x2ede76(0x17e)]!==_0x1092ef[_0x2ede76(0x18f)]||_0xf233d6[_0x2ede76(0x16b)]!==_0x1092ef[_0x2ede76(0x18f)]||_0xb2ecca!==_0x1092ef[_0x2ede76(0x18f)]||!sameFiles(_0x337d6f,_0xf233d6[_0x2ede76(0x18d)])||digestFiles(_0x307c1f,_0x337d6f)!==_0xf233d6[_0x2ede76(0x188)])throw new Error(_0x2ede76(0x19a));return{'packageVersion':_0x1092ef[_0x2ede76(0x18f)],'skillVersion':_0xb2ecca,'root':_0x307c1f,'manifest':_0xf233d6};}function installedSkillPath(_0x3ffd79){const _0xcaf998=a135_0x3c9c02,_0x264310=resolveInstalledSkill(SKILL_NAME,{'home':_0x3ffd79});if(_0x264310[_0xcaf998(0x194)]===_0xcaf998(0x184))return{'state':_0xcaf998(0x184),'path':dirname(_0x264310['path'])};if(_0x264310['state']===_0xcaf998(0x18c))return{'state':_0xcaf998(0x185)};return{'state':_0xcaf998(0x16f),'reason':_0x264310['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x395f93,_0x34d1da={}){const _0x4a7504=a135_0x3c9c02,_0x427163=installedSkillPath(_0x34d1da['home']??homedir());if(_0x427163[_0x4a7504(0x194)]===_0x4a7504(0x185))return{'state':_0x4a7504(0x185),'expectedVersion':_0x395f93,'repairCommand':REPAIR_COMMAND};if(_0x427163['state']==='unverifiable')return{'state':_0x4a7504(0x16f),'expectedVersion':_0x395f93,'reason':_0x427163[_0x4a7504(0x180)],'repairCommand':REPAIR_COMMAND};try{const _0x409e50=frontmatterValue(readFileSync(join(_0x427163['path'],_0x4a7504(0x177)),'utf8'),'version');return{'state':_0x409e50===_0x395f93?_0x4a7504(0x169):_0x4a7504(0x186),'expectedVersion':_0x395f93,'skillVersion':_0x409e50,'installedPath':_0x427163[_0x4a7504(0x172)],'repairCommand':REPAIR_COMMAND};}catch(_0x27b093){return{'state':_0x4a7504(0x16f),'expectedVersion':_0x395f93,'installedPath':_0x427163['path'],'reason':_0x27b093 instanceof Error?_0x27b093[_0x4a7504(0x187)]:String(_0x27b093),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x4a4775={}){const _0x5744b6=a135_0x3c9c02,_0x263bfd=_0x4a4775[_0x5744b6(0x168)]??DEFAULT_PACKAGE_ROOT;let _0x404795;try{_0x404795=readSource(_0x263bfd);}catch(_0x456bdb){return{'state':'unverifiable','packageVersion':_0x5744b6(0x170),'reason':_0x456bdb instanceof Error?_0x456bdb['message']:String(_0x456bdb),'repairCommand':REPAIR_COMMAND};}const _0x515362=installedSkillPath(_0x4a4775[_0x5744b6(0x166)]??homedir());if(_0x515362[_0x5744b6(0x194)]==='missing')return{'state':'missing','packageVersion':_0x404795[_0x5744b6(0x17e)],'repairCommand':REPAIR_COMMAND};if(_0x515362[_0x5744b6(0x194)]===_0x5744b6(0x16f))return{'state':_0x5744b6(0x16f),'packageVersion':_0x404795['packageVersion'],'reason':_0x515362[_0x5744b6(0x180)],'repairCommand':REPAIR_COMMAND};try{const _0x1695a7=frontmatterValue(readFileSync(join(_0x515362[_0x5744b6(0x172)],'SKILL.md'),'utf8'),_0x5744b6(0x18f));if(_0x1695a7!==_0x404795['skillVersion'])return{'state':_0x5744b6(0x186),'packageVersion':_0x404795[_0x5744b6(0x17e)],'skillVersion':_0x1695a7,'installedPath':_0x515362[_0x5744b6(0x172)],'repairCommand':REPAIR_COMMAND};const _0x37de75=listFiles(_0x515362[_0x5744b6(0x172)]),_0x2d6b71=digestFiles(_0x515362[_0x5744b6(0x172)],_0x37de75);return{'state':sameFiles(_0x37de75,_0x404795[_0x5744b6(0x18e)][_0x5744b6(0x18d)])&&_0x2d6b71===_0x404795['manifest'][_0x5744b6(0x188)]?_0x5744b6(0x169):'content_mismatch','packageVersion':_0x404795[_0x5744b6(0x17e)],'skillVersion':_0x1695a7,'installedPath':_0x515362[_0x5744b6(0x172)],'digest':_0x2d6b71,'repairCommand':REPAIR_COMMAND};}catch(_0x4ac6aa){return{'state':'unverifiable','packageVersion':_0x404795['packageVersion'],'installedPath':_0x515362['path'],'reason':_0x4ac6aa instanceof Error?_0x4ac6aa['message']:String(_0x4ac6aa),'repairCommand':REPAIR_COMMAND};}}function a135_0x275b(){const _0x1c0a52=['path','1lcDkBK','flatMap','2925862VEwZyK','pipe','SKILL.md','update','match','startsWith','sort','1617205oBhjjJ','lovrabet\x20cli-skill\x20install','packageVersion','includes','reason','839468hvSMpD','parse','SOURCE_INVALID','present','missing','version_mismatch','message','digest','trim','Symbolic\x20link\x20is\x20not\x20allowed:\x20','lovrabet.manifest.json','absent','files','manifest','version','length','package.json','12omgddv','root','state',':\x5cs*(.+)$','16281585jZDwfr','skills','Unsafe\x20manifest\x20path:\x20','skills@latest\x20exited\x20','Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest','16FBMUmM','488292cHgrvz','schemaVersion','17068940VuTDHg','name','98631UmHgXQ','installedPath','Installed\x20Skill\x20state\x20is\x20','hex','isSymbolicLink','status','lovrabet','utf8','VERIFY_FAILED','home','every','packageRoot','current','skipped','skillVersion','stdio','isDirectory','join','unverifiable','unknown','split'];a135_0x275b=function(){return _0x1c0a52;};return a135_0x275b();}function failure(_0x1a432d,_0x421b1f,_0x120fe7,_0x1f0c08){const _0x2a5f1b=a135_0x3c9c02;return{'ok':![],'code':_0x1a432d,'packageVersion':_0x421b1f[_0x2a5f1b(0x17e)],'skillVersion':_0x421b1f['skillVersion'],'installedPath':_0x1f0c08,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x120fe7 instanceof Error?_0x120fe7[_0x2a5f1b(0x187)]:String(_0x120fe7)};}export function installBuiltinSkill(_0x32fb80={}){const _0x261acf=a135_0x3c9c02,_0x522561=_0x32fb80['packageRoot']??DEFAULT_PACKAGE_ROOT,_0x1a63ee=_0x32fb80['home']??homedir();let _0x152229;try{_0x152229=readSource(_0x522561);}catch(_0x42a234){return failure(_0x261acf(0x183),{'packageVersion':_0x261acf(0x170),'skillVersion':_0x261acf(0x170)},_0x42a234);}const _0x966eee=inspectBuiltinSkill({'packageRoot':_0x522561,'home':_0x1a63ee}),_0x2b41f3=runNpxSkillsAddGlobal(_0x522561,_0x152229[_0x261acf(0x193)],{'stdio':_0x32fb80[_0x261acf(0x16c)]??_0x261acf(0x176),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x1a63ee}});if(_0x2b41f3[_0x261acf(0x16a)])return{'ok':!![],'packageVersion':_0x152229['packageVersion'],'skillVersion':_0x152229[_0x261acf(0x16b)],'installedPath':_0x966eee['installedPath'],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x2b41f3['ok'])return failure('INSTALL_FAILED',_0x152229,_0x2b41f3['error']??_0x261acf(0x199)+_0x2b41f3[_0x261acf(0x162)]);const _0x1176af=inspectBuiltinSkill({'packageRoot':_0x522561,'home':_0x1a63ee});if(_0x1176af[_0x261acf(0x194)]!=='current')return failure(_0x261acf(0x165),_0x152229,_0x1176af[_0x261acf(0x180)]??_0x261acf(0x15f)+_0x1176af[_0x261acf(0x194)],_0x1176af[_0x261acf(0x15e)]);return{'ok':!![],'packageVersion':_0x152229['packageVersion'],'skillVersion':_0x152229[_0x261acf(0x16b)],'installedPath':_0x1176af[_0x261acf(0x15e)],'changed':_0x966eee[_0x261acf(0x194)]!==_0x261acf(0x169),'repairCommand':REPAIR_COMMAND};}
1
+ const a135_0x4681f0=a135_0x2419;(function(_0x5632b3,_0x492890){const _0x2f5ca5=a135_0x2419,_0x47ca37=_0x5632b3();while(!![]){try{const _0x4b7f40=parseInt(_0x2f5ca5(0x1bb))/0x1+parseInt(_0x2f5ca5(0x1e7))/0x2*(parseInt(_0x2f5ca5(0x1ab))/0x3)+-parseInt(_0x2f5ca5(0x1d9))/0x4*(parseInt(_0x2f5ca5(0x1dd))/0x5)+-parseInt(_0x2f5ca5(0x1ce))/0x6*(-parseInt(_0x2f5ca5(0x1bd))/0x7)+parseInt(_0x2f5ca5(0x1d4))/0x8+-parseInt(_0x2f5ca5(0x1d2))/0x9*(parseInt(_0x2f5ca5(0x1db))/0xa)+-parseInt(_0x2f5ca5(0x1b6))/0xb;if(_0x4b7f40===_0x492890)break;else _0x47ca37['push'](_0x47ca37['shift']());}catch(_0x24716b){_0x47ca37['push'](_0x47ca37['shift']());}}}(a135_0xaa48,0x723da));import{createHash}from'node:crypto';function a135_0xaa48(){const _0x1711cd=['split','887097BKGJwX','pipe','1066716fBXzqe','utf8','message','Unsafe\x20manifest\x20path:\x20','files','lovrabet','skills@latest\x20exited\x20','skipped','installedPath','Installed\x20Skill\x20state\x20is\x20','content_mismatch','isSymbolicLink','home','root','reason','update','path','12WdJXUV','version','INSTALL_FAILED','hex','153JZbJrf','skills','218192OuksKA','sha256','packageRoot','error','absent','2260CcRLjj','present','17860ksYmuX','isDirectory','1730disUxf','unverifiable','length','missing','packageVersion','package.json','version_mismatch','stdio','name','skillVersion','9572SSrvip','schemaVersion','SKILL.md','isFile','state','digest','15SabGzW','flatMap','current','includes','manifest','join','match','startsWith','lovrabet.manifest.json','unknown','Unsupported\x20Skill\x20entry:\x20','6042245DgFvmZ','SOURCE_INVALID','sort','parse'];a135_0xaa48=function(){return _0x1711cd;};return a135_0xaa48();}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';function a135_0x2419(_0x380c36,_0x4e240a){_0x380c36=_0x380c36-0x1a8;const _0xaa48ee=a135_0xaa48();let _0x241946=_0xaa48ee[_0x380c36];return _0x241946;}const DEFAULT_PACKAGE_ROOT=resolve(dirname(fileURLToPath(import.meta.url)),'..','..'),REPAIR_COMMAND='lovrabet\x20cli-skill\x20install',SKILL_NAME=a135_0x4681f0(0x1c2);function frontmatterValue(_0x29709d,_0x1ac62a){const _0x419207=a135_0x4681f0;return _0x29709d[_0x419207(0x1b1)](new RegExp('^'+_0x1ac62a+':\x5cs*(.+)$','m'))?.[0x1]?.['trim']()??'';}function listFiles(_0x5a868f,_0x3e607a=_0x5a868f){const _0x44ed84=a135_0x4681f0;return readdirSync(_0x3e607a,{'withFileTypes':!![]})[_0x44ed84(0x1ac)](_0x11f193=>{const _0x4bd59c=_0x44ed84,_0xff07df=join(_0x3e607a,_0x11f193[_0x4bd59c(0x1e5)]),_0x5922e3=lstatSync(_0xff07df);if(_0x5922e3[_0x4bd59c(0x1c8)]())throw new Error('Symbolic\x20link\x20is\x20not\x20allowed:\x20'+_0xff07df);if(_0x5922e3[_0x4bd59c(0x1dc)]())return listFiles(_0x5a868f,_0xff07df);if(!_0x5922e3[_0x4bd59c(0x1a8)]())throw new Error(_0x4bd59c(0x1b5)+_0xff07df);return[relative(_0x5a868f,_0xff07df)[_0x4bd59c(0x1ba)](sep)[_0x4bd59c(0x1b0)]('/')];})[_0x44ed84(0x1b8)]((_0x189b13,_0x5ca92b)=>_0x189b13<_0x5ca92b?-0x1:_0x189b13>_0x5ca92b?0x1:0x0);}function digestFiles(_0x1926e6,_0x5789d1){const _0x1d44e1=a135_0x4681f0,_0x393968=createHash(_0x1d44e1(0x1d5));for(const _0x11079c of _0x5789d1){if(_0x11079c[_0x1d44e1(0x1b2)]('/')||_0x11079c[_0x1d44e1(0x1ba)]('/')[_0x1d44e1(0x1ae)]('..')||_0x11079c['includes']('\x5c'))throw new Error(_0x1d44e1(0x1c0)+_0x11079c);_0x393968['update'](_0x11079c),_0x393968[_0x1d44e1(0x1cc)]('\x00'),_0x393968['update'](readFileSync(join(_0x1926e6,..._0x11079c[_0x1d44e1(0x1ba)]('/')))),_0x393968['update']('\x00');}return _0x393968[_0x1d44e1(0x1aa)](_0x1d44e1(0x1d1));}function sameFiles(_0x1830f5,_0x82beb9){const _0x58088e=a135_0x4681f0;return _0x1830f5['length']===_0x82beb9[_0x58088e(0x1df)]&&_0x1830f5['every']((_0x2e24f3,_0x346a27)=>_0x2e24f3===_0x82beb9[_0x346a27]);}function readSource(_0x48e8f5){const _0xe0162e=a135_0x4681f0,_0x3b2fad=JSON[_0xe0162e(0x1b9)](readFileSync(join(_0x48e8f5,_0xe0162e(0x1e2)),_0xe0162e(0x1be))),_0x4c276f=JSON[_0xe0162e(0x1b9)](readFileSync(join(_0x48e8f5,_0xe0162e(0x1d3),_0xe0162e(0x1b3)),_0xe0162e(0x1be))),_0x38ba23=join(_0x48e8f5,_0xe0162e(0x1d3),SKILL_NAME),_0x2c1748=frontmatterValue(readFileSync(join(_0x38ba23,'SKILL.md'),'utf8'),_0xe0162e(0x1cf)),_0x1754a9=listFiles(_0x38ba23);if(_0x4c276f[_0xe0162e(0x1e8)]!==0x1||_0x4c276f[_0xe0162e(0x1e5)]!==SKILL_NAME||!_0x3b2fad['version']||_0x4c276f['packageVersion']!==_0x3b2fad[_0xe0162e(0x1cf)]||_0x4c276f[_0xe0162e(0x1e6)]!==_0x3b2fad[_0xe0162e(0x1cf)]||_0x2c1748!==_0x3b2fad[_0xe0162e(0x1cf)]||!sameFiles(_0x1754a9,_0x4c276f[_0xe0162e(0x1c1)])||digestFiles(_0x38ba23,_0x1754a9)!==_0x4c276f['digest'])throw new Error('Built-in\x20Skill\x20source\x20does\x20not\x20match\x20its\x20package\x20manifest');return{'packageVersion':_0x3b2fad[_0xe0162e(0x1cf)],'skillVersion':_0x2c1748,'root':_0x38ba23,'manifest':_0x4c276f};}function installedSkillPath(_0x5de4ba){const _0x737921=a135_0x4681f0,_0x5376e0=resolveInstalledSkill(SKILL_NAME,{'home':_0x5de4ba});if(_0x5376e0['state']===_0x737921(0x1da))return{'state':_0x737921(0x1da),'path':dirname(_0x5376e0[_0x737921(0x1cd)])};if(_0x5376e0[_0x737921(0x1a9)]===_0x737921(0x1d8))return{'state':_0x737921(0x1e0)};return{'state':_0x737921(0x1de),'reason':_0x5376e0['reason']};}export function inspectInstalledBuiltinSkillVersion(_0x39a38f,_0x2d052d={}){const _0x330334=a135_0x4681f0,_0x4671de=installedSkillPath(_0x2d052d[_0x330334(0x1c9)]??homedir());if(_0x4671de[_0x330334(0x1a9)]===_0x330334(0x1e0))return{'state':_0x330334(0x1e0),'expectedVersion':_0x39a38f,'repairCommand':REPAIR_COMMAND};if(_0x4671de[_0x330334(0x1a9)]===_0x330334(0x1de))return{'state':_0x330334(0x1de),'expectedVersion':_0x39a38f,'reason':_0x4671de[_0x330334(0x1cb)],'repairCommand':REPAIR_COMMAND};try{const _0x5a4c65=frontmatterValue(readFileSync(join(_0x4671de['path'],_0x330334(0x1e9)),_0x330334(0x1be)),_0x330334(0x1cf));return{'state':_0x5a4c65===_0x39a38f?_0x330334(0x1ad):'version_mismatch','expectedVersion':_0x39a38f,'skillVersion':_0x5a4c65,'installedPath':_0x4671de[_0x330334(0x1cd)],'repairCommand':REPAIR_COMMAND};}catch(_0x36c18e){return{'state':'unverifiable','expectedVersion':_0x39a38f,'installedPath':_0x4671de[_0x330334(0x1cd)],'reason':_0x36c18e instanceof Error?_0x36c18e[_0x330334(0x1bf)]:String(_0x36c18e),'repairCommand':REPAIR_COMMAND};}}export function inspectBuiltinSkill(_0x4bbbd6={}){const _0x4ab2d1=a135_0x4681f0,_0xb1dbb7=_0x4bbbd6[_0x4ab2d1(0x1d6)]??DEFAULT_PACKAGE_ROOT;let _0xbba8ef;try{_0xbba8ef=readSource(_0xb1dbb7);}catch(_0x3084ae){return{'state':_0x4ab2d1(0x1de),'packageVersion':_0x4ab2d1(0x1b4),'reason':_0x3084ae instanceof Error?_0x3084ae[_0x4ab2d1(0x1bf)]:String(_0x3084ae),'repairCommand':REPAIR_COMMAND};}const _0x158b80=installedSkillPath(_0x4bbbd6[_0x4ab2d1(0x1c9)]??homedir());if(_0x158b80[_0x4ab2d1(0x1a9)]===_0x4ab2d1(0x1e0))return{'state':_0x4ab2d1(0x1e0),'packageVersion':_0xbba8ef['packageVersion'],'repairCommand':REPAIR_COMMAND};if(_0x158b80[_0x4ab2d1(0x1a9)]===_0x4ab2d1(0x1de))return{'state':_0x4ab2d1(0x1de),'packageVersion':_0xbba8ef[_0x4ab2d1(0x1e1)],'reason':_0x158b80[_0x4ab2d1(0x1cb)],'repairCommand':REPAIR_COMMAND};try{const _0x546f78=frontmatterValue(readFileSync(join(_0x158b80['path'],_0x4ab2d1(0x1e9)),'utf8'),_0x4ab2d1(0x1cf));if(_0x546f78!==_0xbba8ef[_0x4ab2d1(0x1e6)])return{'state':_0x4ab2d1(0x1e3),'packageVersion':_0xbba8ef[_0x4ab2d1(0x1e1)],'skillVersion':_0x546f78,'installedPath':_0x158b80['path'],'repairCommand':REPAIR_COMMAND};const _0x36370c=listFiles(_0x158b80[_0x4ab2d1(0x1cd)]),_0x342c09=digestFiles(_0x158b80['path'],_0x36370c);return{'state':sameFiles(_0x36370c,_0xbba8ef[_0x4ab2d1(0x1af)][_0x4ab2d1(0x1c1)])&&_0x342c09===_0xbba8ef[_0x4ab2d1(0x1af)][_0x4ab2d1(0x1aa)]?_0x4ab2d1(0x1ad):_0x4ab2d1(0x1c7),'packageVersion':_0xbba8ef[_0x4ab2d1(0x1e1)],'skillVersion':_0x546f78,'installedPath':_0x158b80['path'],'digest':_0x342c09,'repairCommand':REPAIR_COMMAND};}catch(_0x1c9195){return{'state':_0x4ab2d1(0x1de),'packageVersion':_0xbba8ef[_0x4ab2d1(0x1e1)],'installedPath':_0x158b80['path'],'reason':_0x1c9195 instanceof Error?_0x1c9195[_0x4ab2d1(0x1bf)]:String(_0x1c9195),'repairCommand':REPAIR_COMMAND};}}function failure(_0x7a1034,_0x333e6e,_0x4b01f3,_0x15aca2){const _0x5bc56d=a135_0x4681f0;return{'ok':![],'code':_0x7a1034,'packageVersion':_0x333e6e[_0x5bc56d(0x1e1)],'skillVersion':_0x333e6e['skillVersion'],'installedPath':_0x15aca2,'changed':![],'repairCommand':REPAIR_COMMAND,'error':_0x4b01f3 instanceof Error?_0x4b01f3['message']:String(_0x4b01f3)};}export function installBuiltinSkill(_0x53c19f={}){const _0x51d977=a135_0x4681f0,_0x40fe09=_0x53c19f[_0x51d977(0x1d6)]??DEFAULT_PACKAGE_ROOT,_0x4de076=_0x53c19f['home']??homedir();let _0x2500b3;try{_0x2500b3=readSource(_0x40fe09);}catch(_0x41066a){return failure(_0x51d977(0x1b7),{'packageVersion':_0x51d977(0x1b4),'skillVersion':'unknown'},_0x41066a);}const _0x550b6c=inspectBuiltinSkill({'packageRoot':_0x40fe09,'home':_0x4de076}),_0x5dc269=runNpxSkillsAddGlobal(_0x40fe09,_0x2500b3[_0x51d977(0x1ca)],{'stdio':_0x53c19f[_0x51d977(0x1e4)]??_0x51d977(0x1bc),'expectedSkillName':SKILL_NAME,'presence':{'home':_0x4de076}});if(_0x5dc269[_0x51d977(0x1c4)])return{'ok':!![],'packageVersion':_0x2500b3[_0x51d977(0x1e1)],'skillVersion':_0x2500b3[_0x51d977(0x1e6)],'installedPath':_0x550b6c[_0x51d977(0x1c5)],'changed':![],'repairCommand':REPAIR_COMMAND};if(!_0x5dc269['ok'])return failure(_0x51d977(0x1d0),_0x2500b3,_0x5dc269[_0x51d977(0x1d7)]??_0x51d977(0x1c3)+_0x5dc269['status']);const _0xdd1fab=inspectBuiltinSkill({'packageRoot':_0x40fe09,'home':_0x4de076});if(_0xdd1fab[_0x51d977(0x1a9)]!==_0x51d977(0x1ad))return failure('VERIFY_FAILED',_0x2500b3,_0xdd1fab['reason']??_0x51d977(0x1c6)+_0xdd1fab[_0x51d977(0x1a9)],_0xdd1fab[_0x51d977(0x1c5)]);return{'ok':!![],'packageVersion':_0x2500b3[_0x51d977(0x1e1)],'skillVersion':_0x2500b3[_0x51d977(0x1e6)],'installedPath':_0xdd1fab['installedPath'],'changed':_0x550b6c[_0x51d977(0x1a9)]!==_0x51d977(0x1ad),'repairCommand':REPAIR_COMMAND};}
@@ -1 +1 @@
1
- const a136_0x2c1521=a136_0x1648;function a136_0x1648(_0x22c174,_0x4ccec8){_0x22c174=_0x22c174-0x15a;const _0x4d158e=a136_0x4d15();let _0x164826=_0x4d158e[_0x22c174];return _0x164826;}(function(_0x8214f7,_0x21fee8){const _0x36c17a=a136_0x1648,_0x36f577=_0x8214f7();while(!![]){try{const _0x3cda94=-parseInt(_0x36c17a(0x179))/0x1*(parseInt(_0x36c17a(0x15d))/0x2)+parseInt(_0x36c17a(0x15c))/0x3+-parseInt(_0x36c17a(0x178))/0x4*(-parseInt(_0x36c17a(0x170))/0x5)+parseInt(_0x36c17a(0x15e))/0x6+-parseInt(_0x36c17a(0x18a))/0x7+parseInt(_0x36c17a(0x176))/0x8+parseInt(_0x36c17a(0x15a))/0x9*(-parseInt(_0x36c17a(0x181))/0xa);if(_0x3cda94===_0x21fee8)break;else _0x36f577['push'](_0x36f577['shift']());}catch(_0x55f0e7){_0x36f577['push'](_0x36f577['shift']());}}}(a136_0x4d15,0xe6825));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a136_0x44a9d2}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a136_0x44a9d2;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a136_0x2c1521(0x17b)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a136_0x2c1521(0x173)];export function resolveGlobalSkillName(_0x5890d2){const _0x3fad1f=a136_0x2c1521;switch(_0x5890d2[_0x3fad1f(0x191)]()){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[a136_0x2c1521(0x167)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function failure(_0x4c5e43,_0x33b3c0,_0x31d19f){return{'ok':![],'status':_0x33b3c0,'code':_0x4c5e43,'error':'['+_0x4c5e43+']\x20'+_0x31d19f};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}function a136_0x4d15(){const _0x953ea7=['EACCES','1693570AvDKXO','pipe','code','npm_config_global','status','NPM_CONFIG_GLOBAL','error','message','reason','9910145mCBYVZ','\x22\x20install\x20state:\x20','skills@latest','CHILD_TERMINATED','presence','expectedSkillName','Installer\x20reported\x20','trim','SPAWN_FAILED','9cqvdZJ','join','4624932TUDlsa','577358SClbcw','4119858YQSpEx','filter','\x20failed\x20target(s)','\x22\x20not\x20found\x20after\x20install\x20(checked\x20','Skill\x20\x22','match','signal','npx\x20terminated\x20by\x20signal\x20','ENOENT','skipNpxSkillsEnvSuffix','!\x20Could\x20not\x20verify\x20\x22','log','toString','stderr','stdio','present','stdout','EPERM','670Voywyo','unverifiable','exit\x20','globalSkillName','absent','NPX_NOT_FOUND','12667448mJrTIt','state','4804aipgQd','5zjieSk','SKILL_NOT_INSTALLED','internalSkillSource','warn','unknown','PERMISSION_DENIED','CHILD_EXIT_NONZERO'];a136_0x4d15=function(){return _0x953ea7;};return a136_0x4d15();}export function runNpxSkillsAddGlobal(_0x3c2b56,_0x3a0c40=LOVRABET_SKILL_SOURCE,_0x3c4a36){const _0x18eb9d=a136_0x2c1521;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x440b7c=resolveNpmBin('npx'),_0x1d0984=['-y',_0x18eb9d(0x18c),'add',_0x3a0c40,'-g','-y'],_0x361b01=[_0x440b7c,..._0x1d0984]['join']('\x20');console['log']('*\x20'+_0x361b01);const _0x307060={...process.env};delete _0x307060[_0x18eb9d(0x184)],delete _0x307060[_0x18eb9d(0x186)];const _0x2a21da=spawnSync(_0x440b7c,_0x1d0984,{'cwd':_0x3c2b56,'stdio':_0x18eb9d(0x182),'env':_0x307060,'shell':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x38a121=[_0x2a21da['stdout']?_0x2a21da[_0x18eb9d(0x16e)]['toString']():'',_0x2a21da[_0x18eb9d(0x16b)]?_0x2a21da[_0x18eb9d(0x16b)][_0x18eb9d(0x16a)]():''][_0x18eb9d(0x15f)](Boolean)[_0x18eb9d(0x15b)]('\x0a')[_0x18eb9d(0x191)]();_0x3c4a36?.[_0x18eb9d(0x16c)]!==_0x18eb9d(0x182)&&_0x38a121&&console[_0x18eb9d(0x169)](_0x38a121);if(_0x2a21da[_0x18eb9d(0x187)]){const _0x33678d=_0x2a21da[_0x18eb9d(0x187)],_0x2da506=_0x33678d[_0x18eb9d(0x183)]===_0x18eb9d(0x166)?_0x18eb9d(0x175):_0x33678d[_0x18eb9d(0x183)]===_0x18eb9d(0x16f)||_0x33678d['code']===_0x18eb9d(0x180)?_0x18eb9d(0x17e):_0x18eb9d(0x192);return failure(_0x2da506,_0x2a21da[_0x18eb9d(0x185)],_0x33678d[_0x18eb9d(0x188)]);}if(_0x2a21da['signal'])return failure(_0x18eb9d(0x18d),_0x2a21da[_0x18eb9d(0x185)],_0x18eb9d(0x165)+_0x2a21da[_0x18eb9d(0x164)]);if(_0x2a21da['status']!==0x0)return failure(_0x18eb9d(0x17f),_0x2a21da[_0x18eb9d(0x185)],_0x38a121||_0x18eb9d(0x172)+(_0x2a21da[_0x18eb9d(0x185)]??_0x18eb9d(0x17d)));const _0x392f52=_0x3c4a36?.[_0x18eb9d(0x18f)]??resolveGlobalSkillName(_0x3a0c40),_0x3b280f=_0x392f52?resolveInstalledSkill(_0x392f52,_0x3c4a36?.[_0x18eb9d(0x18e)]):undefined,_0x5278c3=_0x38a121[_0x18eb9d(0x163)](/Failed to install\s+(\d+)/i);if(_0x5278c3&&Number(_0x5278c3[0x1])>0x0){const _0x1a6626=_0x18eb9d(0x190)+_0x5278c3[0x1]+_0x18eb9d(0x160)+(_0x38a121?':\x0a'+_0x38a121:'');if(_0x3b280f?.[_0x18eb9d(0x177)]===_0x18eb9d(0x16d))return console[_0x18eb9d(0x17c)]('!\x20'+_0x1a6626),{'ok':!![],'status':0x0};return failure('INSTALL_PARTIAL',0x0,_0x1a6626);}if(_0x392f52&&_0x3b280f){if(_0x3b280f[_0x18eb9d(0x177)]===_0x18eb9d(0x174))return failure(_0x18eb9d(0x17a),0x0,_0x18eb9d(0x162)+_0x392f52+_0x18eb9d(0x161)+_0x3b280f['checked'][_0x18eb9d(0x15b)](',\x20')+')');_0x3b280f[_0x18eb9d(0x177)]===_0x18eb9d(0x171)&&console[_0x18eb9d(0x17c)](_0x18eb9d(0x168)+_0x392f52+_0x18eb9d(0x18b)+_0x3b280f[_0x18eb9d(0x189)]);}return{'ok':!![],'status':0x0};}
1
+ const a136_0x521a15=a136_0x11e0;function a136_0x11e0(_0x1d4e1d,_0x399afd){_0x1d4e1d=_0x1d4e1d-0x127;const _0x25c9be=a136_0x25c9();let _0x11e043=_0x25c9be[_0x1d4e1d];return _0x11e043;}(function(_0x18f881,_0x40ef2){const _0x51d52d=a136_0x11e0,_0x456a7c=_0x18f881();while(!![]){try{const _0x2a3092=parseInt(_0x51d52d(0x12f))/0x1+parseInt(_0x51d52d(0x12a))/0x2*(-parseInt(_0x51d52d(0x12d))/0x3)+-parseInt(_0x51d52d(0x14e))/0x4+parseInt(_0x51d52d(0x129))/0x5*(-parseInt(_0x51d52d(0x128))/0x6)+parseInt(_0x51d52d(0x139))/0x7*(parseInt(_0x51d52d(0x14d))/0x8)+parseInt(_0x51d52d(0x148))/0x9*(-parseInt(_0x51d52d(0x14a))/0xa)+-parseInt(_0x51d52d(0x147))/0xb*(-parseInt(_0x51d52d(0x13a))/0xc);if(_0x2a3092===_0x40ef2)break;else _0x456a7c['push'](_0x456a7c['shift']());}catch(_0x21a4ca){_0x456a7c['push'](_0x456a7c['shift']());}}}(a136_0x25c9,0x9925e));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a136_0x337327}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a136_0x337327;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a136_0x521a15(0x13b)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a136_0x521a15(0x157)];export function resolveGlobalSkillName(_0x4ab3e5){const _0x3d532a=a136_0x521a15;switch(_0x4ab3e5[_0x3d532a(0x158)]()){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[a136_0x521a15(0x142)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function a136_0x25c9(){const _0x2d6e16=['error','SKILL_NOT_INSTALLED','PERMISSION_DENIED','INSTALL_PARTIAL','absent','warn','SPAWN_FAILED','presence','\x22\x20install\x20state:\x20','48517GXPbJq','322524prMGep','internalSkillSource','pipe','exit\x20','signal','unverifiable','checked','state','skipNpxSkillsEnvSuffix','present','\x20failed\x20target(s)','ENOENT','NPX_NOT_FOUND','1056AzFdZd','9hacLZO','status','10763360HrDhSN','expectedSkillName','toString','400XRiTkf','2492608Wgfynm','skills@latest','code','log','join','filter','CHILD_TERMINATED','unknown','!\x20Could\x20not\x20verify\x20\x22','globalSkillName','trim','NPM_CONFIG_GLOBAL','12smezYt','2092235BaEWrh','6vACvOs','CHILD_EXIT_NONZERO','reason','762069VPvTnn','match','999003BRpyTn'];a136_0x25c9=function(){return _0x2d6e16;};return a136_0x25c9();}function failure(_0x14126c,_0x4386dd,_0x4c385b){return{'ok':![],'status':_0x4386dd,'code':_0x14126c,'error':'['+_0x14126c+']\x20'+_0x4c385b};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x243489,_0xbb5ec6=LOVRABET_SKILL_SOURCE,_0x2cfdae){const _0x2cca1d=a136_0x521a15;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x2a9a7a=resolveNpmBin('npx'),_0x544c55=['-y',_0x2cca1d(0x14f),'add',_0xbb5ec6,'-g','-y'],_0xd9ace9=[_0x2a9a7a,..._0x544c55][_0x2cca1d(0x152)]('\x20');console['log']('*\x20'+_0xd9ace9);const _0x528dd5={...process.env};delete _0x528dd5['npm_config_global'],delete _0x528dd5[_0x2cca1d(0x127)];const _0x2fedb5=spawnSync(_0x2a9a7a,_0x544c55,{'cwd':_0x243489,'stdio':_0x2cca1d(0x13c),'env':_0x528dd5,'shell':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x2a083b=[_0x2fedb5['stdout']?_0x2fedb5['stdout'][_0x2cca1d(0x14c)]():'',_0x2fedb5['stderr']?_0x2fedb5['stderr']['toString']():''][_0x2cca1d(0x153)](Boolean)[_0x2cca1d(0x152)]('\x0a')[_0x2cca1d(0x158)]();_0x2cfdae?.['stdio']!==_0x2cca1d(0x13c)&&_0x2a083b&&console[_0x2cca1d(0x151)](_0x2a083b);if(_0x2fedb5['error']){const _0x2158b7=_0x2fedb5[_0x2cca1d(0x130)],_0x2e43bb=_0x2158b7[_0x2cca1d(0x150)]===_0x2cca1d(0x145)?_0x2cca1d(0x146):_0x2158b7[_0x2cca1d(0x150)]==='EPERM'||_0x2158b7[_0x2cca1d(0x150)]==='EACCES'?_0x2cca1d(0x132):_0x2cca1d(0x136);return failure(_0x2e43bb,_0x2fedb5[_0x2cca1d(0x149)],_0x2158b7['message']);}if(_0x2fedb5['signal'])return failure(_0x2cca1d(0x154),_0x2fedb5['status'],'npx\x20terminated\x20by\x20signal\x20'+_0x2fedb5[_0x2cca1d(0x13e)]);if(_0x2fedb5[_0x2cca1d(0x149)]!==0x0)return failure(_0x2cca1d(0x12b),_0x2fedb5[_0x2cca1d(0x149)],_0x2a083b||_0x2cca1d(0x13d)+(_0x2fedb5[_0x2cca1d(0x149)]??_0x2cca1d(0x155)));const _0x348b92=_0x2cfdae?.[_0x2cca1d(0x14b)]??resolveGlobalSkillName(_0xbb5ec6),_0x5986cd=_0x348b92?resolveInstalledSkill(_0x348b92,_0x2cfdae?.[_0x2cca1d(0x137)]):undefined,_0x47966a=_0x2a083b[_0x2cca1d(0x12e)](/Failed to install\s+(\d+)/i);if(_0x47966a&&Number(_0x47966a[0x1])>0x0){const _0xfaee4a='Installer\x20reported\x20'+_0x47966a[0x1]+_0x2cca1d(0x144)+(_0x2a083b?':\x0a'+_0x2a083b:'');if(_0x5986cd?.['state']===_0x2cca1d(0x143))return console[_0x2cca1d(0x135)]('!\x20'+_0xfaee4a),{'ok':!![],'status':0x0};return failure(_0x2cca1d(0x133),0x0,_0xfaee4a);}if(_0x348b92&&_0x5986cd){if(_0x5986cd['state']===_0x2cca1d(0x134))return failure(_0x2cca1d(0x131),0x0,'Skill\x20\x22'+_0x348b92+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0x5986cd[_0x2cca1d(0x140)][_0x2cca1d(0x152)](',\x20')+')');_0x5986cd[_0x2cca1d(0x141)]===_0x2cca1d(0x13f)&&console[_0x2cca1d(0x135)](_0x2cca1d(0x156)+_0x348b92+_0x2cca1d(0x138)+_0x5986cd[_0x2cca1d(0x12c)]);}return{'ok':!![],'status':0x0};}
@@ -1 +1 @@
1
- const a137_0x3dd627=a137_0x3c9e;(function(_0x18aef6,_0x28b84a){const _0x607b70=a137_0x3c9e,_0x2b2f17=_0x18aef6();while(!![]){try{const _0x583485=parseInt(_0x607b70(0x172))/0x1*(parseInt(_0x607b70(0x173))/0x2)+-parseInt(_0x607b70(0x170))/0x3+parseInt(_0x607b70(0x16f))/0x4+parseInt(_0x607b70(0x174))/0x5+-parseInt(_0x607b70(0x171))/0x6+-parseInt(_0x607b70(0x179))/0x7+parseInt(_0x607b70(0x169))/0x8;if(_0x583485===_0x28b84a)break;else _0x2b2f17['push'](_0x2b2f17['shift']());}catch(_0x34ca5f){_0x2b2f17['push'](_0x2b2f17['shift']());}}}(a137_0x3791,0xa44c3));export const METADATA_FILE=a137_0x3dd627(0x175);export const SKILL_FILE=a137_0x3dd627(0x177);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);function a137_0x3c9e(_0x3ae9d3,_0x2f5938){_0x3ae9d3=_0x3ae9d3-0x169;const _0x3791bc=a137_0x3791();let _0x3c9e6b=_0x3791bc[_0x3ae9d3];return _0x3c9e6b;}function a137_0x3791(){const _0x175fd7=['2580584gzVAWP','975636BMgpoW','965124WezcSX','2TgfkHc','354988rObfJL','932050xIPgjs','lovrabet.skill.json','coverage','SKILL.md','.svn','1204028hUTFTF','1155912aSyRXP','.hg','dist','build','.next','.git'];a137_0x3791=function(){return _0x175fd7;};return a137_0x3791();}export const IGNORED_DIR_NAMES=new Set([a137_0x3dd627(0x16e),a137_0x3dd627(0x16a),a137_0x3dd627(0x178),'node_modules',a137_0x3dd627(0x16d),a137_0x3dd627(0x16b),a137_0x3dd627(0x16c),a137_0x3dd627(0x176),'.turbo','.cache']);
1
+ const a137_0x2d5142=a137_0x71e6;function a137_0x71e6(_0x493490,_0x5a9998){_0x493490=_0x493490-0x192;const _0x453c25=a137_0x453c();let _0x71e6b0=_0x453c25[_0x493490];return _0x71e6b0;}(function(_0x354a20,_0x5f7b8c){const _0x474b12=a137_0x71e6,_0x4bdc37=_0x354a20();while(!![]){try{const _0x1eadfd=parseInt(_0x474b12(0x1a0))/0x1*(-parseInt(_0x474b12(0x193))/0x2)+parseInt(_0x474b12(0x1a4))/0x3*(-parseInt(_0x474b12(0x199))/0x4)+-parseInt(_0x474b12(0x194))/0x5*(parseInt(_0x474b12(0x19e))/0x6)+parseInt(_0x474b12(0x195))/0x7+-parseInt(_0x474b12(0x19d))/0x8*(parseInt(_0x474b12(0x1a1))/0x9)+parseInt(_0x474b12(0x19b))/0xa*(-parseInt(_0x474b12(0x1a3))/0xb)+parseInt(_0x474b12(0x19c))/0xc*(parseInt(_0x474b12(0x1a7))/0xd);if(_0x1eadfd===_0x5f7b8c)break;else _0x4bdc37['push'](_0x4bdc37['shift']());}catch(_0x432441){_0x4bdc37['push'](_0x4bdc37['shift']());}}}(a137_0x453c,0x1c9a5));export const METADATA_FILE=a137_0x2d5142(0x196);export const SKILL_FILE=a137_0x2d5142(0x192);function a137_0x453c(){const _0x5dc020=['node_modules','1679dpDpHf','27KTTyDB','build','1455135LukssP','161358RpITHk','.hg','coverage','299JprmfZ','.cache','.DS_Store','SKILL.md','190UvqqEk','5fRsZBf','1116696RVlFee','lovrabet.skill.json','.next','.turbo','8hThAdu','.svn','10KzwqGe','244344uujAuw','76688kMsbYS','495462pgCJeL'];a137_0x453c=function(){return _0x5dc020;};return a137_0x453c();}export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a137_0x2d5142(0x1a9)]);export const IGNORED_DIR_NAMES=new Set(['.git',a137_0x2d5142(0x1a5),a137_0x2d5142(0x19a),a137_0x2d5142(0x19f),a137_0x2d5142(0x197),'dist',a137_0x2d5142(0x1a2),a137_0x2d5142(0x1a6),a137_0x2d5142(0x198),a137_0x2d5142(0x1a8)]);
@@ -1 +1 @@
1
- (function(_0x54015e,_0x5835e7){const _0x59b1b7=a138_0xdb88,_0x2cc61c=_0x54015e();while(!![]){try{const _0x2da0d2=parseInt(_0x59b1b7(0x124))/0x1+parseInt(_0x59b1b7(0x129))/0x2+parseInt(_0x59b1b7(0x121))/0x3+parseInt(_0x59b1b7(0x131))/0x4*(parseInt(_0x59b1b7(0x12f))/0x5)+parseInt(_0x59b1b7(0x12a))/0x6+-parseInt(_0x59b1b7(0x133))/0x7*(-parseInt(_0x59b1b7(0x130))/0x8)+-parseInt(_0x59b1b7(0x12b))/0x9;if(_0x2da0d2===_0x5835e7)break;else _0x2cc61c['push'](_0x2cc61c['shift']());}catch(_0xc91950){_0x2cc61c['push'](_0x2cc61c['shift']());}}}(a138_0xe936,0x20a49));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';function a138_0xe936(){const _0x343cd1=['endsWith','utf8','stringify','Unsafe\x20Skill\x20file\x20path:\x20','130238RgYduK','178584ipjQeY','3509127QJmwZO','validation','startsWith','.tmp','45ctLVql','54424uWxHje','20228npHJVo','from','133KSMJXi','382008pqEMVD','split','isSymbolicLink','126619ZKzjJl'];a138_0xe936=function(){return _0x343cd1;};return a138_0xe936();}import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x1e0a08,_0x510831){const _0x3f4718=a138_0xdb88,_0x4afbb8=normalizeSkillRelativePath(_0x510831),_0x304c06=realOrResolved(_0x1e0a08),_0x5f36d0=resolve(_0x304c06,..._0x4afbb8[_0x3f4718(0x122)]('/'));if(!isPathInside(_0x5f36d0,_0x304c06))throw CliErrors[_0x3f4718(0x12c)](_0x3f4718(0x128)+_0x510831);return ensureNoSymlinkInManagedPath(_0x304c06,_0x4afbb8),_0x5f36d0;}export function ensureNoSymlinkInManagedPath(_0x6f310f,_0x1f198b){const _0x1589ba=a138_0xdb88;let _0x45fc58=_0x6f310f;for(const _0x8dfdc of _0x1f198b[_0x1589ba(0x122)]('/')){_0x45fc58=resolve(_0x45fc58,_0x8dfdc);const _0x2aa83e=lstatIfPresent(_0x45fc58);if(_0x2aa83e?.[_0x1589ba(0x123)]())throw CliErrors[_0x1589ba(0x12c)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x1f198b);}}function a138_0xdb88(_0x12ffe6,_0x56ebbc){_0x12ffe6=_0x12ffe6-0x121;const _0xe936cf=a138_0xe936();let _0xdb8886=_0xe936cf[_0x12ffe6];return _0xdb8886;}export function isDanglingSymlink(_0x3fb705){try{return lstatSync(_0x3fb705)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x3c789b){const _0x1a8b06=readlinkSync(_0x3c789b);return isAbsolute(_0x1a8b06)?_0x1a8b06:resolve(dirname(_0x3c789b),_0x1a8b06);}export function isPathInside(_0x3a465a,_0x3a8154){const _0x3b4bfe=a138_0xdb88,_0x2b3116=_0x3a465a[_0x3b4bfe(0x125)](sep)?_0x3a465a:''+_0x3a465a+sep,_0x234b87=_0x3a8154[_0x3b4bfe(0x125)](sep)?_0x3a8154:''+_0x3a8154+sep;return _0x3a465a===_0x3a8154||_0x2b3116[_0x3b4bfe(0x12d)](_0x234b87);}export function realOrResolved(_0x3c6007){try{return realpathSync(_0x3c6007);}catch{return resolve(_0x3c6007);}}export function lstatIfPresent(_0x274828){try{return lstatSync(_0x274828);}catch{return undefined;}}export function writeTextAtomic(_0x3e5680,_0x4822bf,_0x5c42c9){const _0x1e5996=a138_0xdb88;writeBytesAtomic(_0x3e5680,Buffer[_0x1e5996(0x132)](_0x4822bf,_0x1e5996(0x126)),_0x5c42c9);}export function writeBytesAtomic(_0x2a5c2f,_0x2858ab,_0x4eebaa){const _0x113621=a138_0xdb88,_0x2c99de=_0x2a5c2f+_0x113621(0x12e);try{writeFileSync(_0x2c99de,_0x2858ab,{'mode':_0x4eebaa}),renameSync(_0x2c99de,_0x2a5c2f);}catch(_0x30cebb){try{rmSync(_0x2c99de,{'force':!![]});}catch{}throw _0x30cebb;}}export function writeJsonAtomic(_0x4613b3,_0xb789cc){const _0x354795=a138_0xdb88;writeTextAtomic(_0x4613b3,JSON[_0x354795(0x127)](_0xb789cc,null,0x2)+'\x0a',0x180);}
1
+ (function(_0x5e3a95,_0x144ca8){const _0x2a3451=a138_0x4705,_0x4cd8bb=_0x5e3a95();while(!![]){try{const _0x36d991=-parseInt(_0x2a3451(0xb4))/0x1*(-parseInt(_0x2a3451(0xb8))/0x2)+parseInt(_0x2a3451(0xbb))/0x3*(parseInt(_0x2a3451(0xc0))/0x4)+parseInt(_0x2a3451(0xb9))/0x5+-parseInt(_0x2a3451(0xbc))/0x6+parseInt(_0x2a3451(0xb2))/0x7+-parseInt(_0x2a3451(0xba))/0x8*(parseInt(_0x2a3451(0xb3))/0x9)+parseInt(_0x2a3451(0xb5))/0xa*(parseInt(_0x2a3451(0xb7))/0xb);if(_0x36d991===_0x144ca8)break;else _0x4cd8bb['push'](_0x4cd8bb['shift']());}catch(_0x4be8ab){_0x4cd8bb['push'](_0x4cd8bb['shift']());}}}(a138_0x363a,0x500be));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(_0xaec243,_0x5b0f83){const _0xe2a7e9=a138_0x4705,_0x2ecd6a=normalizeSkillRelativePath(_0x5b0f83),_0x225674=realOrResolved(_0xaec243),_0x56c33e=resolve(_0x225674,..._0x2ecd6a['split']('/'));if(!isPathInside(_0x56c33e,_0x225674))throw CliErrors[_0xe2a7e9(0xbe)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x5b0f83);return ensureNoSymlinkInManagedPath(_0x225674,_0x2ecd6a),_0x56c33e;}export function ensureNoSymlinkInManagedPath(_0x54e3f4,_0x519c36){const _0x7ec0fe=a138_0x4705;let _0x580dba=_0x54e3f4;for(const _0x35b81e of _0x519c36[_0x7ec0fe(0xc2)]('/')){_0x580dba=resolve(_0x580dba,_0x35b81e);const _0x45ea2d=lstatIfPresent(_0x580dba);if(_0x45ea2d?.[_0x7ec0fe(0xb6)]())throw CliErrors[_0x7ec0fe(0xbe)](_0x7ec0fe(0xb1)+_0x519c36);}}function a138_0x4705(_0x47a2e0,_0x3317a1){_0x47a2e0=_0x47a2e0-0xaf;const _0x363a8b=a138_0x363a();let _0x4705c9=_0x363a8b[_0x47a2e0];return _0x4705c9;}export function isDanglingSymlink(_0x24d080){const _0x391c44=a138_0x4705;try{return lstatSync(_0x24d080)[_0x391c44(0xb6)]();}catch{return![];}}export function resolveSymlinkTarget(_0x45ecd1){const _0x1471bc=readlinkSync(_0x45ecd1);return isAbsolute(_0x1471bc)?_0x1471bc:resolve(dirname(_0x45ecd1),_0x1471bc);}function a138_0x363a(){const _0x1e7b33=['5169274WIfzHY','898ydqruZ','7990EcEReV','184QPLpNb','60YoqHWz','2235582wWXJWS','stringify','validation','startsWith','8488OTjBhP','from','split','utf8','.tmp','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','465990tKEZrQ','22824UEZRsf','397oCQqrA','10wqEjOE','isSymbolicLink'];a138_0x363a=function(){return _0x1e7b33;};return a138_0x363a();}export function isPathInside(_0x1336c8,_0x2e979f){const _0x2dd635=a138_0x4705,_0x31a709=_0x1336c8['endsWith'](sep)?_0x1336c8:''+_0x1336c8+sep,_0x542d96=_0x2e979f['endsWith'](sep)?_0x2e979f:''+_0x2e979f+sep;return _0x1336c8===_0x2e979f||_0x31a709[_0x2dd635(0xbf)](_0x542d96);}export function realOrResolved(_0x3e024a){try{return realpathSync(_0x3e024a);}catch{return resolve(_0x3e024a);}}export function lstatIfPresent(_0x55882a){try{return lstatSync(_0x55882a);}catch{return undefined;}}export function writeTextAtomic(_0x338277,_0x4d7db5,_0x1284b9){const _0x4b71f2=a138_0x4705;writeBytesAtomic(_0x338277,Buffer[_0x4b71f2(0xc1)](_0x4d7db5,_0x4b71f2(0xaf)),_0x1284b9);}export function writeBytesAtomic(_0x139fe0,_0x2e6c6b,_0xa007e7){const _0x4fc7f2=a138_0x4705,_0x146a18=_0x139fe0+_0x4fc7f2(0xb0);try{writeFileSync(_0x146a18,_0x2e6c6b,{'mode':_0xa007e7}),renameSync(_0x146a18,_0x139fe0);}catch(_0xe2b1cc){try{rmSync(_0x146a18,{'force':!![]});}catch{}throw _0xe2b1cc;}}export function writeJsonAtomic(_0x3afb54,_0x521c7c){const _0x4650df=a138_0x4705;writeTextAtomic(_0x3afb54,JSON[_0x4650df(0xbd)](_0x521c7c,null,0x2)+'\x0a',0x180);}
@@ -1 +1 @@
1
- (function(_0x2d4341,_0x552f3f){const _0x12aa2b=a139_0x401f,_0xf9debf=_0x2d4341();while(!![]){try{const _0x1e5b0b=parseInt(_0x12aa2b(0x193))/0x1*(-parseInt(_0x12aa2b(0x196))/0x2)+-parseInt(_0x12aa2b(0x187))/0x3*(-parseInt(_0x12aa2b(0x191))/0x4)+-parseInt(_0x12aa2b(0x18e))/0x5*(-parseInt(_0x12aa2b(0x194))/0x6)+parseInt(_0x12aa2b(0x192))/0x7*(-parseInt(_0x12aa2b(0x188))/0x8)+-parseInt(_0x12aa2b(0x197))/0x9+parseInt(_0x12aa2b(0x190))/0xa*(-parseInt(_0x12aa2b(0x186))/0xb)+parseInt(_0x12aa2b(0x18c))/0xc*(parseInt(_0x12aa2b(0x18d))/0xd);if(_0x1e5b0b===_0x552f3f)break;else _0xf9debf['push'](_0xf9debf['shift']());}catch(_0x3f573c){_0xf9debf['push'](_0xf9debf['shift']());}}}(a139_0x27dc,0xdd336));function a139_0x401f(_0x57302d,_0x352dc5){_0x57302d=_0x57302d-0x186;const _0x27dc7c=a139_0x27dc();let _0x401f80=_0x27dc7c[_0x57302d];return _0x401f80;}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x43a4fb){const _0x5ac04a=a139_0x401f;return createHash(_0x5ac04a(0x18f))[_0x5ac04a(0x18a)](_0x43a4fb)[_0x5ac04a(0x189)](_0x5ac04a(0x18b));}export function fileHash(_0x5edbed){return bufferSha256(fileContent(_0x5edbed));}function a139_0x27dc(){const _0x1a3f10=['13keEZgb','116295nOJelT','sha256','90YnHOAT','5129076dUPdin','1841dMaAsY','1owCAgA','18JviLIb','path','2563846zaMZjk','9130365BJGhDu','1464903ugZwhz','3rVHJvk','28816toAmQP','digest','update','hex','47955396KIzFNa'];a139_0x27dc=function(){return _0x1a3f10;};return a139_0x27dc();}export function bufferSha256(_0x2e2d93){const _0x59cdb3=a139_0x401f;return createHash(_0x59cdb3(0x18f))[_0x59cdb3(0x18a)](_0x2e2d93)[_0x59cdb3(0x189)](_0x59cdb3(0x18b));}export function fileTreeHash(_0xe91a13){const _0x364db3=a139_0x401f,_0xf05132=createHash('sha256');for(const _0x4b667a of normalizeManifestFiles(_0xe91a13)){_0xf05132[_0x364db3(0x18a)](_0x4b667a[_0x364db3(0x195)]),_0xf05132[_0x364db3(0x18a)]('\x00'),_0xf05132[_0x364db3(0x18a)](_0x4b667a[_0x364db3(0x18f)]),_0xf05132[_0x364db3(0x18a)]('\x00'),_0xf05132[_0x364db3(0x18a)](String(_0x4b667a['size'])),_0xf05132['update']('\x00');}return _0xf05132['digest'](_0x364db3(0x18b));}
1
+ (function(_0x31f926,_0xaa81ff){const _0x41f23=a139_0x2400,_0x4655e5=_0x31f926();while(!![]){try{const _0x108ee0=-parseInt(_0x41f23(0x1aa))/0x1+parseInt(_0x41f23(0x1a8))/0x2*(parseInt(_0x41f23(0x19f))/0x3)+-parseInt(_0x41f23(0x1a1))/0x4*(-parseInt(_0x41f23(0x1a7))/0x5)+-parseInt(_0x41f23(0x1ad))/0x6+-parseInt(_0x41f23(0x1a9))/0x7+-parseInt(_0x41f23(0x1a5))/0x8*(-parseInt(_0x41f23(0x1a3))/0x9)+parseInt(_0x41f23(0x1a6))/0xa;if(_0x108ee0===_0xaa81ff)break;else _0x4655e5['push'](_0x4655e5['shift']());}catch(_0x50061a){_0x4655e5['push'](_0x4655e5['shift']());}}}(a139_0x39dc,0x4bd8c));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x132bca){const _0x5c1de8=a139_0x2400;return createHash(_0x5c1de8(0x1ac))[_0x5c1de8(0x1ab)](_0x132bca)[_0x5c1de8(0x1ae)](_0x5c1de8(0x1a2));}function a139_0x39dc(){const _0xd6b0ee=['update','sha256','3618090UTcMQZ','digest','611517DZbzAW','path','1984420yrbbBq','hex','1240497uwILml','size','16BvOeru','5519910QNZeoL','5kxdunk','2DjBUBB','3169453gJxdHr','161139qYZpbA'];a139_0x39dc=function(){return _0xd6b0ee;};return a139_0x39dc();}function a139_0x2400(_0x24b167,_0x21e19f){_0x24b167=_0x24b167-0x19f;const _0x39dca1=a139_0x39dc();let _0x2400cc=_0x39dca1[_0x24b167];return _0x2400cc;}export function fileHash(_0xeb5dff){return bufferSha256(fileContent(_0xeb5dff));}export function bufferSha256(_0x59200d){const _0x3b92a3=a139_0x2400;return createHash(_0x3b92a3(0x1ac))[_0x3b92a3(0x1ab)](_0x59200d)[_0x3b92a3(0x1ae)](_0x3b92a3(0x1a2));}export function fileTreeHash(_0x13885e){const _0x5ccc87=a139_0x2400,_0x50c7e9=createHash(_0x5ccc87(0x1ac));for(const _0x1ccd3d of normalizeManifestFiles(_0x13885e)){_0x50c7e9[_0x5ccc87(0x1ab)](_0x1ccd3d[_0x5ccc87(0x1a0)]),_0x50c7e9[_0x5ccc87(0x1ab)]('\x00'),_0x50c7e9['update'](_0x1ccd3d[_0x5ccc87(0x1ac)]),_0x50c7e9[_0x5ccc87(0x1ab)]('\x00'),_0x50c7e9[_0x5ccc87(0x1ab)](String(_0x1ccd3d[_0x5ccc87(0x1a4)])),_0x50c7e9[_0x5ccc87(0x1ab)]('\x00');}return _0x50c7e9['digest'](_0x5ccc87(0x1a2));}
@@ -1 +1 @@
1
- const a140_0x418554=a140_0xb509;(function(_0x2b70fb,_0x5f4010){const _0xcc8a3a=a140_0xb509,_0x1173d4=_0x2b70fb();while(!![]){try{const _0xf469d7=parseInt(_0xcc8a3a(0x119))/0x1+-parseInt(_0xcc8a3a(0x113))/0x2+parseInt(_0xcc8a3a(0x112))/0x3+parseInt(_0xcc8a3a(0x11f))/0x4*(parseInt(_0xcc8a3a(0x11e))/0x5)+parseInt(_0xcc8a3a(0x120))/0x6+parseInt(_0xcc8a3a(0x115))/0x7+parseInt(_0xcc8a3a(0x11a))/0x8*(-parseInt(_0xcc8a3a(0x117))/0x9);if(_0xf469d7===_0x5f4010)break;else _0x1173d4['push'](_0x1173d4['shift']());}catch(_0x468a3c){_0x1173d4['push'](_0x1173d4['shift']());}}}(a140_0x49bd,0xa72f1));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a140_0xb509(_0x90be1c,_0x5486d5){_0x90be1c=_0x90be1c-0x112;const _0x49bd3c=a140_0x49bd();let _0xb5098e=_0x49bd3c[_0x90be1c];return _0xb5098e;}function a140_0x49bd(){const _0x43a982=['.agents','20PLefTl','823452qHAQJJ','7868670sHAjGg','appCode','1476204wONwYf','1084994Djsqmm','cwd','9248498DHeBQx','freeze','9KVsPUh','skills','926106myUmGB','29176024TsYFCF','global','managedRoot'];a140_0x49bd=function(){return _0x43a982;};return a140_0x49bd();}export function resolveRuntimeSkillInstallTarget(_0x3c759b,_0x32b9c6=a140_0x418554(0x11b),_0x52c457={}){const _0x3f754b=a140_0x418554,_0x3af4e7=resolveSkillSyncPaths(_0x52c457),_0x5a6df2=safePathSegment(_0x3c759b,_0x3f754b(0x121)),_0x58ac05=_0x32b9c6==='project'?[resolve(_0x52c457[_0x3f754b(0x114)]??process[_0x3f754b(0x114)](),_0x3f754b(0x11d),_0x3f754b(0x118))]:runtimeAgentSkillRoots(_0x3af4e7);return Object[_0x3f754b(0x116)]({'scope':_0x32b9c6,'appCode':_0x5a6df2,'skillRoots':Object[_0x3f754b(0x116)](_0x58ac05),'managedRoot':_0x3af4e7[_0x3f754b(0x11c)]});}
1
+ const a140_0x170d4c=a140_0xd649;(function(_0x547e53,_0x15147a){const _0x556cac=a140_0xd649,_0x429fbf=_0x547e53();while(!![]){try{const _0x521c6b=parseInt(_0x556cac(0x1c8))/0x1*(parseInt(_0x556cac(0x1c5))/0x2)+-parseInt(_0x556cac(0x1c0))/0x3+-parseInt(_0x556cac(0x1bb))/0x4*(-parseInt(_0x556cac(0x1c3))/0x5)+-parseInt(_0x556cac(0x1be))/0x6+-parseInt(_0x556cac(0x1bc))/0x7+parseInt(_0x556cac(0x1c6))/0x8+parseInt(_0x556cac(0x1bd))/0x9;if(_0x521c6b===_0x15147a)break;else _0x429fbf['push'](_0x429fbf['shift']());}catch(_0x780009){_0x429fbf['push'](_0x429fbf['shift']());}}}(a140_0xfea1,0xbc2e7));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';function a140_0xd649(_0x11c263,_0x2b398a){_0x11c263=_0x11c263-0x1ba;const _0xfea13e=a140_0xfea1();let _0xd64950=_0xfea13e[_0x11c263];return _0xd64950;}export function resolveRuntimeSkillInstallTarget(_0x8fb442,_0x102db0=a140_0x170d4c(0x1bf),_0x39565a={}){const _0x263e8a=a140_0x170d4c,_0x595809=resolveSkillSyncPaths(_0x39565a),_0x5781d4=safePathSegment(_0x8fb442,_0x263e8a(0x1c4)),_0x2db079=_0x102db0===_0x263e8a(0x1c2)?[resolve(_0x39565a[_0x263e8a(0x1c7)]??process['cwd'](),_0x263e8a(0x1ba),'skills')]:runtimeAgentSkillRoots(_0x595809);return Object[_0x263e8a(0x1c1)]({'scope':_0x102db0,'appCode':_0x5781d4,'skillRoots':Object[_0x263e8a(0x1c1)](_0x2db079),'managedRoot':_0x595809['managedRoot']});}function a140_0xfea1(){const _0x1b06fc=['552HeuyDb','5358416NGozCT','4980321OIhmEF','3853272sCpZVw','global','4058310xxcNoW','freeze','project','28940iPBGIb','appCode','238OmoqDy','7044008aTonuM','cwd','10913DOsVrJ','.agents'];a140_0xfea1=function(){return _0x1b06fc;};return a140_0xfea1();}
@@ -1 +1 @@
1
- const a141_0x4b3340=a141_0x259f;(function(_0x55750b,_0x4fc9de){const _0x2f3c11=a141_0x259f,_0x5817ac=_0x55750b();while(!![]){try{const _0x2fb504=parseInt(_0x2f3c11(0xc1))/0x1+-parseInt(_0x2f3c11(0xda))/0x2+parseInt(_0x2f3c11(0xc3))/0x3*(-parseInt(_0x2f3c11(0xbd))/0x4)+parseInt(_0x2f3c11(0xc6))/0x5*(-parseInt(_0x2f3c11(0xc7))/0x6)+-parseInt(_0x2f3c11(0xd4))/0x7+parseInt(_0x2f3c11(0xbf))/0x8*(-parseInt(_0x2f3c11(0xcf))/0x9)+parseInt(_0x2f3c11(0xb8))/0xa*(parseInt(_0x2f3c11(0xb6))/0xb);if(_0x2fb504===_0x4fc9de)break;else _0x5817ac['push'](_0x5817ac['shift']());}catch(_0x102ca7){_0x5817ac['push'](_0x5817ac['shift']());}}}(a141_0x1ad1,0xd7430));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a141_0x4c32bf 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}=a141_0x4c32bf,RESERVED_PROJECT_SKILL_CODES=new Set([a141_0x4b3340(0xb3),a141_0x4b3340(0xdd),a141_0x4b3340(0xdc)]);function a141_0x259f(_0x11b1a4,_0x32a3f0){_0x11b1a4=_0x11b1a4-0xaa;const _0x1ad137=a141_0x1ad1();let _0x259fde=_0x1ad137[_0x11b1a4];return _0x259fde;}export function linkEffectiveRuntimeSkills(_0x631a12,_0x5c8736){const _0x5e1bf0=a141_0x4b3340,_0x4485a5=new Map();for(const _0x27b1be of _0x631a12){const _0x3d5d8f=_0x27b1be[_0x5e1bf0(0xd9)][_0x5e1bf0(0xc5)];if(!_0x3d5d8f)continue;const _0x15483a=_0x4485a5[_0x5e1bf0(0xcb)](_0x3d5d8f);(!_0x15483a||_0x27b1be[_0x5e1bf0(0xb7)]===_0x5e1bf0(0xc0))&&_0x4485a5['set'](_0x3d5d8f,_0x27b1be);}const _0x94f387=[];for(const _0x1d276e of _0x4485a5[_0x5e1bf0(0xdb)]()){const _0xa63e1c=requireSkillCode(_0x1d276e[_0x5e1bf0(0xd9)]),_0x54175f=readMetadataIfPresent(_0x1d276e[_0x5e1bf0(0xde)]);if(_0x54175f?.['appCode']!==_0x5c8736[_0x5e1bf0(0xcd)]||_0x54175f[_0x5e1bf0(0xc5)]!==_0xa63e1c)throw CliErrors[_0x5e1bf0(0xd0)](_0x5e1bf0(0xb1)+_0x5c8736[_0x5e1bf0(0xcd)]+':\x20'+_0x1d276e[_0x5e1bf0(0xde)]);const _0x3e96db=runtimeSkillLinkName(_0x5c8736,_0xa63e1c);for(const _0x526fac of _0x5c8736[_0x5e1bf0(0xb2)]){_0x94f387[_0x5e1bf0(0xdf)](ensureManagedSymlink(resolve(_0x526fac,_0x3e96db),_0x1d276e[_0x5e1bf0(0xd1)],_0x5c8736,_0xa63e1c));}}return _0x94f387;}export function pruneStaleRuntimeSkillLinks(_0x4b86ee,_0x47f687,_0x29a987){const _0x5a4fc1=a141_0x4b3340,_0x25813d=new Set([..._0x47f687][_0x5a4fc1(0xce)](_0x1a8014=>_0x1a8014[_0x5a4fc1(0xbb)]())['filter'](Boolean)),_0x3e7fbb=_0x29a987?new Set([..._0x29a987][_0x5a4fc1(0xce)](_0xf01f81=>_0xf01f81[_0x5a4fc1(0xbb)]())['filter'](Boolean)):undefined,_0x363576=[];for(const _0x568d3c of _0x4b86ee[_0x5a4fc1(0xb2)]){for(const _0xfb5cb8 of managedTargetSkillLinkPaths(_0x568d3c,_0x4b86ee)){const _0x30e075=runtimeSkillCodeFromLink(_0x4b86ee,_0xfb5cb8);if(_0x3e7fbb&&!_0x3e7fbb['has'](_0x30e075))continue;if(_0x25813d[_0x5a4fc1(0xab)](_0x30e075))continue;_0x363576[_0x5a4fc1(0xdf)](removeManagedSkillLink(_0xfb5cb8,_0x4b86ee,_0x30e075));}}return _0x363576;}export function pruneStaleRuntimeSkillCache(_0x364ff7,_0x3d818b={}){const _0xfae03e=a141_0x4b3340,_0xa0a630=new Set([..._0x364ff7[_0xfae03e(0xaa)]][_0xfae03e(0xce)](_0x42533e=>_0x42533e[_0xfae03e(0xbb)]())['filter'](Boolean)),_0x18d013=_0x364ff7['pruneSkillCodes']?new Set([..._0x364ff7['pruneSkillCodes']][_0xfae03e(0xce)](_0x29f1df=>_0x29f1df['trim']())[_0xfae03e(0xb4)](Boolean)):undefined,_0x244c21=_0x364ff7['scopes']??['personal',_0xfae03e(0xca)],_0x2e6a41=resolve(getRuntimeSkillCacheRoot(_0x364ff7['env'],_0x364ff7[_0xfae03e(0xac)],_0x3d818b),safePathSegment(_0x364ff7[_0xfae03e(0xcd)],_0xfae03e(0xcd))),_0x31ca39=[];for(const _0x2d2cb3 of _0x244c21){const _0x4b0fd6=resolve(_0x2e6a41,_0x2d2cb3);if(!existsSync(_0x4b0fd6))continue;for(const _0x1f133e of readdirSync(_0x4b0fd6,{'withFileTypes':!![]})){if(!_0x1f133e[_0xfae03e(0xaf)]())continue;const _0xf6e99f=_0x1f133e[_0xfae03e(0xb9)];if(_0x18d013&&!_0x18d013[_0xfae03e(0xab)](_0xf6e99f))continue;if(_0xa0a630[_0xfae03e(0xab)](_0xf6e99f))continue;const _0x38d586=resolve(_0x4b0fd6,_0xf6e99f),_0x3203a4=readMetadataIfPresent(resolve(_0x38d586,METADATA_FILE));if(_0x3203a4?.['appCode']!==_0x364ff7['appCode']||_0x3203a4[_0xfae03e(0xb7)]!==_0x2d2cb3||_0x3203a4[_0xfae03e(0xc5)]!==_0xf6e99f){_0x31ca39['push']({'path':_0x38d586,'action':_0xfae03e(0xd8),'reason':_0xfae03e(0xcc)});continue;}if(isLinkedFromAnyRoot(_0x38d586,_0x364ff7['protectedLinkRoots']??[])){_0x31ca39[_0xfae03e(0xdf)]({'path':_0x38d586,'action':_0xfae03e(0xd8),'reason':'linked-from-protected-root'});continue;}removeSync(_0x38d586),_0x31ca39[_0xfae03e(0xdf)]({'path':_0x38d586,'action':'removed'});}}return _0x31ca39;}export function linkGlobalRuntimeSkills(_0x78634a,_0x4f2ad1={}){const _0x1aa149=a141_0x4b3340,_0x70053c=resolveSkillSyncPaths(_0x4f2ad1),_0x525462=[];for(const _0xd29e6 of _0x78634a){if(_0xd29e6[_0x1aa149(0xb7)]!=='builtin')throw CliErrors['validation'](_0x1aa149(0xc4)+_0xd29e6[_0x1aa149(0xb7)]);const _0x1eed14=requireSkillCode(_0xd29e6['skill']),_0x561286=copyManagedSkillDirectory(_0xd29e6['dir'],resolve(_0x70053c['agentsSkillsDir'],_0x1eed14));_0x525462[_0x1aa149(0xdf)]({..._0x561286,'contentHash':_0xd29e6[_0x1aa149(0xd7)]});}return _0x525462;}function ensureManagedSymlink(_0x181430,_0x3b36a0,_0x56402f,_0x48da62){const _0x18dc84=a141_0x4b3340;mkdirSync(dirname(_0x181430),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x181430)||isDanglingSymlink(_0x181430)){const _0x486daf=lstatSync(_0x181430);if(!_0x486daf['isSymbolicLink']())throw CliErrors[_0x18dc84(0xd0)](_0x18dc84(0xe0)+_0x181430);const _0x412a63=resolveSymlinkTarget(_0x181430);if(!isPathInside(realOrResolved(_0x412a63),realOrResolved(_0x56402f['managedRoot'])))throw CliErrors[_0x18dc84(0xd0)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x181430);if(realOrResolved(_0x412a63)===realOrResolved(_0x3b36a0))return{'path':_0x181430,'target':_0x3b36a0,'action':'unchanged'};const _0x2e0a3a=readMetadataIfPresent(resolve(_0x412a63,METADATA_FILE));if(_0x56402f[_0x18dc84(0xb7)]===_0x18dc84(0xc8)&&(_0x2e0a3a?.[_0x18dc84(0xcd)]!==_0x56402f[_0x18dc84(0xcd)]||_0x2e0a3a[_0x18dc84(0xc5)]!==_0x48da62))throw CliErrors[_0x18dc84(0xd0)](_0x18dc84(0xd6)+_0x181430);return unlinkSync(_0x181430),symlinkSync(_0x3b36a0,_0x181430,_0x18dc84(0xd1)),{'path':_0x181430,'target':_0x3b36a0,'action':_0x18dc84(0xbc)};}return symlinkSync(_0x3b36a0,_0x181430,_0x18dc84(0xd1)),{'path':_0x181430,'target':_0x3b36a0,'action':'created'};}function managedTargetSkillLinkPaths(_0x2740ee,_0x3d531e){const _0x1317b=a141_0x4b3340;if(!existsSync(_0x2740ee))return[];const _0x39f1dd=_0x3d531e[_0x1317b(0xcd)]+'--';return readdirSync(_0x2740ee,{'withFileTypes':!![]})[_0x1317b(0xb4)](_0x144020=>_0x3d531e[_0x1317b(0xb7)]===_0x1317b(0xc8)||_0x144020[_0x1317b(0xb9)][_0x1317b(0xb5)](_0x39f1dd))['map'](_0x37fcde=>resolve(_0x2740ee,_0x37fcde[_0x1317b(0xb9)]));}function removeManagedSkillLink(_0x56f281,_0x385b78,_0x2a075f){const _0x3d7388=a141_0x4b3340,_0x5a9fe0=lstatIfPresent(_0x56f281);if(!_0x5a9fe0?.['isSymbolicLink']())return{'path':_0x56f281,'action':_0x3d7388(0xd8),'reason':'not-managed-symlink'};const _0x312aa3=resolveSymlinkTarget(_0x56f281);if(!isPathInside(realOrResolved(_0x312aa3),realOrResolved(_0x385b78[_0x3d7388(0xad)])))return{'path':_0x56f281,'action':_0x3d7388(0xd8),'reason':'external-symlink'};const _0x4c7d78=readMetadataIfPresent(resolve(_0x312aa3,METADATA_FILE));if(_0x385b78[_0x3d7388(0xb7)]===_0x3d7388(0xc8)&&(_0x4c7d78?.[_0x3d7388(0xcd)]!==_0x385b78[_0x3d7388(0xcd)]||_0x4c7d78['skillCode']!==_0x2a075f))return{'path':_0x56f281,'action':'skipped','reason':_0x3d7388(0xcc)};return unlinkSync(_0x56f281),{'path':_0x56f281,'action':_0x3d7388(0xd5)};}function isLinkedFromAnyRoot(_0x4ab339,_0x3667ad){const _0x38a861=a141_0x4b3340,_0x21c5c5=realOrResolved(_0x4ab339);for(const _0x5513f6 of _0x3667ad){if(!existsSync(_0x5513f6))continue;for(const _0x3ab812 of readdirSync(_0x5513f6,{'withFileTypes':!![]})){if(!_0x3ab812['isSymbolicLink']())continue;const _0x510d39=resolve(_0x5513f6,_0x3ab812[_0x38a861(0xb9)]);if(realOrResolved(resolveSymlinkTarget(_0x510d39))===_0x21c5c5)return!![];}}return![];}function runtimeSkillLinkName(_0x1a8ce7,_0x45cabf){const _0x2ece4c=a141_0x4b3340,_0x5df586=safePathSegment(_0x45cabf,_0x2ece4c(0xc5));if(_0x1a8ce7[_0x2ece4c(0xb7)]===_0x2ece4c(0xc8)&&RESERVED_PROJECT_SKILL_CODES[_0x2ece4c(0xab)](_0x5df586))throw CliErrors[_0x2ece4c(0xd0)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0x5df586);return _0x1a8ce7[_0x2ece4c(0xb7)]===_0x2ece4c(0xc8)?_0x5df586:_0x1a8ce7[_0x2ece4c(0xcd)]+'--'+_0x5df586;}function a141_0x1ad1(){const _0x1acdb9=['length','6443080amuFaF','removed','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','contentHash','skipped','skill','1800966QTiLDb','values','secret-retriever','runtime-observe','metadataPath','push','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','activeSkillCodes','has','accessKey','managedRoot','unchanged','isDirectory','builtin','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','skillRoots','lovrabet','filter','startsWith','22fdhXRZ','scope','22363730JYHCss','name','isSymbolicLink','trim','updated','4AvIEBh','created','3539912mtMYuk','personal','709494fWHACH','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','4432398iuhvNt','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','skillCode','35875qARTMq','468dbltmQ','project','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','company','get','metadata-mismatch','appCode','map','9lUKPls','validation','dir','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'];a141_0x1ad1=function(){return _0x1acdb9;};return a141_0x1ad1();}function runtimeSkillCodeFromLink(_0x450577,_0x4d7033){const _0x5062a4=a141_0x4b3340,_0x6238ac=basename(_0x4d7033);return _0x450577['scope']===_0x5062a4(0xc8)?_0x6238ac:_0x6238ac['slice']((_0x450577[_0x5062a4(0xcd)]+'--')[_0x5062a4(0xd3)]);}export function copyManagedSkillDirectory(_0x33a730,_0x51af75){const _0xae9364=a141_0x4b3340,_0x5a69da=resolve(_0x51af75,METADATA_FILE),_0x3e4e28=existsSync(_0x51af75);if(_0x3e4e28){const _0x44ddeb=lstatSync(_0x51af75);if(_0x44ddeb['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x51af75);if(!_0x44ddeb[_0xae9364(0xaf)]())throw CliErrors[_0xae9364(0xd0)](_0xae9364(0xc2)+_0x51af75);const _0x1b7b4f=readMetadataIfPresent(_0x5a69da);if(_0x1b7b4f?.[_0xae9364(0xb7)]!==_0xae9364(0xb0))throw CliErrors[_0xae9364(0xd0)](_0xae9364(0xd2)+_0x51af75);}ensureDirSync(dirname(_0x51af75));const _0x2e1446=_0x3e4e28?readMetadataIfPresent(_0x5a69da)?.[_0xae9364(0xd7)]:undefined,_0x1483c8=readMetadataIfPresent(resolve(_0x33a730,METADATA_FILE))?.[_0xae9364(0xd7)];return _0x3e4e28&&removeSync(_0x51af75),copySkillDirectory(_0x33a730,_0x51af75),{'path':_0x51af75,'target':_0x33a730,'action':!_0x3e4e28?_0xae9364(0xbe):_0x2e1446===_0x1483c8?_0xae9364(0xae):_0xae9364(0xbc)};}function copySkillDirectory(_0x2dbbd6,_0x3c2b75){copySync(_0x2dbbd6,_0x3c2b75,{'dereference':![],'overwrite':!![],'filter'(_0x2804b6){const _0x607c1d=a141_0x259f;if(lstatSync(_0x2804b6)[_0x607c1d(0xba)]())throw CliErrors[_0x607c1d(0xd0)](_0x607c1d(0xc9)+_0x2804b6);return!![];}});}
1
+ const a141_0x1e6a6c=a141_0x17b4;(function(_0x2f85fc,_0x161a03){const _0x18af69=a141_0x17b4,_0x1cb30b=_0x2f85fc();while(!![]){try{const _0x3a0b5e=-parseInt(_0x18af69(0x16d))/0x1*(parseInt(_0x18af69(0x153))/0x2)+parseInt(_0x18af69(0x158))/0x3*(parseInt(_0x18af69(0x14c))/0x4)+-parseInt(_0x18af69(0x154))/0x5+parseInt(_0x18af69(0x156))/0x6*(parseInt(_0x18af69(0x169))/0x7)+-parseInt(_0x18af69(0x143))/0x8*(-parseInt(_0x18af69(0x172))/0x9)+parseInt(_0x18af69(0x146))/0xa*(-parseInt(_0x18af69(0x16c))/0xb)+parseInt(_0x18af69(0x16b))/0xc*(parseInt(_0x18af69(0x152))/0xd);if(_0x3a0b5e===_0x161a03)break;else _0x1cb30b['push'](_0x1cb30b['shift']());}catch(_0x291c4f){_0x1cb30b['push'](_0x1cb30b['shift']());}}}(a141_0x3bb6,0x9b3bd));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a141_0x461107 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a141_0x17b4(_0x365f38,_0x48e53d){_0x365f38=_0x365f38-0x13e;const _0x3bb6f3=a141_0x3bb6();let _0x17b4f5=_0x3bb6f3[_0x365f38];return _0x17b4f5;}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}=a141_0x461107,RESERVED_PROJECT_SKILL_CODES=new Set([a141_0x1e6a6c(0x162),a141_0x1e6a6c(0x178),a141_0x1e6a6c(0x15c)]);export function linkEffectiveRuntimeSkills(_0x2806b6,_0x5006f8){const _0x442a4f=a141_0x1e6a6c,_0x3e5e9e=new Map();for(const _0x926d97 of _0x2806b6){const _0x594ea4=_0x926d97['skill'][_0x442a4f(0x168)];if(!_0x594ea4)continue;const _0xf392b4=_0x3e5e9e[_0x442a4f(0x14b)](_0x594ea4);(!_0xf392b4||_0x926d97[_0x442a4f(0x15b)]==='personal')&&_0x3e5e9e[_0x442a4f(0x15f)](_0x594ea4,_0x926d97);}const _0x40098a=[];for(const _0x2dc31a of _0x3e5e9e['values']()){const _0x3db848=requireSkillCode(_0x2dc31a['skill']),_0x3b79fe=readMetadataIfPresent(_0x2dc31a[_0x442a4f(0x148)]);if(_0x3b79fe?.[_0x442a4f(0x161)]!==_0x5006f8[_0x442a4f(0x161)]||_0x3b79fe[_0x442a4f(0x168)]!==_0x3db848)throw CliErrors[_0x442a4f(0x173)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x5006f8[_0x442a4f(0x161)]+':\x20'+_0x2dc31a[_0x442a4f(0x148)]);const _0xe7ef70=runtimeSkillLinkName(_0x5006f8,_0x3db848);for(const _0xd305c7 of _0x5006f8['skillRoots']){_0x40098a[_0x442a4f(0x176)](ensureManagedSymlink(resolve(_0xd305c7,_0xe7ef70),_0x2dc31a['dir'],_0x5006f8,_0x3db848));}}return _0x40098a;}function a141_0x3bb6(){const _0x38da38=['4623505gFaDei','startsWith','168fFfiVY','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','18KdUxRb','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','updated','scope','secret-retriever','unchanged','removed','set','has','appCode','lovrabet','agentsSkillsDir','accessKey','pruneSkillCodes','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','metadata-mismatch','skillCode','192101MYFOfM','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','32784EWFDpH','407mhCfQb','1yEbyQV','scopes','isDirectory','filter','skillRoots','27XCnhWr','validation','project','managedRoot','push','skipped','runtime-observe','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','linked-from-protected-root','dir','name','trim','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','2988904PKqSHU','external-symlink','contentHash','30070SzkhGs','env','metadataPath','activeSkillCodes','isSymbolicLink','get','52604bDokGi','slice','company','map','created','builtin','156AlrEgK','658272lWsFzp'];a141_0x3bb6=function(){return _0x38da38;};return a141_0x3bb6();}export function pruneStaleRuntimeSkillLinks(_0xe997d7,_0xc65782,_0x2d1c5d){const _0x29acf0=a141_0x1e6a6c,_0x35055f=new Set([..._0xc65782]['map'](_0x4e9afe=>_0x4e9afe[_0x29acf0(0x141)]())['filter'](Boolean)),_0x21aa03=_0x2d1c5d?new Set([..._0x2d1c5d][_0x29acf0(0x14f)](_0x1cea9f=>_0x1cea9f[_0x29acf0(0x141)]())[_0x29acf0(0x170)](Boolean)):undefined,_0x1ee56b=[];for(const _0xcd99be of _0xe997d7[_0x29acf0(0x171)]){for(const _0x45e463 of managedTargetSkillLinkPaths(_0xcd99be,_0xe997d7)){const _0x5172a1=runtimeSkillCodeFromLink(_0xe997d7,_0x45e463);if(_0x21aa03&&!_0x21aa03[_0x29acf0(0x160)](_0x5172a1))continue;if(_0x35055f[_0x29acf0(0x160)](_0x5172a1))continue;_0x1ee56b[_0x29acf0(0x176)](removeManagedSkillLink(_0x45e463,_0xe997d7,_0x5172a1));}}return _0x1ee56b;}export function pruneStaleRuntimeSkillCache(_0x58bb8b,_0x5abac2={}){const _0x328843=a141_0x1e6a6c,_0x1f023f=new Set([..._0x58bb8b[_0x328843(0x149)]][_0x328843(0x14f)](_0x389c76=>_0x389c76[_0x328843(0x141)]())[_0x328843(0x170)](Boolean)),_0x514471=_0x58bb8b[_0x328843(0x165)]?new Set([..._0x58bb8b[_0x328843(0x165)]][_0x328843(0x14f)](_0x416110=>_0x416110[_0x328843(0x141)]())[_0x328843(0x170)](Boolean)):undefined,_0xf9a24=_0x58bb8b[_0x328843(0x16e)]??['personal',_0x328843(0x14e)],_0xfbf312=resolve(getRuntimeSkillCacheRoot(_0x58bb8b[_0x328843(0x147)],_0x58bb8b[_0x328843(0x164)],_0x5abac2),safePathSegment(_0x58bb8b['appCode'],_0x328843(0x161))),_0x48a5d8=[];for(const _0x2720de of _0xf9a24){const _0x1d87d5=resolve(_0xfbf312,_0x2720de);if(!existsSync(_0x1d87d5))continue;for(const _0x5b1777 of readdirSync(_0x1d87d5,{'withFileTypes':!![]})){if(!_0x5b1777[_0x328843(0x16f)]())continue;const _0x5ef883=_0x5b1777[_0x328843(0x140)];if(_0x514471&&!_0x514471[_0x328843(0x160)](_0x5ef883))continue;if(_0x1f023f[_0x328843(0x160)](_0x5ef883))continue;const _0x2e961d=resolve(_0x1d87d5,_0x5ef883),_0x4b0bb2=readMetadataIfPresent(resolve(_0x2e961d,METADATA_FILE));if(_0x4b0bb2?.[_0x328843(0x161)]!==_0x58bb8b['appCode']||_0x4b0bb2[_0x328843(0x15b)]!==_0x2720de||_0x4b0bb2[_0x328843(0x168)]!==_0x5ef883){_0x48a5d8[_0x328843(0x176)]({'path':_0x2e961d,'action':_0x328843(0x177),'reason':_0x328843(0x167)});continue;}if(isLinkedFromAnyRoot(_0x2e961d,_0x58bb8b['protectedLinkRoots']??[])){_0x48a5d8[_0x328843(0x176)]({'path':_0x2e961d,'action':_0x328843(0x177),'reason':_0x328843(0x13e)});continue;}removeSync(_0x2e961d),_0x48a5d8[_0x328843(0x176)]({'path':_0x2e961d,'action':_0x328843(0x15e)});}}return _0x48a5d8;}export function linkGlobalRuntimeSkills(_0x53aca2,_0x311297={}){const _0x5bde39=a141_0x1e6a6c,_0x5b2cd5=resolveSkillSyncPaths(_0x311297),_0x4613a0=[];for(const _0x2925e2 of _0x53aca2){if(_0x2925e2['scope']!==_0x5bde39(0x151))throw CliErrors[_0x5bde39(0x173)](_0x5bde39(0x159)+_0x2925e2[_0x5bde39(0x15b)]);const _0x49b655=requireSkillCode(_0x2925e2['skill']),_0x4dbb21=copyManagedSkillDirectory(_0x2925e2[_0x5bde39(0x13f)],resolve(_0x5b2cd5[_0x5bde39(0x163)],_0x49b655));_0x4613a0['push']({..._0x4dbb21,'contentHash':_0x2925e2[_0x5bde39(0x145)]});}return _0x4613a0;}function ensureManagedSymlink(_0x24dc8d,_0x48db3d,_0x410075,_0x31647d){const _0x28e429=a141_0x1e6a6c;mkdirSync(dirname(_0x24dc8d),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x24dc8d)||isDanglingSymlink(_0x24dc8d)){const _0x89f025=lstatSync(_0x24dc8d);if(!_0x89f025[_0x28e429(0x14a)]())throw CliErrors[_0x28e429(0x173)](_0x28e429(0x157)+_0x24dc8d);const _0x45ca35=resolveSymlinkTarget(_0x24dc8d);if(!isPathInside(realOrResolved(_0x45ca35),realOrResolved(_0x410075[_0x28e429(0x175)])))throw CliErrors[_0x28e429(0x173)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x24dc8d);if(realOrResolved(_0x45ca35)===realOrResolved(_0x48db3d))return{'path':_0x24dc8d,'target':_0x48db3d,'action':'unchanged'};const _0x274d44=readMetadataIfPresent(resolve(_0x45ca35,METADATA_FILE));if(_0x410075[_0x28e429(0x15b)]==='project'&&(_0x274d44?.['appCode']!==_0x410075[_0x28e429(0x161)]||_0x274d44[_0x28e429(0x168)]!==_0x31647d))throw CliErrors[_0x28e429(0x173)](_0x28e429(0x166)+_0x24dc8d);return unlinkSync(_0x24dc8d),symlinkSync(_0x48db3d,_0x24dc8d,_0x28e429(0x13f)),{'path':_0x24dc8d,'target':_0x48db3d,'action':_0x28e429(0x15a)};}return symlinkSync(_0x48db3d,_0x24dc8d,_0x28e429(0x13f)),{'path':_0x24dc8d,'target':_0x48db3d,'action':'created'};}function managedTargetSkillLinkPaths(_0x31cb02,_0x4e7e18){const _0x41c4c7=a141_0x1e6a6c;if(!existsSync(_0x31cb02))return[];const _0x3111d6=_0x4e7e18[_0x41c4c7(0x161)]+'--';return readdirSync(_0x31cb02,{'withFileTypes':!![]})['filter'](_0x1ddfe3=>_0x4e7e18[_0x41c4c7(0x15b)]===_0x41c4c7(0x174)||_0x1ddfe3['name'][_0x41c4c7(0x155)](_0x3111d6))[_0x41c4c7(0x14f)](_0x3463d2=>resolve(_0x31cb02,_0x3463d2[_0x41c4c7(0x140)]));}function removeManagedSkillLink(_0x36b616,_0x1a61b4,_0x510378){const _0x2530b9=a141_0x1e6a6c,_0x3d58f8=lstatIfPresent(_0x36b616);if(!_0x3d58f8?.['isSymbolicLink']())return{'path':_0x36b616,'action':_0x2530b9(0x177),'reason':'not-managed-symlink'};const _0x1eed56=resolveSymlinkTarget(_0x36b616);if(!isPathInside(realOrResolved(_0x1eed56),realOrResolved(_0x1a61b4[_0x2530b9(0x175)])))return{'path':_0x36b616,'action':_0x2530b9(0x177),'reason':_0x2530b9(0x144)};const _0x31c27c=readMetadataIfPresent(resolve(_0x1eed56,METADATA_FILE));if(_0x1a61b4[_0x2530b9(0x15b)]===_0x2530b9(0x174)&&(_0x31c27c?.[_0x2530b9(0x161)]!==_0x1a61b4['appCode']||_0x31c27c[_0x2530b9(0x168)]!==_0x510378))return{'path':_0x36b616,'action':_0x2530b9(0x177),'reason':_0x2530b9(0x167)};return unlinkSync(_0x36b616),{'path':_0x36b616,'action':'removed'};}function isLinkedFromAnyRoot(_0x272f73,_0xc4f7a3){const _0x173586=a141_0x1e6a6c,_0x5e1945=realOrResolved(_0x272f73);for(const _0x50a548 of _0xc4f7a3){if(!existsSync(_0x50a548))continue;for(const _0x2cdc0d of readdirSync(_0x50a548,{'withFileTypes':!![]})){if(!_0x2cdc0d[_0x173586(0x14a)]())continue;const _0xa4eb84=resolve(_0x50a548,_0x2cdc0d[_0x173586(0x140)]);if(realOrResolved(resolveSymlinkTarget(_0xa4eb84))===_0x5e1945)return!![];}}return![];}function runtimeSkillLinkName(_0x35671e,_0x7071bd){const _0x39f9ab=a141_0x1e6a6c,_0x5a5c07=safePathSegment(_0x7071bd,'skillCode');if(_0x35671e[_0x39f9ab(0x15b)]===_0x39f9ab(0x174)&&RESERVED_PROJECT_SKILL_CODES[_0x39f9ab(0x160)](_0x5a5c07))throw CliErrors['validation'](_0x39f9ab(0x179)+_0x5a5c07);return _0x35671e['scope']==='project'?_0x5a5c07:_0x35671e[_0x39f9ab(0x161)]+'--'+_0x5a5c07;}function runtimeSkillCodeFromLink(_0x587362,_0x1ecd70){const _0x2bb05e=a141_0x1e6a6c,_0x40edd5=basename(_0x1ecd70);return _0x587362[_0x2bb05e(0x15b)]===_0x2bb05e(0x174)?_0x40edd5:_0x40edd5[_0x2bb05e(0x14d)]((_0x587362[_0x2bb05e(0x161)]+'--')['length']);}export function copyManagedSkillDirectory(_0x44dfc6,_0x362eb5){const _0x2bc197=a141_0x1e6a6c,_0x8175b3=resolve(_0x362eb5,METADATA_FILE),_0x524391=existsSync(_0x362eb5);if(_0x524391){const _0x3158fc=lstatSync(_0x362eb5);if(_0x3158fc['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x362eb5);if(!_0x3158fc[_0x2bc197(0x16f)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x362eb5);const _0xc5dbd4=readMetadataIfPresent(_0x8175b3);if(_0xc5dbd4?.['scope']!==_0x2bc197(0x151))throw CliErrors[_0x2bc197(0x173)](_0x2bc197(0x16a)+_0x362eb5);}ensureDirSync(dirname(_0x362eb5));const _0x161c07=_0x524391?readMetadataIfPresent(_0x8175b3)?.[_0x2bc197(0x145)]:undefined,_0x59708b=readMetadataIfPresent(resolve(_0x44dfc6,METADATA_FILE))?.[_0x2bc197(0x145)];return _0x524391&&removeSync(_0x362eb5),copySkillDirectory(_0x44dfc6,_0x362eb5),{'path':_0x362eb5,'target':_0x44dfc6,'action':!_0x524391?_0x2bc197(0x150):_0x161c07===_0x59708b?_0x2bc197(0x15d):_0x2bc197(0x15a)};}function copySkillDirectory(_0x5a8166,_0x4aac0b){copySync(_0x5a8166,_0x4aac0b,{'dereference':![],'overwrite':!![],'filter'(_0x515a0d){const _0x310e36=a141_0x17b4;if(lstatSync(_0x515a0d)[_0x310e36(0x14a)]())throw CliErrors[_0x310e36(0x173)](_0x310e36(0x142)+_0x515a0d);return!![];}});}
@@ -1 +1 @@
1
- (function(_0x3e7ed6,_0x47f83a){const _0x33fdcd=a142_0x46b5,_0x3a0212=_0x3e7ed6();while(!![]){try{const _0x5c7f61=-parseInt(_0x33fdcd(0xed))/0x1*(-parseInt(_0x33fdcd(0xec))/0x2)+-parseInt(_0x33fdcd(0xf1))/0x3+parseInt(_0x33fdcd(0xfe))/0x4+parseInt(_0x33fdcd(0xfb))/0x5+parseInt(_0x33fdcd(0xe0))/0x6+parseInt(_0x33fdcd(0xfd))/0x7+-parseInt(_0x33fdcd(0xee))/0x8*(parseInt(_0x33fdcd(0xdd))/0x9);if(_0x5c7f61===_0x47f83a)break;else _0x3a0212['push'](_0x3a0212['shift']());}catch(_0x561984){_0x3a0212['push'](_0x3a0212['shift']());}}}(a142_0x1b50,0xab014));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a142_0x1b50(){const _0x1067df=['get','4184940EYurPg','set','linkedPath','appCode','push','startsWith','scopes','sort','skillRoots','has','6050925nZPkMd','name','6192165COZoRe','621448fTAwFZ','tags','cache','trim','builtin','env','from','map','isDirectory','isArray','code','40914NbUwMa','values','localeCompare','5021928czhrgD','isSymbolicLink','cacheDir','skillCode','includes','skillMdPath','linkedPaths','scope','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','dir','accessKey','project','145276dYoxiH','7oBYoQS','2640sSiiXe','filter'];a142_0x1b50=function(){return _0x1067df;};return a142_0x1b50();}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a142_0x46b5(_0x29b257,_0x504303){_0x29b257=_0x29b257-0xd5;const _0x1b50d0=a142_0x1b50();let _0x46b53b=_0x1b50d0[_0x29b257];return _0x46b53b;}import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x3e5792,_0x1aada1,_0xe93b8b={}){const _0xeab8ee=a142_0x46b5,_0x3d87e3=safePathSegment(_0x3e5792['appCode'],_0xeab8ee(0xf4));if(_0x1aada1[_0xeab8ee(0xf4)]!==_0x3d87e3)throw CliErrors['validation'](_0xeab8ee(0xe8)+_0x1aada1[_0xeab8ee(0xf4)]+'\x20!=\x20'+_0x3d87e3);const _0x4d3dc3=normalizeRuntimeSkillScopes(_0x3e5792[_0xeab8ee(0xf7)]),_0x1f1b6c=new Set(_0x4d3dc3),_0x407ba4=_0x3e5792[_0xeab8ee(0xdc)]?.[_0xeab8ee(0xd5)](),_0x819d0f=new Map(),_0x43130f=resolve(getRuntimeSkillCacheRoot(_0x3e5792[_0xeab8ee(0xd7)],_0x3e5792[_0xeab8ee(0xea)],_0xe93b8b),_0x3d87e3);for(const _0x413486 of _0x4d3dc3){for(const _0x16d163 of localSkillEntryDirs(resolve(_0x43130f,_0x413486))){collectLocalRuntimeSkill(_0x819d0f,_0x16d163,{'appCode':_0x3d87e3,'scopes':_0x1f1b6c,'code':_0x407ba4,'source':_0xeab8ee(0x100)});}}for(const _0x59d390 of _0x1aada1[_0xeab8ee(0xf9)]){for(const _0x5442f8 of localSkillLinkCandidates(_0x59d390,_0x1aada1,_0x1f1b6c)){collectLocalRuntimeSkill(_0x819d0f,_0x5442f8,{'appCode':_0x3d87e3,'scopes':_0x1f1b6c,'code':_0x407ba4,'source':'link','linkedPath':_0x5442f8});}}return Array[_0xeab8ee(0xd8)](_0x819d0f[_0xeab8ee(0xde)]())[_0xeab8ee(0xf8)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0xa878c8){const _0x88152a=a142_0x46b5;if(!existsSync(_0xa878c8))return[];return readdirSync(_0xa878c8,{'withFileTypes':!![]})['filter'](_0x9860cd=>_0x9860cd[_0x88152a(0xda)]()||_0x9860cd[_0x88152a(0xe1)]())[_0x88152a(0xd9)](_0x158450=>resolve(_0xa878c8,_0x158450[_0x88152a(0xfc)]));}function localSkillLinkCandidates(_0x2c62fe,_0x269d92,_0x4bb01b){const _0x20f49b=a142_0x46b5;if(!existsSync(_0x2c62fe))return[];const _0x2dd923=_0x269d92[_0x20f49b(0xf4)]+'--';return readdirSync(_0x2c62fe,{'withFileTypes':!![]})[_0x20f49b(0xef)](_0x54e8e2=>_0x54e8e2[_0x20f49b(0xda)]()||_0x54e8e2[_0x20f49b(0xe1)]())[_0x20f49b(0xef)](_0x408902=>_0x269d92[_0x20f49b(0xe7)]===_0x20f49b(0xeb)||_0x408902['name'][_0x20f49b(0xf6)](_0x2dd923)||_0x4bb01b[_0x20f49b(0xfa)](_0x20f49b(0xd6)))[_0x20f49b(0xd9)](_0x1e1f8a=>resolve(_0x2c62fe,_0x1e1f8a[_0x20f49b(0xfc)]));}function collectLocalRuntimeSkill(_0x53514b,_0x96206b,_0x5208b5){const _0xfdd5b5=a142_0x46b5,_0x696255=resolve(_0x96206b,METADATA_FILE),_0x4e2366=readMetadataIfPresent(_0x696255);if(!_0x4e2366)return;if(_0x4e2366[_0xfdd5b5(0xf4)]!==_0x5208b5[_0xfdd5b5(0xf4)])return;if(!isRuntimeSkillScope(_0x4e2366['scope'])||!_0x5208b5[_0xfdd5b5(0xf7)]['has'](_0x4e2366['scope']))return;const _0x2a19f0=_0x4e2366[_0xfdd5b5(0xe3)]?.[_0xfdd5b5(0xd5)]();if(!_0x2a19f0)return;if(_0x5208b5['code']&&_0x2a19f0!==_0x5208b5[_0xfdd5b5(0xdc)])return;const _0x4bb36c=_0x4e2366[_0xfdd5b5(0xe7)]+':'+_0x2a19f0,_0x536492=_0x5208b5[_0xfdd5b5(0xf3)]?[_0x5208b5[_0xfdd5b5(0xf3)]]:[],_0x64f276=_0x53514b[_0xfdd5b5(0xf0)](_0x4bb36c);if(_0x64f276){_0x5208b5['source']===_0xfdd5b5(0x100)&&(_0x64f276[_0xfdd5b5(0xe9)]=_0x96206b,_0x64f276[_0xfdd5b5(0xe2)]=_0x96206b,_0x64f276[_0xfdd5b5(0xe5)]=resolve(_0x96206b,SKILL_FILE),_0x64f276['metadataPath']=_0x696255);for(const _0x2b249a of _0x536492){!_0x64f276[_0xfdd5b5(0xe6)][_0xfdd5b5(0xe4)](_0x2b249a)&&_0x64f276[_0xfdd5b5(0xe6)][_0xfdd5b5(0xf5)](_0x2b249a);}_0x64f276[_0xfdd5b5(0xe6)][_0xfdd5b5(0xf8)]();return;}_0x53514b[_0xfdd5b5(0xf2)](_0x4bb36c,{..._0x4e2366,'tags':Array[_0xfdd5b5(0xdb)](_0x4e2366[_0xfdd5b5(0xff)])?_0x4e2366['tags']:[],'scope':_0x4e2366[_0xfdd5b5(0xe7)],'source':'local','dir':_0x96206b,'cacheDir':_0x5208b5['source']==='cache'?_0x96206b:undefined,'skillMdPath':resolve(_0x96206b,SKILL_FILE),'metadataPath':_0x696255,'linkedPaths':_0x536492});}function compareLocalRuntimeSkills(_0x5c2b82,_0x37311c){const _0xbab120=a142_0x46b5,_0x23b8dd={'personal':0x0,'company':0x1,'builtin':0x2};return _0x23b8dd[_0x5c2b82[_0xbab120(0xe7)]]-_0x23b8dd[_0x37311c[_0xbab120(0xe7)]]||_0x5c2b82[_0xbab120(0xe3)][_0xbab120(0xdf)](_0x37311c[_0xbab120(0xe3)])||_0x5c2b82[_0xbab120(0xe9)]['localeCompare'](_0x37311c[_0xbab120(0xe9)]);}
1
+ (function(_0x1ecd44,_0x43e0b0){const _0x2bdf99=a142_0x4e30,_0x263b67=_0x1ecd44();while(!![]){try{const _0x32de62=-parseInt(_0x2bdf99(0xda))/0x1*(parseInt(_0x2bdf99(0xc1))/0x2)+-parseInt(_0x2bdf99(0xc4))/0x3*(-parseInt(_0x2bdf99(0xd9))/0x4)+-parseInt(_0x2bdf99(0xc9))/0x5+-parseInt(_0x2bdf99(0xc3))/0x6*(-parseInt(_0x2bdf99(0xcf))/0x7)+parseInt(_0x2bdf99(0xd1))/0x8*(-parseInt(_0x2bdf99(0xd8))/0x9)+parseInt(_0x2bdf99(0xd0))/0xa+parseInt(_0x2bdf99(0xb0))/0xb;if(_0x32de62===_0x43e0b0)break;else _0x263b67['push'](_0x263b67['shift']());}catch(_0x1a1885){_0x263b67['push'](_0x263b67['shift']());}}}(a142_0x3ef4,0x36d72));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x216043,_0x4a9acf,_0x29587b={}){const _0x9ef3e5=a142_0x4e30,_0x5a2fe7=safePathSegment(_0x216043[_0x9ef3e5(0xc6)],_0x9ef3e5(0xc6));if(_0x4a9acf['appCode']!==_0x5a2fe7)throw CliErrors[_0x9ef3e5(0xb8)](_0x9ef3e5(0xb2)+_0x4a9acf['appCode']+_0x9ef3e5(0xd5)+_0x5a2fe7);const _0x344314=normalizeRuntimeSkillScopes(_0x216043[_0x9ef3e5(0xb7)]),_0x21cdae=new Set(_0x344314),_0x2d688d=_0x216043['code']?.['trim'](),_0x1ab501=new Map(),_0xc18726=resolve(getRuntimeSkillCacheRoot(_0x216043['env'],_0x216043[_0x9ef3e5(0xc8)],_0x29587b),_0x5a2fe7);for(const _0x1abfe3 of _0x344314){for(const _0xd83143 of localSkillEntryDirs(resolve(_0xc18726,_0x1abfe3))){collectLocalRuntimeSkill(_0x1ab501,_0xd83143,{'appCode':_0x5a2fe7,'scopes':_0x21cdae,'code':_0x2d688d,'source':_0x9ef3e5(0xc5)});}}for(const _0x55d7d9 of _0x4a9acf[_0x9ef3e5(0xb9)]){for(const _0x57b44d of localSkillLinkCandidates(_0x55d7d9,_0x4a9acf,_0x21cdae)){collectLocalRuntimeSkill(_0x1ab501,_0x57b44d,{'appCode':_0x5a2fe7,'scopes':_0x21cdae,'code':_0x2d688d,'source':'link','linkedPath':_0x57b44d});}}return Array[_0x9ef3e5(0xb3)](_0x1ab501[_0x9ef3e5(0xd7)]())[_0x9ef3e5(0xd3)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x27f1b6){const _0x19195e=a142_0x4e30;if(!existsSync(_0x27f1b6))return[];return readdirSync(_0x27f1b6,{'withFileTypes':!![]})['filter'](_0x361118=>_0x361118[_0x19195e(0xd6)]()||_0x361118[_0x19195e(0xaf)]())[_0x19195e(0xba)](_0x4881ee=>resolve(_0x27f1b6,_0x4881ee[_0x19195e(0xc7)]));}function localSkillLinkCandidates(_0x2ec58e,_0x5a91c0,_0x2ee7e6){const _0x2b28fa=a142_0x4e30;if(!existsSync(_0x2ec58e))return[];const _0x4e8f1b=_0x5a91c0[_0x2b28fa(0xc6)]+'--';return readdirSync(_0x2ec58e,{'withFileTypes':!![]})['filter'](_0x5c1a68=>_0x5c1a68[_0x2b28fa(0xd6)]()||_0x5c1a68[_0x2b28fa(0xaf)]())['filter'](_0x4a9a9f=>_0x5a91c0['scope']===_0x2b28fa(0xb1)||_0x4a9a9f[_0x2b28fa(0xc7)]['startsWith'](_0x4e8f1b)||_0x2ee7e6[_0x2b28fa(0xca)]('builtin'))[_0x2b28fa(0xba)](_0x38101=>resolve(_0x2ec58e,_0x38101['name']));}function a142_0x4e30(_0x1a9c76,_0x4b9e4b){_0x1a9c76=_0x1a9c76-0xae;const _0x3ef45a=a142_0x3ef4();let _0x4e30c5=_0x3ef45a[_0x1a9c76];return _0x4e30c5;}function a142_0x3ef4(){const _0x4a4e53=['metadataPath','linkedPaths','skillCode','76xMfGuD','localeCompare','66OOCufd','1119765gUgFZo','cache','appCode','name','accessKey','2028510ohiUFo','has','dir','linkedPath','source','trim','77133BZvErD','3679310CZXqNT','151088xepZIS','cacheDir','sort','set','\x20!=\x20','isDirectory','values','9stLnaX','4OKSkhh','8058PfnquY','includes','isSymbolicLink','1023253lrCLQW','project','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','from','skillMdPath','scope','isArray','scopes','validation','skillRoots','map','code','push','local'];a142_0x3ef4=function(){return _0x4a4e53;};return a142_0x3ef4();}function collectLocalRuntimeSkill(_0x3a6640,_0x3f12f1,_0x33b554){const _0x1d00e2=a142_0x4e30,_0xf0e3ac=resolve(_0x3f12f1,METADATA_FILE),_0x326e1a=readMetadataIfPresent(_0xf0e3ac);if(!_0x326e1a)return;if(_0x326e1a[_0x1d00e2(0xc6)]!==_0x33b554[_0x1d00e2(0xc6)])return;if(!isRuntimeSkillScope(_0x326e1a[_0x1d00e2(0xb5)])||!_0x33b554['scopes'][_0x1d00e2(0xca)](_0x326e1a[_0x1d00e2(0xb5)]))return;const _0x4a5b4a=_0x326e1a[_0x1d00e2(0xc0)]?.[_0x1d00e2(0xce)]();if(!_0x4a5b4a)return;if(_0x33b554[_0x1d00e2(0xbb)]&&_0x4a5b4a!==_0x33b554[_0x1d00e2(0xbb)])return;const _0x4dc67e=_0x326e1a[_0x1d00e2(0xb5)]+':'+_0x4a5b4a,_0x19e9c5=_0x33b554['linkedPath']?[_0x33b554[_0x1d00e2(0xcc)]]:[],_0x549b0b=_0x3a6640['get'](_0x4dc67e);if(_0x549b0b){_0x33b554[_0x1d00e2(0xcd)]===_0x1d00e2(0xc5)&&(_0x549b0b[_0x1d00e2(0xcb)]=_0x3f12f1,_0x549b0b[_0x1d00e2(0xd2)]=_0x3f12f1,_0x549b0b[_0x1d00e2(0xb4)]=resolve(_0x3f12f1,SKILL_FILE),_0x549b0b[_0x1d00e2(0xbe)]=_0xf0e3ac);for(const _0x265212 of _0x19e9c5){!_0x549b0b[_0x1d00e2(0xbf)][_0x1d00e2(0xae)](_0x265212)&&_0x549b0b[_0x1d00e2(0xbf)][_0x1d00e2(0xbc)](_0x265212);}_0x549b0b[_0x1d00e2(0xbf)]['sort']();return;}_0x3a6640[_0x1d00e2(0xd4)](_0x4dc67e,{..._0x326e1a,'tags':Array[_0x1d00e2(0xb6)](_0x326e1a['tags'])?_0x326e1a['tags']:[],'scope':_0x326e1a['scope'],'source':_0x1d00e2(0xbd),'dir':_0x3f12f1,'cacheDir':_0x33b554['source']===_0x1d00e2(0xc5)?_0x3f12f1:undefined,'skillMdPath':resolve(_0x3f12f1,SKILL_FILE),'metadataPath':_0xf0e3ac,'linkedPaths':_0x19e9c5});}function compareLocalRuntimeSkills(_0x185aa9,_0x17ed88){const _0x5297ac=a142_0x4e30,_0x103336={'personal':0x0,'company':0x1,'builtin':0x2};return _0x103336[_0x185aa9[_0x5297ac(0xb5)]]-_0x103336[_0x17ed88[_0x5297ac(0xb5)]]||_0x185aa9['skillCode'][_0x5297ac(0xc2)](_0x17ed88[_0x5297ac(0xc0)])||_0x185aa9[_0x5297ac(0xcb)][_0x5297ac(0xc2)](_0x17ed88[_0x5297ac(0xcb)]);}