@lovrabet/lovrabet-cli 2.2.3 → 2.2.4-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.d.ts +2 -0
  36. package/lib/commands/notification/config-list.js +1 -0
  37. package/lib/commands/notification/index.d.ts +2 -0
  38. package/lib/commands/notification/index.js +1 -0
  39. package/lib/commands/notification/shared.d.ts +13 -0
  40. package/lib/commands/notification/shared.js +1 -0
  41. package/lib/commands/ocr/index.js +1 -1
  42. package/lib/commands/permit/dataset-get.d.ts +2 -0
  43. package/lib/commands/permit/dataset-get.js +1 -0
  44. package/lib/commands/permit/dataset-set.d.ts +2 -0
  45. package/lib/commands/permit/dataset-set.js +1 -0
  46. package/lib/commands/permit/index.d.ts +2 -0
  47. package/lib/commands/permit/index.js +1 -0
  48. package/lib/commands/permit/page-get.d.ts +2 -0
  49. package/lib/commands/permit/page-get.js +1 -0
  50. package/lib/commands/permit/page-set.d.ts +2 -0
  51. package/lib/commands/permit/page-set.js +1 -0
  52. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  53. package/lib/commands/permit/role-menus-set.js +1 -0
  54. package/lib/commands/permit/role-menus.d.ts +2 -0
  55. package/lib/commands/permit/role-menus.js +1 -0
  56. package/lib/commands/permit/shared.d.ts +52 -0
  57. package/lib/commands/permit/shared.js +1 -0
  58. package/lib/commands/personal-bff/index.js +1 -1
  59. package/lib/commands/registry.js +1 -1
  60. package/lib/commands/role/create.d.ts +2 -0
  61. package/lib/commands/role/create.js +1 -0
  62. package/lib/commands/role/delete.d.ts +2 -0
  63. package/lib/commands/role/delete.js +1 -0
  64. package/lib/commands/role/detail.d.ts +2 -0
  65. package/lib/commands/role/detail.js +1 -0
  66. package/lib/commands/role/index.d.ts +2 -0
  67. package/lib/commands/role/index.js +1 -0
  68. package/lib/commands/role/list.d.ts +2 -0
  69. package/lib/commands/role/list.js +1 -0
  70. package/lib/commands/role/shared.d.ts +33 -0
  71. package/lib/commands/role/shared.js +1 -0
  72. package/lib/commands/role/update.d.ts +2 -0
  73. package/lib/commands/role/update.js +1 -0
  74. package/lib/commands/role/user-add.d.ts +2 -0
  75. package/lib/commands/role/user-add.js +1 -0
  76. package/lib/commands/role/user-remove.d.ts +2 -0
  77. package/lib/commands/role/user-remove.js +1 -0
  78. package/lib/commands/schedule/index.js +1 -1
  79. package/lib/commands/schema.js +1 -1
  80. package/lib/commands/service/dynamic.js +1 -1
  81. package/lib/commands/service/function-name-adapter.js +1 -1
  82. package/lib/commands/service/index.js +1 -1
  83. package/lib/commands/service/registry.js +1 -1
  84. package/lib/commands/skill/commands/create.js +1 -1
  85. package/lib/commands/skill/commands/diagram.js +1 -1
  86. package/lib/commands/skill/commands/install.js +1 -1
  87. package/lib/commands/skill/commands/list.js +1 -1
  88. package/lib/commands/skill/commands/push.js +1 -1
  89. package/lib/commands/skill/commands/validate.js +1 -1
  90. package/lib/commands/skill/diagram.js +1 -1
  91. package/lib/commands/skill/flags.js +1 -1
  92. package/lib/commands/skill/index.js +1 -1
  93. package/lib/commands/skill/manifest-helpers.js +1 -1
  94. package/lib/commands/skill/push-execute.js +1 -1
  95. package/lib/commands/skill/push-flow-helpers.js +1 -1
  96. package/lib/commands/skill/push-retarget.js +1 -1
  97. package/lib/commands/skill/scopes.js +1 -1
  98. package/lib/commands/skill/summary.js +1 -1
  99. package/lib/commands/skill/templates.js +1 -1
  100. package/lib/commands/skill/validate.js +1 -1
  101. package/lib/commands/sql/detail.js +1 -1
  102. package/lib/commands/sql/exec.js +1 -1
  103. package/lib/commands/sql/index.js +1 -1
  104. package/lib/commands/update.js +1 -1
  105. package/lib/commands/user-account/bind.js +1 -1
  106. package/lib/commands/user-account/index.js +1 -1
  107. package/lib/commands/workspace/index.js +1 -1
  108. package/lib/config/schema.js +1 -1
  109. package/lib/constant/app.js +1 -1
  110. package/lib/constant/auth-mode.js +1 -1
  111. package/lib/constant/cli.js +1 -1
  112. package/lib/constant/defaults.js +1 -1
  113. package/lib/constant/distribution.js +1 -1
  114. package/lib/constant/domain.js +1 -1
  115. package/lib/constant/env.js +1 -1
  116. package/lib/constant/output.js +1 -1
  117. package/lib/constant/product.js +1 -1
  118. package/lib/constant/risk.js +1 -1
  119. package/lib/constant/url.js +1 -1
  120. package/lib/context.js +1 -1
  121. package/lib/core/api-client.d.ts +161 -0
  122. package/lib/core/api-client.js +1 -1
  123. package/lib/core/db-resolver.js +1 -1
  124. package/lib/core/sdk-client.js +1 -1
  125. package/lib/errors.js +1 -1
  126. package/lib/framework/build-all-flags.js +1 -1
  127. package/lib/framework/dryrun.js +1 -1
  128. package/lib/framework/flags.js +1 -1
  129. package/lib/framework/help.js +1 -1
  130. package/lib/framework/index.js +1 -1
  131. package/lib/framework/output.js +1 -1
  132. package/lib/framework/preparse.js +1 -1
  133. package/lib/framework/rate-limit.js +1 -1
  134. package/lib/framework/raw-flags.js +1 -1
  135. package/lib/framework/response.js +1 -1
  136. package/lib/framework/runner-confirmation.js +1 -1
  137. package/lib/framework/runner-error.js +1 -1
  138. package/lib/framework/runner.js +1 -1
  139. package/lib/framework/schema-export.js +1 -1
  140. package/lib/framework/service-order.js +1 -1
  141. package/lib/framework/types.js +1 -1
  142. package/lib/generated/build-info.d.ts +4 -4
  143. package/lib/generated/build-info.js +1 -1
  144. package/lib/help.js +1 -1
  145. package/lib/postinstall.js +1 -1
  146. package/lib/runtime/confirmation.js +1 -1
  147. package/lib/runtime/event.js +1 -1
  148. package/lib/runtime/index.js +1 -1
  149. package/lib/runtime/queue.js +1 -1
  150. package/lib/runtime/resolve.js +1 -1
  151. package/lib/skills/builtin-skill.js +1 -1
  152. package/lib/skills/npx-skills-add.js +1 -1
  153. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  154. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  155. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  156. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  157. package/lib/skills/runtime-skill-sync/links.js +1 -1
  158. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  159. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  160. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  161. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  162. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  163. package/lib/skills/runtime-skill-sync/push.js +1 -1
  164. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  165. package/lib/skills/runtime-skill-sync/types.d.ts +1 -0
  166. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  167. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  168. package/lib/skills/runtime-skill-sync.js +1 -1
  169. package/lib/skills/skill-presence.js +1 -1
  170. package/lib/utils/apply-jq-filter.js +1 -1
  171. package/lib/utils/logger.js +1 -1
  172. package/lib/utils/lossless-json.js +1 -1
  173. package/lib/utils/params.js +1 -1
  174. package/lib/utils/platform.js +1 -1
  175. package/lib/utils/update-notice.js +1 -1
  176. package/lib/utils/version.js +1 -1
  177. package/lib/utils/write-cli-side-channel.js +1 -1
  178. package/package.json +1 -1
  179. package/skills/lovrabet/SKILL.md +20 -7
  180. package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
  181. package/skills/lovrabet/references/lovrabet-auth.md +1 -5
  182. package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
  183. package/skills/lovrabet/references/lovrabet-skill-authoring.md +5 -4
  184. package/skills/lovrabet.manifest.json +5 -3
@@ -1 +1 @@
1
- (function(_0x4a5b8b,_0x417f28){const _0x25c1d8=a54_0x5689,_0xb41b82=_0x4a5b8b();while(!![]){try{const _0xdf7490=-parseInt(_0x25c1d8(0xe6))/0x1+-parseInt(_0x25c1d8(0xed))/0x2*(-parseInt(_0x25c1d8(0xec))/0x3)+parseInt(_0x25c1d8(0x10e))/0x4*(-parseInt(_0x25c1d8(0xf3))/0x5)+parseInt(_0x25c1d8(0xfa))/0x6+-parseInt(_0x25c1d8(0xf4))/0x7+-parseInt(_0x25c1d8(0xf2))/0x8*(parseInt(_0x25c1d8(0xf1))/0x9)+parseInt(_0x25c1d8(0x104))/0xa;if(_0xdf7490===_0x417f28)break;else _0xb41b82['push'](_0xb41b82['shift']());}catch(_0x407a74){_0xb41b82['push'](_0xb41b82['shift']());}}}(a54_0x11e0,0xba41c));import{CliErrors}from'../../errors.js';function a54_0x5689(_0x35fc8c,_0x37470e){_0x35fc8c=_0x35fc8c-0xe2;const _0x11e069=a54_0x11e0();let _0x5689e5=_0x11e069[_0x35fc8c];return _0x5689e5;}export function resolvePushScope(_0x45ea1d){const _0x41576b=a54_0x5689,_0x2b27e4=_0x45ea1d['str']('scope')||_0x41576b(0xf9);if(_0x2b27e4===_0x41576b(0xf9)||_0x2b27e4===_0x41576b(0xe3))return _0x2b27e4;throw CliErrors[_0x41576b(0x101)](_0x41576b(0xf5)+_0x2b27e4+'\x22.');}export function allowRetargetArgs(_0x3d281e){return _0x3d281e?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x503f3d=a54_0x5689;return{'targetScope':_0x503f3d(0xe3),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x460af2={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x460af2};}export function remotePersonalReadOptions(_0x18e6f3,_0x568b0a={}){return{'ignoreInvalidMetadata':!![],..._0x18e6f3?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x568b0a};}export function throwIfBuiltinPushTarget(_0x5d8276){const _0x4bab7d=a54_0x5689;if(_0x5d8276?.[_0x4bab7d(0xfb)]!=='builtin')return;throw CliErrors[_0x4bab7d(0x101)](_0x4bab7d(0xff)+(_0x5d8276[_0x4bab7d(0x105)]??_0x4bab7d(0x10c))+_0x4bab7d(0xe5),_0x4bab7d(0xe7));}export function throwIfPublishValidationFailed(_0x40beea,_0x4609d4,_0x580d1f){const _0x460a0c=a54_0x5689;if(_0x580d1f[_0x460a0c(0xfd)][_0x460a0c(0xfc)]===0x0&&(_0x580d1f[_0x460a0c(0x110)]||_0x580d1f[_0x460a0c(0xe9)][_0x460a0c(0xfc)]>0x0))return;const _0xa499e5=_0x580d1f['errors'][_0x460a0c(0xfc)]>0x0?_0x580d1f[_0x460a0c(0xfd)][_0x460a0c(0xf6)](';\x20'):_0x460a0c(0x10b),_0x5031eb=_0x40beea==='company'?'Company':_0x460a0c(0x109);throw CliErrors['validation'](_0x5031eb+_0x460a0c(0xea)+_0x4609d4+'.',_0xa499e5);}function a54_0x11e0(){const _0xad3af9=['2710eUQodQ','10576454cyhhot','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','join','skill-metadata-appcode-retargeted','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','personal','5568726FhNakm','scope','length','errors','publishInput','Builtin\x20Skill\x20','remote','validation','Local\x20Skill\x20metadata\x20appCode\x20','appCode','46444320KAaHbD','skillCode','different','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','warning','Personal','Warnings:\x20','SkillHub\x20validation\x20returned\x20invalid.','(unknown)','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','9092vmRrRE','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','valid','downloadRuntimeSkillPackage','not-applicable','company','version','\x20cannot\x20be\x20pushed.','1408866VnbCVv','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','files','warnings','\x20Skill\x20push\x20validation\x20failed\x20for\x20','content','57xmjMgm','3460TLCTMY','identical','verifyRuntimeSkillBundle','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','2043PABnor','24344uRuass'];a54_0x11e0=function(){return _0xad3af9;};return a54_0x11e0();}export function throwIfUnconfirmedPublishWarnings(_0x56c19f,_0x20a462,_0x27db60,_0x55213f){const _0x348ef7=a54_0x5689;if(_0x27db60[_0x348ef7(0xfc)]===0x0||_0x55213f)return;const _0x6f5836=_0x56c19f===_0x348ef7(0xe3)?'Company':_0x348ef7(0x109);throw CliErrors[_0x348ef7(0x101)](_0x6f5836+_0x348ef7(0xf0)+_0x20a462+'.',['Review\x20each\x20warning\x20before\x20continuing.',_0x348ef7(0x10f),_0x348ef7(0xf8),_0x348ef7(0x10a)+_0x27db60[_0x348ef7(0xf6)](';\x20')]['join']('\x20'));}export function buildRetargetWarning(_0x5521bb,_0x28c2d6){const _0x3d2ad6=a54_0x5689;if(!_0x5521bb?.[_0x3d2ad6(0x103)]||_0x5521bb['appCode']===_0x28c2d6)return[];return[{'level':_0x3d2ad6(0x108),'ruleId':_0x3d2ad6(0xf7),'file':'lovrabet.skill.json','message':_0x3d2ad6(0x102)+_0x5521bb['appCode']+_0x3d2ad6(0x107)+_0x28c2d6+'\x20after\x20successful\x20push.','suggestion':_0x3d2ad6(0x10d)}];}export async function runRemoteContentPreflight(_0x177e3d){const _0x5e3cbd=a54_0x5689;if(!_0x177e3d[_0x5e3cbd(0x100)]||_0x177e3d[_0x5e3cbd(0x100)][_0x5e3cbd(0xfb)]!==_0x177e3d['scope']||!_0x177e3d['publishInput'][_0x5e3cbd(0xe8)])return{'status':_0x5e3cbd(0xe2)};const _0x54f86c=_0x177e3d[_0x5e3cbd(0x100)][_0x5e3cbd(0x105)]||_0x177e3d['skillCode'];if(!_0x54f86c)return{'status':_0x5e3cbd(0xe2)};const _0x1c7f20=await _0x177e3d[_0x5e3cbd(0x111)](_0x177e3d[_0x5e3cbd(0xfb)],_0x54f86c,_0x177e3d[_0x5e3cbd(0x103)],_0x177e3d[_0x5e3cbd(0x100)][_0x5e3cbd(0xe4)]);try{_0x177e3d[_0x5e3cbd(0xef)](_0x177e3d[_0x5e3cbd(0xfe)][_0x5e3cbd(0xe8)],_0x1c7f20);}catch{return{'status':_0x5e3cbd(0x106)};}return{'status':_0x5e3cbd(0xee),'savedSkill':{..._0x177e3d[_0x5e3cbd(0x100)],'content':_0x177e3d[_0x5e3cbd(0xfe)][_0x5e3cbd(0xeb)],'files':_0x177e3d['publishInput']['files']}};}
1
+ (function(_0x227c67,_0xab20ed){const _0x4a3d23=a74_0x1c63,_0x24bd0c=_0x227c67();while(!![]){try{const _0x277ebf=parseInt(_0x4a3d23(0x1c8))/0x1*(parseInt(_0x4a3d23(0x1ed))/0x2)+-parseInt(_0x4a3d23(0x1cd))/0x3+-parseInt(_0x4a3d23(0x1eb))/0x4+parseInt(_0x4a3d23(0x1c9))/0x5*(parseInt(_0x4a3d23(0x1e6))/0x6)+-parseInt(_0x4a3d23(0x1d5))/0x7*(parseInt(_0x4a3d23(0x1db))/0x8)+-parseInt(_0x4a3d23(0x1cb))/0x9*(-parseInt(_0x4a3d23(0x1d1))/0xa)+parseInt(_0x4a3d23(0x1d7))/0xb;if(_0x277ebf===_0xab20ed)break;else _0x24bd0c['push'](_0x24bd0c['shift']());}catch(_0x2eca5e){_0x24bd0c['push'](_0x24bd0c['shift']());}}}(a74_0x2cfc,0x2656e));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x3c4ce0){const _0x4fd4c7=a74_0x1c63,_0x282eb9=_0x3c4ce0[_0x4fd4c7(0x1f4)](_0x4fd4c7(0x1e5))||_0x4fd4c7(0x1e2);if(_0x282eb9==='personal'||_0x282eb9===_0x4fd4c7(0x1cf))return _0x282eb9;throw CliErrors['validation']('skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22'+_0x282eb9+'\x22.');}function a74_0x1c63(_0x2b641b,_0x3fe6b7){_0x2b641b=_0x2b641b-0x1c6;const _0x2cfc69=a74_0x2cfc();let _0x1c639b=_0x2cfc69[_0x2b641b];return _0x1c639b;}export function allowRetargetArgs(_0x55d6dd){return _0x55d6dd?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}function a74_0x2cfc(){const _0x94e70b=['company','skillCode','10aFchSr','verifyRuntimeSkillBundle','skill-metadata-appcode-retargeted','Review\x20each\x20warning\x20before\x20continuing.','232239vNCWmA','\x20Skill\x20push\x20validation\x20failed\x20for\x20','4020126EgBSOr','warnings','lovrabet.skill.json','join','24omZFxM','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','version','warning','Company','publishInput','personal','appCode','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','scope','33486xhuEey','files','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','errors','downloadRuntimeSkillPackage','664736cybVef','\x20after\x20successful\x20push.','223618zEhmis','Builtin\x20Skill\x20','identical','content','Warnings:\x20','\x20cannot\x20be\x20pushed.','Personal','str','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','validation','not-applicable','(unknown)','1CkTgwY','200PctxCv','valid','245988DPnlpZ','remote','915282vhCXwt','length'];a74_0x2cfc=function(){return _0x94e70b;};return a74_0x2cfc();}export function remoteMissingCompanyReadOptions(){const _0xffab53=a74_0x1c63;return{'targetScope':_0xffab53(0x1cf),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x437df8={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x437df8};}export function remotePersonalReadOptions(_0x549678,_0x1ed8ae={}){return{'ignoreInvalidMetadata':!![],..._0x549678?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x1ed8ae};}export function throwIfBuiltinPushTarget(_0x56a8be){const _0x1f5f5b=a74_0x1c63;if(_0x56a8be?.[_0x1f5f5b(0x1e5)]!=='builtin')return;throw CliErrors['validation'](_0x1f5f5b(0x1ee)+(_0x56a8be['skillCode']??_0x1f5f5b(0x1c7))+_0x1f5f5b(0x1f2),_0x1f5f5b(0x1dc));}export function throwIfPublishValidationFailed(_0x2b8a68,_0x148daf,_0xf402a3){const _0x56cc43=a74_0x1c63;if(_0xf402a3[_0x56cc43(0x1e9)]['length']===0x0&&(_0xf402a3[_0x56cc43(0x1ca)]||_0xf402a3[_0x56cc43(0x1d8)][_0x56cc43(0x1ce)]>0x0))return;const _0x45e3b6=_0xf402a3[_0x56cc43(0x1e9)][_0x56cc43(0x1ce)]>0x0?_0xf402a3[_0x56cc43(0x1e9)]['join'](';\x20'):'SkillHub\x20validation\x20returned\x20invalid.',_0x2954b0=_0x2b8a68==='company'?_0x56cc43(0x1e0):_0x56cc43(0x1f3);throw CliErrors[_0x56cc43(0x1f6)](_0x2954b0+_0x56cc43(0x1d6)+_0x148daf+'.',_0x45e3b6);}export function throwIfUnconfirmedPublishWarnings(_0xdc9fb5,_0x2b175e,_0x2bdb9e,_0x3e25ee){const _0x423bd0=a74_0x1c63;if(_0x2bdb9e[_0x423bd0(0x1ce)]===0x0||_0x3e25ee)return;const _0x51c6fa=_0xdc9fb5===_0x423bd0(0x1cf)?'Company':_0x423bd0(0x1f3);throw CliErrors['validation'](_0x51c6fa+'\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20'+_0x2b175e+'.',[_0x423bd0(0x1d4),_0x423bd0(0x1e8),_0x423bd0(0x1e4),_0x423bd0(0x1f1)+_0x2bdb9e['join'](';\x20')][_0x423bd0(0x1da)]('\x20'));}export function buildRetargetWarning(_0x466f0f,_0x244688){const _0x3a5559=a74_0x1c63;if(!_0x466f0f?.[_0x3a5559(0x1e3)]||_0x466f0f[_0x3a5559(0x1e3)]===_0x244688)return[];return[{'level':_0x3a5559(0x1df),'ruleId':_0x3a5559(0x1d3),'file':_0x3a5559(0x1d9),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x466f0f[_0x3a5559(0x1e3)]+_0x3a5559(0x1dd)+_0x244688+_0x3a5559(0x1ec),'suggestion':_0x3a5559(0x1f5)}];}export async function runRemoteContentPreflight(_0x58c3d9){const _0x32fbad=a74_0x1c63;if(!_0x58c3d9[_0x32fbad(0x1cc)]||_0x58c3d9[_0x32fbad(0x1cc)][_0x32fbad(0x1e5)]!==_0x58c3d9[_0x32fbad(0x1e5)]||!_0x58c3d9['publishInput'][_0x32fbad(0x1e7)])return{'status':_0x32fbad(0x1c6)};const _0xa79ff=_0x58c3d9[_0x32fbad(0x1cc)][_0x32fbad(0x1d0)]||_0x58c3d9[_0x32fbad(0x1d0)];if(!_0xa79ff)return{'status':_0x32fbad(0x1c6)};const _0xce06d8=await _0x58c3d9[_0x32fbad(0x1ea)](_0x58c3d9['scope'],_0xa79ff,_0x58c3d9[_0x32fbad(0x1e3)],_0x58c3d9['remote'][_0x32fbad(0x1de)]);try{_0x58c3d9[_0x32fbad(0x1d2)](_0x58c3d9[_0x32fbad(0x1e1)][_0x32fbad(0x1e7)],_0xce06d8);}catch{return{'status':'different'};}return{'status':_0x32fbad(0x1ef),'savedSkill':{..._0x58c3d9[_0x32fbad(0x1cc)],'content':_0x58c3d9['publishInput'][_0x32fbad(0x1f0)],'files':_0x58c3d9['publishInput']['files']}};}
@@ -1 +1 @@
1
- function a55_0x1e4b(_0x194116,_0x53b989){_0x194116=_0x194116-0xca;const _0x106c03=a55_0x106c();let _0x1e4b9a=_0x106c03[_0x194116];return _0x1e4b9a;}(function(_0x546751,_0x330bae){const _0x191e97=a55_0x1e4b,_0x9032ef=_0x546751();while(!![]){try{const _0x2e3cb8=-parseInt(_0x191e97(0xd6))/0x1+parseInt(_0x191e97(0xdc))/0x2+-parseInt(_0x191e97(0xd2))/0x3*(-parseInt(_0x191e97(0xcc))/0x4)+-parseInt(_0x191e97(0xdf))/0x5*(parseInt(_0x191e97(0xcb))/0x6)+-parseInt(_0x191e97(0xd9))/0x7+parseInt(_0x191e97(0xd5))/0x8+-parseInt(_0x191e97(0xd0))/0x9;if(_0x2e3cb8===_0x330bae)break;else _0x9032ef['push'](_0x9032ef['shift']());}catch(_0x45d8bd){_0x9032ef['push'](_0x9032ef['shift']());}}}(a55_0x106c,0x48a9d));function a55_0x106c(){const _0x5c0761=['tags','appCode','isArray','2299680HxBXGT','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','1413297bCjumN','skillName','lovrabet.skill.json','2207408CmRENd','470453ZMcHmR','description','skill-metadata-appcode-retargeted','450513SAPKjg','Local\x20Skill\x20metadata\x20appCode\x20','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','827984JuZbtg','sourceSessionId','preferInputSkillName','20VSwOiP','warning','109584tvNaYc','4IKPPkb'];a55_0x106c=function(){return _0x5c0761;};return a55_0x106c();}export function withRetargetExistingMetadata(_0x291fa3,_0x54d3c3,_0x1aefc4={}){const _0x416b70=a55_0x1e4b,_0x208ae1=_0x1aefc4[_0x416b70(0xde)]?_0x291fa3['skillName']??_0x54d3c3[_0x416b70(0xd3)]:_0x54d3c3['skillName']??_0x291fa3['skillName'];return{..._0x291fa3,'skillName':_0x208ae1,'description':_0x54d3c3[_0x416b70(0xd7)]??_0x291fa3[_0x416b70(0xd7)],'tags':Array[_0x416b70(0xcf)](_0x54d3c3['tags'])?_0x54d3c3[_0x416b70(0xcd)]:_0x291fa3[_0x416b70(0xcd)],'version':_0x54d3c3['version']??_0x291fa3['version'],'sourceSessionId':_0x54d3c3[_0x416b70(0xdd)]??_0x291fa3[_0x416b70(0xdd)]};}export function buildRetargetWarning(_0x13c7e6,_0x5debbc){const _0x17ec71=a55_0x1e4b;if(!_0x13c7e6?.['appCode']||_0x13c7e6[_0x17ec71(0xce)]===_0x5debbc)return[];return[{'level':_0x17ec71(0xca),'ruleId':_0x17ec71(0xd8),'file':_0x17ec71(0xd4),'message':_0x17ec71(0xda)+_0x13c7e6[_0x17ec71(0xce)]+_0x17ec71(0xdb)+_0x5debbc+'\x20after\x20successful\x20push.','suggestion':_0x17ec71(0xd1)}];}
1
+ function a75_0xb0ec(){const _0x29d041=['627655SgoLaz','preferInputSkillName','description','828672wmgFfD','156bUiBQN','148114YCVTOq','22912668ELiCay','skillName','sourceSessionId','skill-metadata-appcode-retargeted','appCode','36561YDfIHZ','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','4lZLSgG','isArray','warning','2426010AIRaqA','tags','4283456iRwSYh'];a75_0xb0ec=function(){return _0x29d041;};return a75_0xb0ec();}(function(_0x18ef88,_0x2c7545){const _0x4ecd2f=a75_0x3695,_0x1be706=_0x18ef88();while(!![]){try{const _0x5b5075=-parseInt(_0x4ecd2f(0x136))/0x1+-parseInt(_0x4ecd2f(0x128))/0x2+-parseInt(_0x4ecd2f(0x126))/0x3*(parseInt(_0x4ecd2f(0x130))/0x4)+-parseInt(_0x4ecd2f(0x133))/0x5+-parseInt(_0x4ecd2f(0x127))/0x6*(parseInt(_0x4ecd2f(0x12e))/0x7)+-parseInt(_0x4ecd2f(0x135))/0x8+parseInt(_0x4ecd2f(0x129))/0x9;if(_0x5b5075===_0x2c7545)break;else _0x1be706['push'](_0x1be706['shift']());}catch(_0x368898){_0x1be706['push'](_0x1be706['shift']());}}}(a75_0xb0ec,0x6475c));export function withRetargetExistingMetadata(_0x322387,_0x4587ad,_0x2d628e={}){const _0x21404f=a75_0x3695,_0x57313d=_0x2d628e[_0x21404f(0x137)]?_0x322387['skillName']??_0x4587ad[_0x21404f(0x12a)]:_0x4587ad['skillName']??_0x322387[_0x21404f(0x12a)];return{..._0x322387,'skillName':_0x57313d,'description':_0x4587ad[_0x21404f(0x125)]??_0x322387[_0x21404f(0x125)],'tags':Array[_0x21404f(0x131)](_0x4587ad['tags'])?_0x4587ad[_0x21404f(0x134)]:_0x322387['tags'],'version':_0x4587ad['version']??_0x322387['version'],'sourceSessionId':_0x4587ad[_0x21404f(0x12b)]??_0x322387[_0x21404f(0x12b)]};}function a75_0x3695(_0x4b486d,_0x44ccfc){_0x4b486d=_0x4b486d-0x125;const _0xb0ec6f=a75_0xb0ec();let _0x3695f3=_0xb0ec6f[_0x4b486d];return _0x3695f3;}export function buildRetargetWarning(_0x5242aa,_0x123358){const _0x2b8eb2=a75_0x3695;if(!_0x5242aa?.[_0x2b8eb2(0x12d)]||_0x5242aa[_0x2b8eb2(0x12d)]===_0x123358)return[];return[{'level':_0x2b8eb2(0x132),'ruleId':_0x2b8eb2(0x12c),'file':'lovrabet.skill.json','message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x5242aa['appCode']+'\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20'+_0x123358+'\x20after\x20successful\x20push.','suggestion':_0x2b8eb2(0x12f)}];}
@@ -1 +1 @@
1
- (function(_0x3fe4d0,_0x5cfe23){const _0x51de93=a56_0x1b2c,_0x5e5899=_0x3fe4d0();while(!![]){try{const _0x38e2c1=parseInt(_0x51de93(0xd6))/0x1+parseInt(_0x51de93(0xdc))/0x2+-parseInt(_0x51de93(0xdd))/0x3*(parseInt(_0x51de93(0xd5))/0x4)+-parseInt(_0x51de93(0xd4))/0x5*(parseInt(_0x51de93(0xdb))/0x6)+parseInt(_0x51de93(0xd8))/0x7*(parseInt(_0x51de93(0xdf))/0x8)+-parseInt(_0x51de93(0xda))/0x9*(-parseInt(_0x51de93(0xd1))/0xa)+-parseInt(_0x51de93(0xd0))/0xb;if(_0x38e2c1===_0x5cfe23)break;else _0x5e5899['push'](_0x5e5899['shift']());}catch(_0x4e43e0){_0x5e5899['push'](_0x5e5899['shift']());}}}(a56_0x5399,0x3481d));import{CliErrors}from'../../errors.js';function a56_0x1b2c(_0xd6a563,_0x4bae15){_0xd6a563=_0xd6a563-0xcf;const _0x5399c9=a56_0x5399();let _0x1b2c9e=_0x5399c9[_0xd6a563];return _0x1b2c9e;}export function normalizeSyncScopes(_0x38aea5){const _0x222266=a56_0x1b2c,_0x40775b=_0x38aea5[_0x222266(0xd7)]();if(!_0x40775b||_0x40775b===_0x222266(0xd9))return['personal','company'];if(_0x40775b===_0x222266(0xcf)||_0x40775b===_0x222266(0xde))return[_0x40775b];throw CliErrors[_0x222266(0xd3)](_0x222266(0xd2)+_0x38aea5);}export function normalizeListScope(_0x1dd279){const _0x316399=a56_0x1b2c,_0x483347=_0x1dd279[_0x316399(0xd7)]();if(!_0x483347)return _0x316399(0xd9);if(_0x483347==='personal'||_0x483347===_0x316399(0xde)||_0x483347===_0x316399(0xd9))return _0x483347;throw CliErrors[_0x316399(0xd3)]('Unsupported\x20Skill\x20list\x20scope:\x20'+_0x1dd279);}export function shouldListScope(_0x1f96d6,_0x276924){if(_0x1f96d6==='all')return!![];return _0x1f96d6===_0x276924;}export function listScopeToRuntimeScopes(_0x44bc1d){const _0x2daabf=a56_0x1b2c;if(_0x44bc1d===_0x2daabf(0xd9))return[_0x2daabf(0xcf),'company'];return[_0x44bc1d===_0x2daabf(0xde)?_0x2daabf(0xde):_0x44bc1d];}function a56_0x5399(){const _0x285520=['219825wuKkIS','8BLFwxb','51431JsLpHR','trim','4445dPfuSu','all','1062zmCHVI','6TkiAzM','291350UkqBsF','365385CoDaoM','company','2248jZJSXi','personal','1776995VCfQAc','24460lXVmOq','Unsupported\x20Skill\x20sync\x20scope:\x20','validation'];a56_0x5399=function(){return _0x285520;};return a56_0x5399();}export function listScopeToRemoteScope(_0x15cdc7){return _0x15cdc7;}
1
+ (function(_0x376006,_0x429686){const _0x46509e=a76_0x3eb8,_0x1a63aa=_0x376006();while(!![]){try{const _0x139a76=parseInt(_0x46509e(0x140))/0x1*(-parseInt(_0x46509e(0x14c))/0x2)+-parseInt(_0x46509e(0x149))/0x3*(-parseInt(_0x46509e(0x143))/0x4)+-parseInt(_0x46509e(0x144))/0x5+-parseInt(_0x46509e(0x141))/0x6+-parseInt(_0x46509e(0x147))/0x7*(parseInt(_0x46509e(0x13e))/0x8)+-parseInt(_0x46509e(0x142))/0x9*(-parseInt(_0x46509e(0x14d))/0xa)+parseInt(_0x46509e(0x14e))/0xb*(parseInt(_0x46509e(0x148))/0xc);if(_0x139a76===_0x429686)break;else _0x1a63aa['push'](_0x1a63aa['shift']());}catch(_0x1e07fe){_0x1a63aa['push'](_0x1a63aa['shift']());}}}(a76_0x63b5,0x3c144));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x41b544){const _0x20adac=a76_0x3eb8,_0x53605f=_0x41b544['trim']();if(!_0x53605f||_0x53605f===_0x20adac(0x14b))return[_0x20adac(0x145),_0x20adac(0x14a)];if(_0x53605f===_0x20adac(0x145)||_0x53605f===_0x20adac(0x14a))return[_0x53605f];throw CliErrors['validation'](_0x20adac(0x146)+_0x41b544);}function a76_0x63b5(){const _0x56c584=['253wzkomb','1768IdJxum','trim','24239DqaYig','2321064SYtGjN','18qwGDJr','96RjXznn','430900uwyDTt','personal','Unsupported\x20Skill\x20sync\x20scope:\x20','11991XCWuPn','422292pazYTn','30777kzeEtY','company','all','20NxCwnl','1422310bjaIYp'];a76_0x63b5=function(){return _0x56c584;};return a76_0x63b5();}function a76_0x3eb8(_0x50881f,_0x1009ba){_0x50881f=_0x50881f-0x13e;const _0x63b5f9=a76_0x63b5();let _0x3eb831=_0x63b5f9[_0x50881f];return _0x3eb831;}export function normalizeListScope(_0x34f588){const _0x28327d=a76_0x3eb8,_0x5ad38b=_0x34f588[_0x28327d(0x13f)]();if(!_0x5ad38b)return'all';if(_0x5ad38b===_0x28327d(0x145)||_0x5ad38b===_0x28327d(0x14a)||_0x5ad38b===_0x28327d(0x14b))return _0x5ad38b;throw CliErrors['validation']('Unsupported\x20Skill\x20list\x20scope:\x20'+_0x34f588);}export function shouldListScope(_0x4e6efc,_0x481432){const _0x10bf7e=a76_0x3eb8;if(_0x4e6efc===_0x10bf7e(0x14b))return!![];return _0x4e6efc===_0x481432;}export function listScopeToRuntimeScopes(_0x1987eb){const _0x477300=a76_0x3eb8;if(_0x1987eb===_0x477300(0x14b))return[_0x477300(0x145),_0x477300(0x14a)];return[_0x1987eb===_0x477300(0x14a)?_0x477300(0x14a):_0x1987eb];}export function listScopeToRemoteScope(_0x3df71d){return _0x3df71d;}
@@ -1 +1 @@
1
- function a57_0xa521(){var _0x8f445a=['357Zzljvd','skillCode','29687JNVmGT','contentHash','readonly','metadataPath','10615MvrDxB','version','1415kzFlON','scope','57VIcHWQ','skillName','13476KcltUN','552792evKTjM','1442835fwmQEJ','pulledAt','skillMdPath','928QIxzwL','cacheDir','10WvjzSp','47882UINTWE','tags','6568zLZhii','treeHash','appCode'];a57_0xa521=function(){return _0x8f445a;};return a57_0xa521();}(function(_0x5f18e7,_0x8bd35){var _0x302f69=a57_0x96bc,_0xe059da=_0x5f18e7();while(!![]){try{var _0x3525e4=parseInt(_0x302f69(0x147))/0x1+parseInt(_0x302f69(0x15b))/0x2*(parseInt(_0x302f69(0x151))/0x3)+-parseInt(_0x302f69(0x15d))/0x4*(parseInt(_0x302f69(0x14f))/0x5)+-parseInt(_0x302f69(0x154))/0x6+parseInt(_0x302f69(0x149))/0x7*(-parseInt(_0x302f69(0x158))/0x8)+parseInt(_0x302f69(0x155))/0x9*(-parseInt(_0x302f69(0x15a))/0xa)+parseInt(_0x302f69(0x14d))/0xb*(parseInt(_0x302f69(0x153))/0xc);if(_0x3525e4===_0x8bd35)break;else _0xe059da['push'](_0xe059da['shift']());}catch(_0x1d4b42){_0xe059da['push'](_0xe059da['shift']());}}}(a57_0xa521,0x50872));function a57_0x96bc(_0x2a65f2,_0xa622bf){_0x2a65f2=_0x2a65f2-0x146;var _0xa5214f=a57_0xa521();var _0x96bca=_0xa5214f[_0x2a65f2];return _0x96bca;}export function summarizeRuntimeSkill(_0x164fa1){var _0xc07d9b=a57_0x96bc;return{'id':_0x164fa1['id'],'skillCode':_0x164fa1['skillCode'],'skillName':_0x164fa1[_0xc07d9b(0x152)],'scope':_0x164fa1[_0xc07d9b(0x150)],'version':_0x164fa1[_0xc07d9b(0x14e)],'readonly':_0x164fa1[_0xc07d9b(0x14b)]};}export function summarizeLocalRuntimeSkill(_0x94c4c7){var _0x1736c2=a57_0x96bc;return{'id':_0x94c4c7['id'],'skillCode':_0x94c4c7[_0x1736c2(0x148)],'skillName':_0x94c4c7[_0x1736c2(0x152)],'scope':_0x94c4c7[_0x1736c2(0x150)],'appCode':_0x94c4c7[_0x1736c2(0x146)],'version':_0x94c4c7[_0x1736c2(0x14e)],'status':_0x94c4c7['status'],'readonly':_0x94c4c7[_0x1736c2(0x14b)],'tags':_0x94c4c7[_0x1736c2(0x15c)],'dir':_0x94c4c7['dir'],'cacheDir':_0x94c4c7[_0x1736c2(0x159)],'skillMdPath':_0x94c4c7[_0x1736c2(0x157)],'metadataPath':_0x94c4c7[_0x1736c2(0x14c)],'linkedPaths':_0x94c4c7['linkedPaths'],'contentHash':_0x94c4c7[_0x1736c2(0x14a)],'treeHash':_0x94c4c7[_0x1736c2(0x15e)],'pulledAt':_0x94c4c7[_0x1736c2(0x156)]};}
1
+ function a77_0x4c49(){var _0x296eba=['786rkJITB','appCode','skillName','readonly','skillCode','7287YpfZJa','tags','pulledAt','scope','version','8730XCQwZt','25OrvaTI','380882VLnhbD','7760KUYwjA','4965994uUqQaY','skillMdPath','linkedPaths','contentHash','315004ACniZZ','cacheDir','105jiZlqG','status','251202WKuoZP','3421440YQrClW','treeHash'];a77_0x4c49=function(){return _0x296eba;};return a77_0x4c49();}function a77_0x1c71(_0x11bd15,_0x156984){_0x11bd15=_0x11bd15-0x65;var _0x4c4941=a77_0x4c49();var _0x1c71cf=_0x4c4941[_0x11bd15];return _0x1c71cf;}(function(_0xdf3a88,_0x1dee18){var _0x1cdc34=a77_0x1c71,_0x2f790c=_0xdf3a88();while(!![]){try{var _0x30aa01=-parseInt(_0x1cdc34(0x7c))/0x1+parseInt(_0x1cdc34(0x70))/0x2*(parseInt(_0x1cdc34(0x75))/0x3)+parseInt(_0x1cdc34(0x69))/0x4*(parseInt(_0x1cdc34(0x7b))/0x5)+-parseInt(_0x1cdc34(0x6d))/0x6*(parseInt(_0x1cdc34(0x6b))/0x7)+parseInt(_0x1cdc34(0x7d))/0x8*(parseInt(_0x1cdc34(0x7a))/0x9)+-parseInt(_0x1cdc34(0x6e))/0xa+-parseInt(_0x1cdc34(0x65))/0xb;if(_0x30aa01===_0x1dee18)break;else _0x2f790c['push'](_0x2f790c['shift']());}catch(_0x520872){_0x2f790c['push'](_0x2f790c['shift']());}}}(a77_0x4c49,0x76d6f));export function summarizeRuntimeSkill(_0x2b43db){var _0xefa439=a77_0x1c71;return{'id':_0x2b43db['id'],'skillCode':_0x2b43db['skillCode'],'skillName':_0x2b43db[_0xefa439(0x72)],'scope':_0x2b43db[_0xefa439(0x78)],'version':_0x2b43db[_0xefa439(0x79)],'readonly':_0x2b43db[_0xefa439(0x73)]};}export function summarizeLocalRuntimeSkill(_0x2774d2){var _0x109601=a77_0x1c71;return{'id':_0x2774d2['id'],'skillCode':_0x2774d2[_0x109601(0x74)],'skillName':_0x2774d2['skillName'],'scope':_0x2774d2[_0x109601(0x78)],'appCode':_0x2774d2[_0x109601(0x71)],'version':_0x2774d2[_0x109601(0x79)],'status':_0x2774d2[_0x109601(0x6c)],'readonly':_0x2774d2['readonly'],'tags':_0x2774d2[_0x109601(0x76)],'dir':_0x2774d2['dir'],'cacheDir':_0x2774d2[_0x109601(0x6a)],'skillMdPath':_0x2774d2[_0x109601(0x66)],'metadataPath':_0x2774d2['metadataPath'],'linkedPaths':_0x2774d2[_0x109601(0x67)],'contentHash':_0x2774d2[_0x109601(0x68)],'treeHash':_0x2774d2[_0x109601(0x6f)],'pulledAt':_0x2774d2[_0x109601(0x77)]};}
@@ -1 +1 @@
1
- const a58_0x53d9d9=a58_0x4ee3;function a58_0x4ee3(_0x105822,_0x4485f6){_0x105822=_0x105822-0x108;const _0x5259c4=a58_0x5259();let _0x4ee384=_0x5259c4[_0x105822];return _0x4ee384;}(function(_0xef6bfc,_0x2a07bb){const _0x56a641=a58_0x4ee3,_0x238a54=_0xef6bfc();while(!![]){try{const _0x5da292=-parseInt(_0x56a641(0x127))/0x1*(-parseInt(_0x56a641(0x10d))/0x2)+parseInt(_0x56a641(0x10c))/0x3+parseInt(_0x56a641(0x11b))/0x4*(-parseInt(_0x56a641(0x129))/0x5)+-parseInt(_0x56a641(0x111))/0x6*(-parseInt(_0x56a641(0x12c))/0x7)+parseInt(_0x56a641(0x130))/0x8+parseInt(_0x56a641(0x115))/0x9*(-parseInt(_0x56a641(0x108))/0xa)+-parseInt(_0x56a641(0x10f))/0xb;if(_0x5da292===_0x2a07bb)break;else _0x238a54['push'](_0x238a54['shift']());}catch(_0x2fd4c8){_0x238a54['push'](_0x238a54['shift']());}}}(a58_0x5259,0x1fece));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=[a58_0x53d9d9(0x11a),a58_0x53d9d9(0x11d)];export const DEFAULT_SKILL_TARGET=a58_0x53d9d9(0x120);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a58_0x53d9d9(0x12a);function a58_0x5259(){const _0x564892=['write','1008056BWBhsZ','---\x0aname:\x20','read','test','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','.agents/skills','type','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','Use\x20one\x20of:\x20','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','Unsupported\x20Skill\x20type:\x20','114KqCwlJ','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','5FMQhSn','references/runtime-contract.md','includes','7nGgeCP','\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a','validation','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','1585568NZUFZr','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','join','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a','150810LgwoWd','#\x20Output\x20Contract\x0a\x0a','\x0a\x20\x20created:\x20\x22','trim','148923zeyOtm','3018EKfqSS','timestamp','277992kBxpwX','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','200592YHgOOw','Invalid\x20Skill\x20name:\x20','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type=','27aUAfAF','toISOString','\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20BFF\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a','references/output-contract.md','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a'];a58_0x5259=function(){return _0x564892;};return a58_0x5259();}export const OUTPUT_CONTRACT_FILE=a58_0x53d9d9(0x118);export function validateSkillName(_0x544a52){const _0x1e8ba3=a58_0x53d9d9,_0x261228=_0x544a52[_0x1e8ba3(0x10b)]();if(!SKILL_NAME_PATTERN[_0x1e8ba3(0x11e)](_0x261228))throw CliErrors[_0x1e8ba3(0x12e)](_0x1e8ba3(0x112)+_0x544a52+_0x1e8ba3(0x113),_0x1e8ba3(0x110));return _0x261228;}export function normalizeSkillTemplateType(_0x25ece3){const _0x208101=a58_0x53d9d9,_0x32a3dd=(_0x25ece3||_0x208101(0x11a))['trim']()||_0x208101(0x11a);if(SKILL_TYPES[_0x208101(0x12b)](_0x32a3dd))return _0x32a3dd;throw CliErrors[_0x208101(0x12e)](_0x208101(0x126)+_0x25ece3,_0x208101(0x124)+SKILL_TYPES[_0x208101(0x132)](',\x20')+'.');}export function renderSkillTemplate(_0x58ea51){const _0x4ccbbb=a58_0x53d9d9,_0x51cca9=validateSkillName(_0x58ea51['skillName']),_0x27bd29=normalizeSkillTemplateType(_0x58ea51[_0x4ccbbb(0x121)]),_0xd260f3=_0x58ea51[_0x4ccbbb(0x10e)]??new Date()[_0x4ccbbb(0x116)]();return{'skillName':_0x51cca9,'type':_0x27bd29,'files':[{'path':'SKILL.md','content':renderSkillMd(_0x51cca9,_0x27bd29,_0xd260f3)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x51cca9,_0x27bd29)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x51cca9,_0x27bd29)}]};}function renderSkillMd(_0x7aee8d,_0x41205b,_0x3ba479){const _0x2803c5=a58_0x53d9d9,_0x24ec64=typeWorkflow(_0x41205b);return _0x2803c5(0x11c)+_0x7aee8d+'\x0a#\x20displayName:\x20\x22<填写符合用户实际诉求的人类可读展示名>\x22\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20'+_0x41205b+_0x2803c5(0x10a)+_0x3ba479+_0x2803c5(0x125)+_0x7aee8d+_0x2803c5(0x131)+_0x24ec64+'\x0a\x0a'+businessStateSection(_0x41205b)+_0x2803c5(0x12d);}function renderRuntimeContract(_0x56cfb6,_0x3f8fe2){const _0x31b3df=a58_0x53d9d9,_0xcd8498=_0x3f8fe2===_0x31b3df(0x11a)?_0x31b3df(0x119):'';return _0x31b3df(0x128)+_0x56cfb6+_0x31b3df(0x114)+_0x3f8fe2+_0x31b3df(0x117)+_0xcd8498+_0x31b3df(0x135);}function renderOutputContract(_0x4464ff,_0x3e84a1){const _0x4a7f51=a58_0x53d9d9,_0x10fb1b=_0x3e84a1===_0x4a7f51(0x11a)?_0x4a7f51(0x134):_0x3e84a1+_0x4a7f51(0x122);return _0x4a7f51(0x109)+_0x4464ff+_0x4a7f51(0x123)+_0x10fb1b+'\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a';}function typeWorkflow(_0x3fcb98){const _0x4077dd=a58_0x53d9d9;if(_0x3fcb98===_0x4077dd(0x11d))return _0x4077dd(0x12f);return _0x4077dd(0x11f);}function businessStateSection(_0x42ae08){const _0x5c86ff=a58_0x53d9d9;if(_0x42ae08!=='write')return'';return _0x5c86ff(0x133);}
1
+ const a78_0x15cd5a=a78_0x1598;(function(_0x37f19b,_0x2acf04){const _0x290e09=a78_0x1598,_0x4b2184=_0x37f19b();while(!![]){try{const _0x4af023=parseInt(_0x290e09(0x1cc))/0x1*(-parseInt(_0x290e09(0x1c8))/0x2)+-parseInt(_0x290e09(0x1df))/0x3+-parseInt(_0x290e09(0x1d2))/0x4*(parseInt(_0x290e09(0x1d4))/0x5)+-parseInt(_0x290e09(0x1f2))/0x6*(parseInt(_0x290e09(0x1de))/0x7)+-parseInt(_0x290e09(0x1ce))/0x8+-parseInt(_0x290e09(0x1dd))/0x9*(-parseInt(_0x290e09(0x1cf))/0xa)+parseInt(_0x290e09(0x1da))/0xb*(parseInt(_0x290e09(0x1e7))/0xc);if(_0x4af023===_0x2acf04)break;else _0x4b2184['push'](_0x4b2184['shift']());}catch(_0x2926ee){_0x4b2184['push'](_0x4b2184['shift']());}}}(a78_0x152c,0x95d0e));import{CliErrors}from'../../errors.js';export const SKILL_TYPES=['write',a78_0x15cd5a(0x1c9)];export const DEFAULT_SKILL_TARGET=a78_0x15cd5a(0x1e0);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a78_0x15cd5a(0x1c4);export const OUTPUT_CONTRACT_FILE=a78_0x15cd5a(0x1e4);export function validateSkillName(_0x1c9fd0){const _0x5d3222=a78_0x15cd5a,_0x25727d=_0x1c9fd0[_0x5d3222(0x1ca)]();if(!SKILL_NAME_PATTERN[_0x5d3222(0x1e1)](_0x25727d))throw CliErrors[_0x5d3222(0x1e2)](_0x5d3222(0x1e6)+_0x1c9fd0+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0x5d3222(0x1db));return _0x25727d;}function a78_0x152c(){const _0x3b63a8=['validation','\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a','references/output-contract.md','includes','Invalid\x20Skill\x20name:\x20','14875908xNFDKG','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a','\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type=','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a','\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a','#\x20Output\x20Contract\x0a\x0a','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','9252kNtgOX','references/runtime-contract.md','Use\x20one\x20of:\x20','\x0a#\x20displayName:\x20\x22<填写符合用户实际诉求的人类可读展示名>\x22\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','1520066ifUIuF','read','trim','type','1gBWIlc','skillName','4212776ghZMtd','10270RvWjPI','SKILL.md','timestamp','2374864IhxfVA','---\x0aname:\x20','10Hzjkbv','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','write','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','join','44XQdJAT','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','\x0a\x20\x20created:\x20\x22','162FuYxId','4193GfIzTX','2897268jnjIKE','.agents/skills','test'];a78_0x152c=function(){return _0x3b63a8;};return a78_0x152c();}export function normalizeSkillTemplateType(_0x54040d){const _0x587b7e=a78_0x15cd5a,_0x43bf6c=(_0x54040d||'write')[_0x587b7e(0x1ca)]()||'write';if(SKILL_TYPES[_0x587b7e(0x1e5)](_0x43bf6c))return _0x43bf6c;throw CliErrors[_0x587b7e(0x1e2)]('Unsupported\x20Skill\x20type:\x20'+_0x54040d,_0x587b7e(0x1c5)+SKILL_TYPES[_0x587b7e(0x1d9)](',\x20')+'.');}export function renderSkillTemplate(_0x1853c8){const _0x4a7945=a78_0x15cd5a,_0x4164b3=validateSkillName(_0x1853c8[_0x4a7945(0x1cd)]),_0x4eb1b6=normalizeSkillTemplateType(_0x1853c8[_0x4a7945(0x1cb)]),_0x2fcce6=_0x1853c8[_0x4a7945(0x1d1)]??new Date()['toISOString']();return{'skillName':_0x4164b3,'type':_0x4eb1b6,'files':[{'path':_0x4a7945(0x1d0),'content':renderSkillMd(_0x4164b3,_0x4eb1b6,_0x2fcce6)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x4164b3,_0x4eb1b6)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x4164b3,_0x4eb1b6)}]};}function renderSkillMd(_0x4f1133,_0x37322c,_0x1902e5){const _0x170dfb=a78_0x15cd5a,_0x380297=typeWorkflow(_0x37322c);return _0x170dfb(0x1d3)+_0x4f1133+_0x170dfb(0x1c6)+_0x37322c+_0x170dfb(0x1dc)+_0x1902e5+_0x170dfb(0x1c7)+_0x4f1133+_0x170dfb(0x1d5)+_0x380297+'\x0a\x0a'+businessStateSection(_0x37322c)+_0x170dfb(0x1e9);}function a78_0x1598(_0x31c9ab,_0x39a106){_0x31c9ab=_0x31c9ab-0x1c4;const _0x152ca8=a78_0x152c();let _0x1598b9=_0x152ca8[_0x31c9ab];return _0x1598b9;}function renderRuntimeContract(_0xfe640e,_0x39aeaf){const _0x194870=a78_0x15cd5a,_0x35b98c=_0x39aeaf==='write'?_0x194870(0x1d7):'';return _0x194870(0x1e8)+_0xfe640e+_0x194870(0x1ea)+_0x39aeaf+'\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20BFF\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a'+_0x35b98c+_0x194870(0x1e3);}function renderOutputContract(_0x4542b5,_0x16ce8c){const _0x1f3a0d=a78_0x15cd5a,_0x3630ee=_0x16ce8c===_0x1f3a0d(0x1d6)?_0x1f3a0d(0x1ef):_0x16ce8c+_0x1f3a0d(0x1eb);return _0x1f3a0d(0x1ee)+_0x4542b5+_0x1f3a0d(0x1ec)+_0x3630ee+_0x1f3a0d(0x1ed);}function typeWorkflow(_0x3866f6){const _0x16d38f=a78_0x15cd5a;if(_0x3866f6==='read')return _0x16d38f(0x1f1);return _0x16d38f(0x1d8);}function businessStateSection(_0x51b25b){const _0x15e310=a78_0x15cd5a;if(_0x51b25b!==_0x15e310(0x1d6))return'';return _0x15e310(0x1f0);}
@@ -1 +1 @@
1
- const a59_0x1bac95=a59_0x3601;(function(_0x33d647,_0x1a33aa){const _0x56e6c5=a59_0x3601,_0x2a0e61=_0x33d647();while(!![]){try{const _0x65f7b5=-parseInt(_0x56e6c5(0xf2))/0x1*(parseInt(_0x56e6c5(0xe5))/0x2)+parseInt(_0x56e6c5(0xd9))/0x3+parseInt(_0x56e6c5(0xab))/0x4+parseInt(_0x56e6c5(0xb0))/0x5*(parseInt(_0x56e6c5(0xb2))/0x6)+-parseInt(_0x56e6c5(0xf6))/0x7+-parseInt(_0x56e6c5(0xc8))/0x8+parseInt(_0x56e6c5(0xd2))/0x9;if(_0x65f7b5===_0x1a33aa)break;else _0x2a0e61['push'](_0x2a0e61['shift']());}catch(_0x1cea3c){_0x2a0e61['push'](_0x2a0e61['shift']());}}}(a59_0x55db,0x87a89));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a59_0x4a4d97}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a59_0x1bac95(0xbc),SUPPORTED_SKILL_TYPES=new Set([a59_0x1bac95(0xc0),a59_0x1bac95(0xa5)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;export function validateSkillDirectory(_0xfe13da,_0x1b0c1b={}){const _0x1750aa=a59_0x1bac95,_0x2e8238=resolveSkillDirectoryRoot(_0xfe13da),_0x2826bc=[],_0xc5b202=loadRequiredSkillFile(_0x2e8238,_0x2826bc),_0xbdb957=_0xc5b202?parseFrontmatter(_0xc5b202[_0x1750aa(0xf5)]):{'hasFrontmatter':![]};_0xc5b202&&validateFrontmatter(_0xc5b202[_0x1750aa(0xef)],_0xbdb957,_0x2826bc);validateRuntimeCliReferences(_0x2e8238,_0x2826bc);const _0x1eec84=_0x2826bc[_0x1750aa(0x9e)](_0x31429b=>_0x31429b['level']===_0x1750aa(0xcf)),_0x1ab6f4=_0x2826bc['filter'](_0x2f7b0b=>_0x2f7b0b['level']===_0x1750aa(0xa8));return{'ok':_0x1eec84['length']===0x0,'dir':_0x2e8238,'type':_0xbdb957[_0x1750aa(0xbe)],'errors':_0x1eec84,'warnings':_0x1ab6f4};}function resolveSkillDirectoryRoot(_0x10b720){const _0xb7106=a59_0x1bac95,_0x2de223=resolve(_0x10b720);if(!existsSync(_0x2de223))throw CliErrors[_0xb7106(0x9c)](_0xb7106(0xeb)+_0x10b720);const _0x39ac4b=lstatSync(_0x2de223);if(_0x39ac4b[_0xb7106(0xf7)]())return _0x2de223;if(_0x39ac4b['isSymbolicLink']()){const _0x494d14=realpathSync(_0x2de223);if(lstatSync(_0x494d14)[_0xb7106(0xf7)]())return _0x494d14;}throw CliErrors[_0xb7106(0x9c)](_0xb7106(0xeb)+_0x10b720);}export function throwIfSkillValidationFailed(_0x53037b,_0x5da23f=![]){const _0x43e366=a59_0x1bac95;if(_0x53037b['ok'])return;const _0x1d0f07=_0x53037b[_0x43e366(0xe7)][_0x43e366(0xc6)](_0x511a1e=>{const _0x52cace=_0x43e366,_0x447766=_0x511a1e[_0x52cace(0xe4)]?'#'+_0x511a1e[_0x52cace(0xe4)]:'';return _0x511a1e['level'][_0x52cace(0xc2)]()+'\x20'+_0x511a1e['ruleId']+'\x20'+_0x511a1e[_0x52cace(0xdc)]+_0x447766+':\x20'+_0x511a1e[_0x52cace(0xb8)]+_0x52cace(0xdf)+_0x511a1e[_0x52cace(0xa6)];});throw CliErrors[_0x43e366(0x9c)](_0x43e366(0xc7)+_0x1d0f07[_0x43e366(0xd3)]('\x0a'),'Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.');}function a59_0x3601(_0x304a55,_0x180cd7){_0x304a55=_0x304a55-0x9b;const _0x55db22=a59_0x55db();let _0x3601ef=_0x55db22[_0x304a55];return _0x3601ef;}function loadRequiredSkillFile(_0x5aa008,_0x47a28a){const _0x39ff8d=a59_0x1bac95,_0x3a72cd=resolve(_0x5aa008,SKILL_FILE);if(!existsSync(_0x3a72cd))return _0x47a28a[_0x39ff8d(0xf3)](issue('error',_0x39ff8d(0xa0),SKILL_FILE,_0x39ff8d(0xda),_0x39ff8d(0xcd))),undefined;const _0x1bc8a0=lstatSync(_0x3a72cd);if(_0x1bc8a0['isSymbolicLink']())return _0x47a28a['push'](issue(_0x39ff8d(0xcf),_0x39ff8d(0xa0),SKILL_FILE,_0x39ff8d(0xf0),_0x39ff8d(0xcb))),undefined;if(!_0x1bc8a0[_0x39ff8d(0xd0)]())return _0x47a28a[_0x39ff8d(0xf3)](issue(_0x39ff8d(0xcf),'structure-complete',SKILL_FILE,_0x39ff8d(0xe6),_0x39ff8d(0xd6))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x3a72cd,'utf8')};}function validateFrontmatter(_0x333138,_0x3ee8a0,_0x259800){const _0x452625=a59_0x1bac95;if(!_0x3ee8a0[_0x452625(0xaf)]){_0x259800['push'](issue(_0x452625(0xcf),_0x452625(0xcc),_0x333138,_0x452625(0xca),_0x452625(0xe1)));return;}!_0x3ee8a0[_0x452625(0xd8)]?.[_0x452625(0xa2)]()&&_0x259800[_0x452625(0xf3)](issue(_0x452625(0xcf),_0x452625(0xcc),_0x333138,_0x452625(0xd4),_0x452625(0xbf))),!_0x3ee8a0['displayName']?.['trim']()&&_0x259800['push'](issue(_0x452625(0xa8),_0x452625(0xaa),_0x333138,_0x452625(0xde),_0x452625(0xc9))),!_0x3ee8a0['example']?.['trim']()&&_0x259800[_0x452625(0xf3)](issue('warning',_0x452625(0xdb),_0x333138,'Frontmatter\x20example\x20is\x20missing.',_0x452625(0xe0))),!_0x3ee8a0[_0x452625(0xac)]?.[_0x452625(0xa2)]()&&_0x259800[_0x452625(0xf3)](issue(_0x452625(0xcf),_0x452625(0x9b),_0x333138,_0x452625(0xa7),_0x452625(0xec))),_0x3ee8a0[_0x452625(0xf4)]===!![]&&_0x259800[_0x452625(0xf3)](issue('error','internal-skill',_0x333138,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.',_0x452625(0xdd))),_0x3ee8a0[_0x452625(0xbe)]?.[_0x452625(0xa2)]()&&!SUPPORTED_SKILL_TYPES[_0x452625(0xbd)](_0x3ee8a0[_0x452625(0xbe)])&&_0x259800[_0x452625(0xf3)](issue(_0x452625(0xcf),_0x452625(0xcc),_0x333138,_0x452625(0xb7),_0x452625(0xbb)));}function validateRuntimeCliReferences(_0x52f8e8,_0x3bef52){const _0x4d802f=a59_0x1bac95;for(const _0x363092 of findRabetbaseCliInvocations(_0x52f8e8)){_0x3bef52[_0x4d802f(0xf3)](issue(_0x4d802f(0xa8),_0x4d802f(0xad),_0x363092[_0x4d802f(0xdc)],_0x4d802f(0xa3),_0x4d802f(0xb5),'L'+_0x363092['line']));}}function findRabetbaseCliInvocations(_0x2ca8f1){const _0x3ef328=a59_0x1bac95;return scanSkillDirectory(_0x2ca8f1)[_0x3ef328(0x9e)](_0x410557=>TEXT_SKILL_FILE_PATTERN['test'](_0x410557[_0x3ef328(0xef)]))[_0x3ef328(0xe2)](_0xa022d3=>{const _0xb53967=_0x3ef328,_0x1e2fd=fileText(_0xa022d3);return _0x1e2fd[_0xb53967(0xd5)](/\r?\n/)[_0xb53967(0xc6)]((_0x5bbf0f,_0x508a40)=>({'file':_0xa022d3['path'],'line':_0x508a40+0x1,'text':_0x5bbf0f}))[_0xb53967(0x9e)](({text:_0x54ad43})=>isRabetbaseCliInvocation(_0x54ad43))[_0xb53967(0xc6)](({file:_0x5d5cfc,line:_0x252ed7})=>({'file':_0x5d5cfc,'line':_0x252ed7}));});}const RABETBASE_SUBCOMMANDS=[a59_0x1bac95(0xa4),'sql',a59_0x1bac95(0xe8),a59_0x1bac95(0x9f),a59_0x1bac95(0xc1),a59_0x1bac95(0xae),a59_0x1bac95(0xce),a59_0x1bac95(0xba),'artifact','kb',a59_0x1bac95(0xc3),a59_0x1bac95(0xa1),a59_0x1bac95(0xee),a59_0x1bac95(0xed),a59_0x1bac95(0xb3),a59_0x1bac95(0xf1)],RABETBASE_INVOCATION=new RegExp(String['raw']`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS['join']('|')})\b`+String['raw']`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x167782){const _0x3c3e0a=a59_0x1bac95,_0x4c90e1=_0x167782[_0x3c3e0a(0xc4)](/\brabetbase\b/i);if(_0x4c90e1<0x0)return![];const _0x3caf52=_0x167782[_0x3c3e0a(0xb1)](_0x4c90e1)[_0x3c3e0a(0xd5)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION['test'](_0x3caf52);}function parseFrontmatter(_0x4a3634){const _0x14dad8=a59_0x1bac95,_0x406009=_0x4a3634[_0x14dad8(0xa9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x406009)return{'hasFrontmatter':![]};const _0x170c53=_0x406009[0x1]??'',_0x29b2c8={'hasFrontmatter':!![]};let _0x3da443;try{_0x3da443=a59_0x4a4d97(_0x170c53);}catch{return _0x29b2c8;}const _0x4c5acf=asRecord(_0x3da443);if(!_0x4c5acf)return _0x29b2c8;_0x29b2c8[_0x14dad8(0xd8)]=scalarToString(_0x4c5acf[_0x14dad8(0xd8)]),_0x29b2c8[_0x14dad8(0xe3)]=scalarToString(_0x4c5acf[_0x14dad8(0xe3)]),_0x29b2c8[_0x14dad8(0xac)]=scalarToString(_0x4c5acf[_0x14dad8(0xac)]),_0x29b2c8[_0x14dad8(0xe9)]=scalarToString(_0x4c5acf[_0x14dad8(0xe9)]);const _0x1ad375=asRecord(_0x4c5acf['metadata']);return _0x1ad375&&(_0x29b2c8[_0x14dad8(0xbe)]=scalarToString(_0x1ad375[_0x14dad8(0xbe)]),_0x29b2c8['internal']=scalarToBoolean(_0x1ad375['internal'])),_0x29b2c8;}function asRecord(_0x3292f8){const _0x3eeb12=a59_0x1bac95;if(_0x3292f8&&typeof _0x3292f8===_0x3eeb12(0xd7)&&!Array[_0x3eeb12(0xd1)](_0x3292f8))return _0x3292f8;return undefined;}function a59_0x55db(){const _0x1e1d4a=['toLowerCase','service','Set\x20metadata.type\x20to\x20write\x20or\x20read.','SKILL.md','has','type','Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.','write','project','toUpperCase','config','search','true','map','Skill\x20validation\x20failed:\x0a','3976440pQTWqq','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.','SKILL.md\x20must\x20start\x20with\x20frontmatter.','Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.','frontmatter-required','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','schema','error','isFile','isArray','9936864VfgBaG','join','Frontmatter\x20name\x20is\x20missing.','split','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','object','name','2079063GRjLKh','Missing\x20SKILL.md.','example-recommended','file','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.','Frontmatter\x20displayName\x20is\x20missing.','\x20Fix:\x20','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','Add\x20frontmatter\x20with\x20name\x20and\x20description.','flatMap','displayName','section','6tEBxBf','SKILL.md\x20is\x20not\x20a\x20file.','errors','bff','example','false','Skill\x20directory\x20not\x20found:\x20','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','auth','data','path','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','registry','321579pNeBPR','push','internal','content','6925331kvqvYz','isDirectory','description-required','validation','boolean','filter','page','structure-complete','workspace','trim','This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','dataset','read','suggestion','Frontmatter\x20description\x20is\x20empty.','warning','match','display-name-recommended','746776XWWrIW','description','rabetbase-cli-reference','app','hasFrontmatter','9085wgWZIH','slice','3378Cwpjup','logs','number','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','string','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','message'];a59_0x55db=function(){return _0x1e1d4a;};return a59_0x55db();}function scalarToString(_0x2de6c9){const _0x10456b=a59_0x1bac95;if(typeof _0x2de6c9==='string')return _0x2de6c9[_0x10456b(0xa2)]();if(typeof _0x2de6c9===_0x10456b(0xb4)||typeof _0x2de6c9===_0x10456b(0x9d))return String(_0x2de6c9);return undefined;}function scalarToBoolean(_0x2a9118){const _0x27c990=a59_0x1bac95;if(typeof _0x2a9118===_0x27c990(0x9d))return _0x2a9118;if(typeof _0x2a9118===_0x27c990(0xb6))return cleanBoolean(_0x2a9118);return undefined;}function cleanBoolean(_0x21303e){const _0x4fa8bb=a59_0x1bac95,_0x5bbdb1=_0x21303e[_0x4fa8bb(0xa2)]()[_0x4fa8bb(0xb9)]();if(_0x5bbdb1===_0x4fa8bb(0xc5))return!![];if(_0x5bbdb1===_0x4fa8bb(0xea))return![];return undefined;}function issue(_0x2d9694,_0x2c7ddc,_0x3e3ebc,_0x15a6be,_0x282156,_0x3e503a){return{'level':_0x2d9694,'ruleId':_0x2c7ddc,'file':_0x3e3ebc,'section':_0x3e503a,'message':_0x15a6be,'suggestion':_0x282156};}
1
+ const a79_0x1f682e=a79_0x32ce;(function(_0x23a83c,_0x97fe19){const _0x5d9619=a79_0x32ce,_0x508a74=_0x23a83c();while(!![]){try{const _0x14f095=-parseInt(_0x5d9619(0x1dc))/0x1*(parseInt(_0x5d9619(0x1c3))/0x2)+parseInt(_0x5d9619(0x1de))/0x3*(-parseInt(_0x5d9619(0x1d5))/0x4)+parseInt(_0x5d9619(0x1d2))/0x5+-parseInt(_0x5d9619(0x1d3))/0x6*(-parseInt(_0x5d9619(0x1c5))/0x7)+parseInt(_0x5d9619(0x1fc))/0x8+parseInt(_0x5d9619(0x205))/0x9*(-parseInt(_0x5d9619(0x1d1))/0xa)+parseInt(_0x5d9619(0x1b7))/0xb*(parseInt(_0x5d9619(0x1c0))/0xc);if(_0x14f095===_0x97fe19)break;else _0x508a74['push'](_0x508a74['shift']());}catch(_0x1e7320){_0x508a74['push'](_0x508a74['shift']());}}}(a79_0x52a6,0xdef4d));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{resolve}from'node:path';import{parse as a79_0x490d52}from'yaml';import{CliErrors}from'../../errors.js';import{fileText,scanSkillDirectory}from'../../skills/runtime-skill-sync/local-files.js';const SKILL_FILE=a79_0x1f682e(0x1b2),SUPPORTED_SKILL_TYPES=new Set([a79_0x1f682e(0x20b),a79_0x1f682e(0x1e9)]),TEXT_SKILL_FILE_PATTERN=/(?:^SKILL\.md$|\.(?:md|mdx|txt|json|ya?ml|js|mjs|cjs|ts|tsx|sh|sql))$/i;function a79_0x52a6(){const _0x5357ba=['description','hasFrontmatter','example','internal-skill','content','write','auth','true','logs','ruleId','frontmatter-required','artifact','warning','SKILL.md','trim','string','service','toUpperCase','20589679PfMbyd','SKILL.md\x20must\x20start\x20with\x20frontmatter.','config','number','display-name-recommended','Set\x20example\x20to\x20one\x20short\x20user\x20message\x20that\x20can\x20directly\x20trigger\x20this\x20Skill.','description-required','slice','Add\x20SKILL.md\x20at\x20the\x20Skill\x20directory\x20root.','12tFPOKi','bff','path','2906390TkIHWo','isDirectory','12729871mxEPZz','object','has','join','file','push','Frontmatter\x20name\x20is\x20missing.','app','example-recommended','Add\x20SKILL.md\x20as\x20a\x20regular\x20file\x20at\x20the\x20Skill\x20directory\x20root.','match','level','5617420XAQQrQ','4345415abunWj','6FVyXvu','split','40256LmUmpI','schema','map','length','line','type','false','1eVRQqT','填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词。','249ooavdW','isFile','registry','SKILL.md\x20must\x20be\x20a\x20regular\x20file.','validation','internal','test','Add\x20frontmatter\x20with\x20name\x20and\x20description.','isArray','data','toLowerCase','read','metadata','Skill\x20validation\x20failed:\x0a','Frontmatter\x20description\x20is\x20empty.','Missing\x20SKILL.md.','utf8','isSymbolicLink','sql','Frontmatter\x20example\x20is\x20missing.','structure-complete','error','raw','search','page','boolean','rabetbase-cli-reference','dataset','Set\x20metadata.type\x20to\x20write\x20or\x20read.','Skill\x20directory\x20not\x20found:\x20','2620296IiwIsP','filter','project','metadata.type\x20must\x20be\x20one\x20of\x20write\x20or\x20read.','name','Fix\x20the\x20Skill\x20metadata\x20before\x20running\x20skill\x20push.','displayName','suggestion','section','27vfBbMK'];a79_0x52a6=function(){return _0x5357ba;};return a79_0x52a6();}export function validateSkillDirectory(_0x1cb5b5,_0x10583c={}){const _0x2c5848=a79_0x1f682e,_0x2aab83=resolveSkillDirectoryRoot(_0x1cb5b5),_0x34b1a7=[],_0x16cbac=loadRequiredSkillFile(_0x2aab83,_0x34b1a7),_0x18b6dc=_0x16cbac?parseFrontmatter(_0x16cbac[_0x2c5848(0x20a)]):{'hasFrontmatter':![]};_0x16cbac&&validateFrontmatter(_0x16cbac[_0x2c5848(0x1c2)],_0x18b6dc,_0x34b1a7);validateRuntimeCliReferences(_0x2aab83,_0x34b1a7);const _0x30dab3=_0x34b1a7[_0x2c5848(0x1fd)](_0x4e4a81=>_0x4e4a81[_0x2c5848(0x1d0)]===_0x2c5848(0x1f3)),_0xf7fa74=_0x34b1a7[_0x2c5848(0x1fd)](_0x2fe86c=>_0x2fe86c['level']==='warning');return{'ok':_0x30dab3[_0x2c5848(0x1d8)]===0x0,'dir':_0x2aab83,'type':_0x18b6dc['type'],'errors':_0x30dab3,'warnings':_0xf7fa74};}function a79_0x32ce(_0x22a42e,_0x3ed6cd){_0x22a42e=_0x22a42e-0x1b0;const _0x52a6f5=a79_0x52a6();let _0x32ceba=_0x52a6f5[_0x22a42e];return _0x32ceba;}function resolveSkillDirectoryRoot(_0x449371){const _0x481dc5=a79_0x1f682e,_0x49c107=resolve(_0x449371);if(!existsSync(_0x49c107))throw CliErrors['validation'](_0x481dc5(0x1fb)+_0x449371);const _0x505953=lstatSync(_0x49c107);if(_0x505953['isDirectory']())return _0x49c107;if(_0x505953[_0x481dc5(0x1ef)]()){const _0x1c51ec=realpathSync(_0x49c107);if(lstatSync(_0x1c51ec)[_0x481dc5(0x1c4)]())return _0x1c51ec;}throw CliErrors['validation'](_0x481dc5(0x1fb)+_0x449371);}export function throwIfSkillValidationFailed(_0x398cb2,_0x2b2f0e=![]){const _0x2123b0=a79_0x1f682e;if(_0x398cb2['ok'])return;const _0x11b1ec=_0x398cb2['errors'][_0x2123b0(0x1d7)](_0x48e885=>{const _0x7449f5=_0x2123b0,_0xe36260=_0x48e885[_0x7449f5(0x204)]?'#'+_0x48e885[_0x7449f5(0x204)]:'';return _0x48e885['level'][_0x7449f5(0x1b6)]()+'\x20'+_0x48e885[_0x7449f5(0x20f)]+'\x20'+_0x48e885[_0x7449f5(0x1c9)]+_0xe36260+':\x20'+_0x48e885['message']+'\x20Fix:\x20'+_0x48e885[_0x7449f5(0x203)];});throw CliErrors[_0x2123b0(0x1e2)](_0x2123b0(0x1eb)+_0x11b1ec[_0x2123b0(0x1c8)]('\x0a'),_0x2123b0(0x201));}function loadRequiredSkillFile(_0x32ce08,_0x2e09df){const _0x3cf35c=a79_0x1f682e,_0x5ebe8c=resolve(_0x32ce08,SKILL_FILE);if(!existsSync(_0x5ebe8c))return _0x2e09df[_0x3cf35c(0x1ca)](issue(_0x3cf35c(0x1f3),_0x3cf35c(0x1f2),SKILL_FILE,_0x3cf35c(0x1ed),_0x3cf35c(0x1bf))),undefined;const _0x314593=lstatSync(_0x5ebe8c);if(_0x314593[_0x3cf35c(0x1ef)]())return _0x2e09df[_0x3cf35c(0x1ca)](issue(_0x3cf35c(0x1f3),_0x3cf35c(0x1f2),SKILL_FILE,_0x3cf35c(0x1e1),'Replace\x20the\x20symlink\x20with\x20a\x20regular\x20SKILL.md\x20file\x20inside\x20the\x20Skill\x20directory.')),undefined;if(!_0x314593[_0x3cf35c(0x1df)]())return _0x2e09df[_0x3cf35c(0x1ca)](issue('error',_0x3cf35c(0x1f2),SKILL_FILE,'SKILL.md\x20is\x20not\x20a\x20file.',_0x3cf35c(0x1ce))),undefined;return{'path':SKILL_FILE,'content':readFileSync(_0x5ebe8c,_0x3cf35c(0x1ee))};}function validateFrontmatter(_0x434e96,_0x555d55,_0x558778){const _0x1be5da=a79_0x1f682e;if(!_0x555d55[_0x1be5da(0x207)]){_0x558778[_0x1be5da(0x1ca)](issue(_0x1be5da(0x1f3),'frontmatter-required',_0x434e96,_0x1be5da(0x1b8),_0x1be5da(0x1e5)));return;}!_0x555d55[_0x1be5da(0x200)]?.['trim']()&&_0x558778[_0x1be5da(0x1ca)](issue(_0x1be5da(0x1f3),'frontmatter-required',_0x434e96,_0x1be5da(0x1cb),'Set\x20name\x20to\x20the\x20Skill\x20directory\x20code.')),!_0x555d55[_0x1be5da(0x202)]?.[_0x1be5da(0x1b3)]()&&_0x558778[_0x1be5da(0x1ca)](issue(_0x1be5da(0x1b1),_0x1be5da(0x1bb),_0x434e96,'Frontmatter\x20displayName\x20is\x20missing.','Set\x20displayName\x20to\x20the\x20human-readable\x20Skill\x20name\x20shown\x20in\x20SkillHub.')),!_0x555d55[_0x1be5da(0x208)]?.[_0x1be5da(0x1b3)]()&&_0x558778[_0x1be5da(0x1ca)](issue(_0x1be5da(0x1b1),_0x1be5da(0x1cd),_0x434e96,_0x1be5da(0x1f1),_0x1be5da(0x1bc))),!_0x555d55['description']?.[_0x1be5da(0x1b3)]()&&_0x558778[_0x1be5da(0x1ca)](issue(_0x1be5da(0x1f3),_0x1be5da(0x1bd),_0x434e96,_0x1be5da(0x1ec),_0x1be5da(0x1dd))),_0x555d55['internal']===!![]&&_0x558778[_0x1be5da(0x1ca)](issue('error',_0x1be5da(0x209),_0x434e96,'metadata.internal=true\x20Skills\x20cannot\x20be\x20uploaded.','Remove\x20metadata.internal\x20or\x20set\x20it\x20to\x20false\x20before\x20running\x20skill\x20push.')),_0x555d55[_0x1be5da(0x1da)]?.[_0x1be5da(0x1b3)]()&&!SUPPORTED_SKILL_TYPES[_0x1be5da(0x1c7)](_0x555d55[_0x1be5da(0x1da)])&&_0x558778[_0x1be5da(0x1ca)](issue(_0x1be5da(0x1f3),_0x1be5da(0x210),_0x434e96,_0x1be5da(0x1ff),_0x1be5da(0x1fa)));}function validateRuntimeCliReferences(_0x23d001,_0xc7d531){const _0x3dc768=a79_0x1f682e;for(const _0x233b0d of findRabetbaseCliInvocations(_0x23d001)){_0xc7d531[_0x3dc768(0x1ca)](issue('warning',_0x3dc768(0x1f8),_0x233b0d[_0x3dc768(0x1c9)],'This\x20line\x20invokes\x20the\x20rabetbase\x20CLI.\x20rabetbase\x20is\x20a\x20dev-time\x20tool;\x20runtime\x20Skills\x20should\x20drive\x20runtime\x20work\x20through\x20lovrabet\x20commands.','If\x20this\x20is\x20a\x20runtime\x20step,\x20replace\x20it\x20with\x20the\x20equivalent\x20lovrabet\x20command.\x20Dev-time\x20discovery\x20or\x20handoff\x20notes\x20can\x20stay.','L'+_0x233b0d[_0x3dc768(0x1d9)]));}}function findRabetbaseCliInvocations(_0x3d3fe8){const _0x33037b=a79_0x1f682e;return scanSkillDirectory(_0x3d3fe8)['filter'](_0x1583ad=>TEXT_SKILL_FILE_PATTERN[_0x33037b(0x1e4)](_0x1583ad[_0x33037b(0x1c2)]))['flatMap'](_0x48f8e0=>{const _0xa1a28d=_0x33037b,_0x2c6609=fileText(_0x48f8e0);return _0x2c6609[_0xa1a28d(0x1d4)](/\r?\n/)[_0xa1a28d(0x1d7)]((_0xe306bb,_0x2aee53)=>({'file':_0x48f8e0[_0xa1a28d(0x1c2)],'line':_0x2aee53+0x1,'text':_0xe306bb}))[_0xa1a28d(0x1fd)](({text:_0x33c302})=>isRabetbaseCliInvocation(_0x33c302))[_0xa1a28d(0x1d7)](({file:_0xc9d8d0,line:_0xec992b})=>({'file':_0xc9d8d0,'line':_0xec992b}));});}const RABETBASE_SUBCOMMANDS=[a79_0x1f682e(0x1f9),a79_0x1f682e(0x1f0),a79_0x1f682e(0x1c1),a79_0x1f682e(0x1f6),a79_0x1f682e(0x1fe),a79_0x1f682e(0x1cc),a79_0x1f682e(0x1d6),a79_0x1f682e(0x1b5),a79_0x1f682e(0x1b0),'kb',a79_0x1f682e(0x1b9),'workspace',a79_0x1f682e(0x1e7),a79_0x1f682e(0x20c),a79_0x1f682e(0x20e),a79_0x1f682e(0x1e0)],RABETBASE_INVOCATION=new RegExp(String[a79_0x1f682e(0x1f4)]`\brabetbase\s+(?:${RABETBASE_SUBCOMMANDS[a79_0x1f682e(0x1c8)]('|')})\b`+String[a79_0x1f682e(0x1f4)]`(?:\s+[a-z][\w-]*){0,2}\s+(?:--?[a-z]|[\w.-]+=)`,'i');function isRabetbaseCliInvocation(_0x43010e){const _0x4a232a=a79_0x1f682e,_0x5ad8da=_0x43010e[_0x4a232a(0x1f5)](/\brabetbase\b/i);if(_0x5ad8da<0x0)return![];const _0x2d53e9=_0x43010e[_0x4a232a(0x1be)](_0x5ad8da)[_0x4a232a(0x1d4)](/\blovrabet\b/i)[0x0]??'';return RABETBASE_INVOCATION[_0x4a232a(0x1e4)](_0x2d53e9);}function parseFrontmatter(_0x1121e1){const _0x508b7b=a79_0x1f682e,_0xa3d92c=_0x1121e1[_0x508b7b(0x1cf)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xa3d92c)return{'hasFrontmatter':![]};const _0x348edd=_0xa3d92c[0x1]??'',_0x197893={'hasFrontmatter':!![]};let _0x6ea360;try{_0x6ea360=a79_0x490d52(_0x348edd);}catch{return _0x197893;}const _0x17aeea=asRecord(_0x6ea360);if(!_0x17aeea)return _0x197893;_0x197893['name']=scalarToString(_0x17aeea[_0x508b7b(0x200)]),_0x197893['displayName']=scalarToString(_0x17aeea[_0x508b7b(0x202)]),_0x197893[_0x508b7b(0x206)]=scalarToString(_0x17aeea['description']),_0x197893[_0x508b7b(0x208)]=scalarToString(_0x17aeea[_0x508b7b(0x208)]);const _0x55f063=asRecord(_0x17aeea[_0x508b7b(0x1ea)]);return _0x55f063&&(_0x197893[_0x508b7b(0x1da)]=scalarToString(_0x55f063[_0x508b7b(0x1da)]),_0x197893[_0x508b7b(0x1e3)]=scalarToBoolean(_0x55f063[_0x508b7b(0x1e3)])),_0x197893;}function asRecord(_0x15f6e0){const _0x39879a=a79_0x1f682e;if(_0x15f6e0&&typeof _0x15f6e0===_0x39879a(0x1c6)&&!Array[_0x39879a(0x1e6)](_0x15f6e0))return _0x15f6e0;return undefined;}function scalarToString(_0x251ee8){const _0x2c7a71=a79_0x1f682e;if(typeof _0x251ee8==='string')return _0x251ee8[_0x2c7a71(0x1b3)]();if(typeof _0x251ee8===_0x2c7a71(0x1ba)||typeof _0x251ee8==='boolean')return String(_0x251ee8);return undefined;}function scalarToBoolean(_0x13262a){const _0x2991f7=a79_0x1f682e;if(typeof _0x13262a===_0x2991f7(0x1f7))return _0x13262a;if(typeof _0x13262a===_0x2991f7(0x1b4))return cleanBoolean(_0x13262a);return undefined;}function cleanBoolean(_0x3e40c){const _0x4f355b=a79_0x1f682e,_0x37644a=_0x3e40c[_0x4f355b(0x1b3)]()[_0x4f355b(0x1e8)]();if(_0x37644a===_0x4f355b(0x20d))return!![];if(_0x37644a===_0x4f355b(0x1db))return![];return undefined;}function issue(_0x484795,_0x4b63d8,_0x10a236,_0x58698f,_0x21e5d0,_0x51e3f5){return{'level':_0x484795,'ruleId':_0x4b63d8,'file':_0x10a236,'section':_0x51e3f5,'message':_0x58698f,'suggestion':_0x21e5d0};}
@@ -1 +1 @@
1
- const a60_0x2ff280=a60_0x104a;function a60_0x2f9e(){const _0x33acad=['5iFzxvU','50120WNWZZh','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','sqlcode','842344SjmRoH','str','sqlName','sqlCode','dbId','528084hmDeBw','1397094YcUtln','appCode','sql','detail','13293981nojENX','7LbgTbJ','8145832sqEaUI','sqlContent','1383748NdqWAg','bool'];a60_0x2f9e=function(){return _0x33acad;};return a60_0x2f9e();}(function(_0x5947c8,_0xfbf916){const _0x3a7df9=a60_0x104a,_0x22dbed=_0x5947c8();while(!![]){try{const _0x5f42e4=-parseInt(_0x3a7df9(0x19c))/0x1+-parseInt(_0x3a7df9(0x199))/0x2+-parseInt(_0x3a7df9(0x1a1))/0x3+parseInt(_0x3a7df9(0x196))/0x4*(-parseInt(_0x3a7df9(0x198))/0x5)+-parseInt(_0x3a7df9(0x1a2))/0x6+parseInt(_0x3a7df9(0x193))/0x7*(parseInt(_0x3a7df9(0x194))/0x8)+parseInt(_0x3a7df9(0x192))/0x9;if(_0x5f42e4===_0xfbf916)break;else _0x22dbed['push'](_0x22dbed['shift']());}catch(_0x3b226d){_0x22dbed['push'](_0x22dbed['shift']());}}}(a60_0x2f9e,0xd52a0));import{getSqlQueryInfo}from'../../core/api-client.js';function a60_0x104a(_0xfbfe3f,_0x46d654){_0xfbfe3f=_0xfbfe3f-0x190;const _0x2f9ee1=a60_0x2f9e();let _0x104a15=_0x2f9ee1[_0xfbfe3f];return _0x104a15;}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a60_0x2ff280(0x190),'command':a60_0x2ff280(0x191),'description':a60_0x2ff280(0x19a),'risk':'read','flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x281301){const _0x4cf485=a60_0x2ff280,_0x2bf376=await getSqlQueryInfo(_0x281301[_0x4cf485(0x1a3)],_0x281301[_0x4cf485(0x19d)](_0x4cf485(0x19b))),_0x2704e3=_0x281301[_0x4cf485(0x197)]('verbose');if(_0x2704e3)return{'ok':!![],'data':_0x2bf376};const _0x3a3ad4=_0x2bf376['dbId']?await getDbName(_0x281301['appCode'],_0x2bf376['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x2bf376[_0x4cf485(0x19f)],'sqlName':_0x2bf376[_0x4cf485(0x19e)],'db':_0x3a3ad4?_0x3a3ad4+'\x20('+_0x2bf376[_0x4cf485(0x1a0)]+')':_0x2bf376[_0x4cf485(0x1a0)]??'','sqlContent':_0x2bf376[_0x4cf485(0x195)]??''}};}};
1
+ const a80_0x4639b5=a80_0x3e87;function a80_0x5557(){const _0x3cd9bb=['dbId','107163hruHxu','50gicwfb','sqlName','verbose','sqlCode','sqlContent','str','2204270bhcubB','175249sWgJqm','2zRsVVy','168BjRvZD','read','bool','6698296PZoEyk','detail','sql','54764zDPVGI','69uUFUxP','sqlcode','1020789OBUKsS','203394XPITGw','appCode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode'];a80_0x5557=function(){return _0x3cd9bb;};return a80_0x5557();}(function(_0x46fd2a,_0x4bce98){const _0x5427bb=a80_0x3e87,_0x381a75=_0x46fd2a();while(!![]){try{const _0x5dc96b=-parseInt(_0x5427bb(0xb1))/0x1*(parseInt(_0x5427bb(0x9a))/0x2)+parseInt(_0x5427bb(0xa2))/0x3*(parseInt(_0x5427bb(0xa1))/0x4)+parseInt(_0x5427bb(0xaa))/0x5*(-parseInt(_0x5427bb(0xa5))/0x6)+-parseInt(_0x5427bb(0xa4))/0x7+parseInt(_0x5427bb(0x9b))/0x8*(parseInt(_0x5427bb(0xa9))/0x9)+-parseInt(_0x5427bb(0xb0))/0xa+parseInt(_0x5427bb(0x9e))/0xb;if(_0x5dc96b===_0x4bce98)break;else _0x381a75['push'](_0x381a75['shift']());}catch(_0xe391d1){_0x381a75['push'](_0x381a75['shift']());}}}(a80_0x5557,0x47a07));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a80_0x3e87(_0x387b56,_0x5eb01d){_0x387b56=_0x387b56-0x9a;const _0x55577a=a80_0x5557();let _0x3e871a=_0x55577a[_0x387b56];return _0x3e871a;}export const sqlDetail={'service':a80_0x4639b5(0xa0),'command':a80_0x4639b5(0x9f),'description':a80_0x4639b5(0xa7),'risk':a80_0x4639b5(0x9c),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x923e75){const _0x14a174=a80_0x4639b5,_0x294c6c=await getSqlQueryInfo(_0x923e75['appCode'],_0x923e75[_0x14a174(0xaf)](_0x14a174(0xa3))),_0x4eee84=_0x923e75[_0x14a174(0x9d)](_0x14a174(0xac));if(_0x4eee84)return{'ok':!![],'data':_0x294c6c};const _0x4e122c=_0x294c6c[_0x14a174(0xa8)]?await getDbName(_0x923e75[_0x14a174(0xa6)],_0x294c6c['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x294c6c[_0x14a174(0xad)],'sqlName':_0x294c6c[_0x14a174(0xab)],'db':_0x4e122c?_0x4e122c+'\x20('+_0x294c6c[_0x14a174(0xa8)]+')':_0x294c6c[_0x14a174(0xa8)]??'','sqlContent':_0x294c6c[_0x14a174(0xae)]??''}};}};
@@ -1 +1 @@
1
- const a61_0x1ffd8e=a61_0x249d;function a61_0x249d(_0x1faf00,_0x4aad17){_0x1faf00=_0x1faf00-0x165;const _0x84098d=a61_0x8409();let _0x249d25=_0x84098d[_0x1faf00];return _0x249d25;}(function(_0x6fbb87,_0x323933){const _0xf88e89=a61_0x249d,_0x31b9b5=_0x6fbb87();while(!![]){try{const _0x4a4cf5=-parseInt(_0xf88e89(0x171))/0x1*(parseInt(_0xf88e89(0x165))/0x2)+-parseInt(_0xf88e89(0x166))/0x3+-parseInt(_0xf88e89(0x16a))/0x4+parseInt(_0xf88e89(0x168))/0x5+-parseInt(_0xf88e89(0x170))/0x6*(parseInt(_0xf88e89(0x16c))/0x7)+-parseInt(_0xf88e89(0x179))/0x8*(parseInt(_0xf88e89(0x17a))/0x9)+parseInt(_0xf88e89(0x174))/0xa;if(_0x4a4cf5===_0x323933)break;else _0x31b9b5['push'](_0x31b9b5['shift']());}catch(_0xc20b79){_0x31b9b5['push'](_0x31b9b5['shift']());}}}(a61_0x8409,0xe0c31));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a61_0x8409(){const _0x1efa4a=['152524WxTXol','read','sql','39050540NSncko','exec','length','execResult','Returned\x20','2175400JXcfEc','36tmcMcb','execSuccess','isArray','4DXGLic','2433936RkEftM','str','4525880yIgCdq','SQL\x20execution\x20failed','5629816OkmafK','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','4081twWZeU','params','now','execError','2862nNIsIl'];a61_0x8409=function(){return _0x1efa4a;};return a61_0x8409();}export const sqlExec={'service':a61_0x1ffd8e(0x173),'command':a61_0x1ffd8e(0x175),'description':a61_0x1ffd8e(0x16b),'risk':a61_0x1ffd8e(0x172),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0xd3b8ac){const _0x17e675=a61_0x1ffd8e,_0x1240e3=parseJsonParams(_0xd3b8ac[_0x17e675(0x167)](_0x17e675(0x16d))),_0x208698=Date['now'](),_0x5a7a37=await executeSdkSql(_0xd3b8ac[_0x17e675(0x167)]('sqlcode'),_0x1240e3),_0x2d4f39=Date[_0x17e675(0x16e)]()-_0x208698,_0x16d3fc=_0x5a7a37?.[_0x17e675(0x177)]??_0x5a7a37,_0x4981c8=_0x5a7a37?.[_0x17e675(0x17b)]??!![];if(!_0x4981c8)return{'ok':![],'data':{'error':_0x5a7a37?.[_0x17e675(0x16f)]||_0x17e675(0x169),'elapsed':_0x2d4f39},'message':_0x17e675(0x169)};const _0x3e00c4=Array[_0x17e675(0x17c)](_0x16d3fc)?_0x16d3fc:[];return{'ok':!![],'data':{'rows':_0x3e00c4,'rowCount':_0x3e00c4['length'],'elapsed':_0x2d4f39},'message':_0x17e675(0x178)+_0x3e00c4[_0x17e675(0x176)]+'\x20row(s)\x20in\x20'+_0x2d4f39+'ms'};}};
1
+ const a81_0x1db16c=a81_0x5cea;(function(_0x47cac1,_0x2f348f){const _0x20bf40=a81_0x5cea,_0x27a9a0=_0x47cac1();while(!![]){try{const _0x348e61=-parseInt(_0x20bf40(0x86))/0x1*(parseInt(_0x20bf40(0x8b))/0x2)+-parseInt(_0x20bf40(0x85))/0x3*(parseInt(_0x20bf40(0x97))/0x4)+-parseInt(_0x20bf40(0x89))/0x5+-parseInt(_0x20bf40(0x88))/0x6+parseInt(_0x20bf40(0x99))/0x7+-parseInt(_0x20bf40(0x9c))/0x8+parseInt(_0x20bf40(0x91))/0x9*(parseInt(_0x20bf40(0x9b))/0xa);if(_0x348e61===_0x2f348f)break;else _0x27a9a0['push'](_0x27a9a0['shift']());}catch(_0x17ed4b){_0x27a9a0['push'](_0x27a9a0['shift']());}}}(a81_0x1d2f,0x91cbe));import{executeSdkSql}from'../../core/sdk-client.js';import{SQLCODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a81_0x5cea(_0x493cd4,_0x2de93a){_0x493cd4=_0x493cd4-0x85;const _0x1d2ff8=a81_0x1d2f();let _0x5cea4d=_0x1d2ff8[_0x493cd4];return _0x5cea4d;}import{parseJsonParams}from'../../utils/params.js';function a81_0x1d2f(){const _0x3cb63f=['isArray','\x20row(s)\x20in\x20','read','64YjQUOZ','str','3393985TkYCdA','SQL\x20execution\x20failed','7193180WzTIuC','2961688udwKSG','60966PirzfK','29xBfcRr','now','6283062MUsWEs','377040BnpoDR','length','15702QptnfM','execError','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','sqlcode','sql','execSuccess','27zMDKIY','execResult','params'];a81_0x1d2f=function(){return _0x3cb63f;};return a81_0x1d2f();}export const sqlExec={'service':a81_0x1db16c(0x8f),'command':'exec','description':a81_0x1db16c(0x8d),'risk':a81_0x1db16c(0x96),'flags':[SQLCODE_FLAG,PARAMS_FLAG],async 'execute'(_0x141cd0){const _0x318112=a81_0x1db16c,_0x89ba27=parseJsonParams(_0x141cd0['str'](_0x318112(0x93))),_0xb87398=Date[_0x318112(0x87)](),_0x5e7a01=await executeSdkSql(_0x141cd0[_0x318112(0x98)](_0x318112(0x8e)),_0x89ba27),_0x598be1=Date[_0x318112(0x87)]()-_0xb87398,_0x2161cf=_0x5e7a01?.[_0x318112(0x92)]??_0x5e7a01,_0x464286=_0x5e7a01?.[_0x318112(0x90)]??!![];if(!_0x464286)return{'ok':![],'data':{'error':_0x5e7a01?.[_0x318112(0x8c)]||_0x318112(0x9a),'elapsed':_0x598be1},'message':_0x318112(0x9a)};const _0x2f13f1=Array[_0x318112(0x94)](_0x2161cf)?_0x2161cf:[];return{'ok':!![],'data':{'rows':_0x2f13f1,'rowCount':_0x2f13f1[_0x318112(0x8a)],'elapsed':_0x598be1},'message':'Returned\x20'+_0x2f13f1[_0x318112(0x8a)]+_0x318112(0x95)+_0x598be1+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x1a6432,_0x51bc4a){const _0x4116a7=a62_0x32a4,_0x2e82d3=_0x1a6432();while(!![]){try{const _0x401618=parseInt(_0x4116a7(0xbd))/0x1*(-parseInt(_0x4116a7(0xbb))/0x2)+-parseInt(_0x4116a7(0xb8))/0x3+-parseInt(_0x4116a7(0xbf))/0x4*(-parseInt(_0x4116a7(0xba))/0x5)+-parseInt(_0x4116a7(0xb9))/0x6+parseInt(_0x4116a7(0xbc))/0x7+parseInt(_0x4116a7(0xbe))/0x8+-parseInt(_0x4116a7(0xc0))/0x9;if(_0x401618===_0x51bc4a)break;else _0x2e82d3['push'](_0x2e82d3['shift']());}catch(_0x569054){_0x2e82d3['push'](_0x2e82d3['shift']());}}}(a62_0x286e,0x78ec0));function a62_0x32a4(_0x129fb6,_0x3b7b0a){_0x129fb6=_0x129fb6-0xb8;const _0x286ee7=a62_0x286e();let _0x32a4d2=_0x286ee7[_0x129fb6];return _0x32a4d2;}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlExec}from'../../commands/sql/exec.js';function a62_0x286e(){const _0x260687=['5gekoir','2isShkM','5398155qzkiRz','689566fTWVjR','6219768krNXny','3351068iegbyO','7658244FzlnMe','302661sdtnQd','1498428ZniHNJ'];a62_0x286e=function(){return _0x260687;};return a62_0x286e();}export const sqlDefinitions=[sqlDetail,sqlExec];
1
+ (function(_0x49e5f2,_0x44f047){const _0x1ef35b=a82_0x3a95,_0x42a1f2=_0x49e5f2();while(!![]){try{const _0x296b77=parseInt(_0x1ef35b(0x68))/0x1+-parseInt(_0x1ef35b(0x6b))/0x2+-parseInt(_0x1ef35b(0x6a))/0x3+-parseInt(_0x1ef35b(0x6c))/0x4+-parseInt(_0x1ef35b(0x67))/0x5+-parseInt(_0x1ef35b(0x66))/0x6*(parseInt(_0x1ef35b(0x69))/0x7)+parseInt(_0x1ef35b(0x65))/0x8;if(_0x296b77===_0x44f047)break;else _0x42a1f2['push'](_0x42a1f2['shift']());}catch(_0x3782ed){_0x42a1f2['push'](_0x42a1f2['shift']());}}}(a82_0x4ef3,0xf0339));import{sqlDetail}from'../../commands/sql/detail.js';function a82_0x3a95(_0x177dae,_0x3a9be3){_0x177dae=_0x177dae-0x65;const _0x4ef3df=a82_0x4ef3();let _0x3a9506=_0x4ef3df[_0x177dae];return _0x3a9506;}function a82_0x4ef3(){const _0x136a92=['2902914gCTcoe','1226740dMhiLc','25106816gCflWj','6tzmGuo','697280Sblhgk','1937107PkkaFL','3531171UaynpR','5068629YhDxtg'];a82_0x4ef3=function(){return _0x136a92;};return a82_0x4ef3();}import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlDetail,sqlExec];
@@ -1 +1 @@
1
- const a63_0xa34222=a63_0x5744;(function(_0x486403,_0x55a806){const _0x177056=a63_0x5744,_0x30d48a=_0x486403();while(!![]){try{const _0x583b65=parseInt(_0x177056(0xb9))/0x1+parseInt(_0x177056(0x9a))/0x2*(-parseInt(_0x177056(0xa0))/0x3)+-parseInt(_0x177056(0xce))/0x4*(-parseInt(_0x177056(0xc1))/0x5)+-parseInt(_0x177056(0xa1))/0x6*(parseInt(_0x177056(0xc6))/0x7)+-parseInt(_0x177056(0xa4))/0x8+parseInt(_0x177056(0x9e))/0x9*(-parseInt(_0x177056(0xb1))/0xa)+parseInt(_0x177056(0xab))/0xb;if(_0x583b65===_0x55a806)break;else _0x30d48a['push'](_0x30d48a['shift']());}catch(_0x23f3f6){_0x30d48a['push'](_0x30d48a['shift']());}}}(a63_0x4543,0x3c234));import{spawnSync}from'node:child_process';import a63_0x11f8fa from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a63_0x5744(_0x39bf33,_0x5d4b44){_0x39bf33=_0x39bf33-0x9a;const _0x45437f=a63_0x4543();let _0x574491=_0x45437f[_0x39bf33];return _0x574491;}import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a63_0xa34222(0xd7),'type':a63_0xa34222(0xdf),'description':'Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','default':![]},{'name':'beta','type':a63_0xa34222(0xdf),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':'version','type':'string','description':a63_0xa34222(0xde)}];function getRequestedVersion(_0x4f73f2){const _0x103292=a63_0xa34222,_0x5cb35f=_0x4f73f2[_0x103292(0xa2)](_0x103292(0xd2))[_0x103292(0xcc)]();if(_0x5cb35f)return _0x5cb35f;return String(_0x4f73f2['args']?.[0x0]??'')['trim']();}async function validateUpdateFlags(_0xcc830c){const _0x286844=a63_0xa34222,_0x5e775f=getRequestedVersion(_0xcc830c),_0xeb5d3c=[_0xcc830c[_0x286844(0xb2)](_0x286844(0xd7))?'latest':'',_0xcc830c[_0x286844(0xb2)](_0x286844(0xa5))?'beta':'',_0x5e775f?_0x286844(0xd2):'']['filter'](Boolean);if(_0xeb5d3c[_0x286844(0x9d)]>0x1)throw CliErrors[_0x286844(0xc0)](_0x286844(0xd4),'Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.');if(_0x5e775f&&!a63_0x11f8fa[_0x286844(0xc3)](_0x5e775f))throw CliErrors[_0x286844(0xc0)](_0x286844(0xd8)+_0x5e775f,_0x286844(0xbe));}async function fetchNpmDistTags(){const _0x4f3867=a63_0xa34222;try{const _0x279995=NPM_REGISTRY_BASE_URL+_0x4f3867(0xb3)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x4f3867(0x9b),_0x3b0d85=await fetch(_0x279995,{'signal':AbortSignal[_0x4f3867(0xd6)](0x2710)});if(!_0x3b0d85['ok'])return null;const _0x56e860=await _0x3b0d85[_0x4f3867(0xb5)]();if(!_0x56e860||typeof _0x56e860!=='object')return null;return Object['fromEntries'](Object[_0x4f3867(0xca)](_0x56e860)['filter'](([,_0x140f82])=>typeof _0x140f82==='string'&&_0x140f82[_0x4f3867(0xcc)]())[_0x4f3867(0xbd)](([_0x1d2057,_0xff6b4d])=>[_0x1d2057,String(_0xff6b4d)[_0x4f3867(0xcc)]()]));}catch{return null;}}async function resolveTargetVersion(_0x327cd0){const _0x22320c=a63_0xa34222,_0x82b74d=getRequestedVersion(_0x327cd0);if(_0x82b74d)return{'version':_0x82b74d,'source':_0x22320c(0xd2)};const _0x461766=_0x327cd0['bool'](_0x22320c(0xa5))?_0x22320c(0xa5):_0x22320c(0xd7),_0x3b5df5=await fetchNpmDistTags(),_0x33a8b5=_0x3b5df5?.[_0x461766];if(!_0x33a8b5)return null;return{'version':_0x33a8b5,'source':_0x461766};}function a63_0x4543(){const _0x2d8c40=['\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','290507IatGmB','toString','repairCommand','\x20version\x20from\x20npm.','map','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20\x20CLI\x20Built-in\x20Skill\x20','validation','445hOgPps','Already\x20up\x20to\x20date\x20(v','valid','npm','\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20[','32312CeCoyN','message','Update\x20failed:\x20','status','entries','\x20is\x20current.','trim','find','9012nsVJDn','Checking\x20CLI\x20Built-in\x20Skill...','exit\x20','pipe','version','nonInteractive','--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.','read','timeout','latest','Invalid\x20version:\x20','stdout','\x20CLI','Updating\x20','log','warn','Install\x20a\x20specific\x20CLI\x20version','boolean','2BCQohV','/dist-tags','state','length','36IiuyIl','Current\x20version:\x20','727341emliCD','84ShIIan','str','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','307000pwOGGa','beta','\x20\x20Run\x20manually:\x20','\x20->\x20','join','unknown','\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20','5853034QNOglj','stderr','Updated\x20to\x20v','inherit','error','source','1078370BjhaLr','bool','/-/package/','Checking\x20npm\x20dist-tags...','json','code','cwd'];a63_0x4543=function(){return _0x2d8c40;};return a63_0x4543();}function shouldInstallTarget(_0x59d8d5,_0x3e61fd){const _0x557e53=a63_0xa34222;if(_0x3e61fd[_0x557e53(0xb0)]===_0x557e53(0xd2)||_0x3e61fd[_0x557e53(0xb0)]==='beta')return!a63_0x11f8fa['eq'](_0x59d8d5,_0x3e61fd[_0x557e53(0xd2)]);return a63_0x11f8fa['lt'](_0x59d8d5,_0x3e61fd[_0x557e53(0xd2)]);}function installCliPackage(_0x1a86a6,_0x4d1381){const _0x300dcc=a63_0xa34222,_0x1b027a=resolveNpmBin(_0x300dcc(0xc4)),_0xc9fd6c=['install','-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1a86a6];console[_0x300dcc(0xdc)]('*\x20'+[_0x1b027a,..._0xc9fd6c][_0x300dcc(0xa8)]('\x20'));const _0x5ea1f4=spawnSync(_0x1b027a,_0xc9fd6c,{'cwd':process[_0x300dcc(0xb7)](),'stdio':_0x4d1381?_0x300dcc(0xd1):_0x300dcc(0xae),'env':process.env,'shell':![]});if(_0x5ea1f4[_0x300dcc(0xc9)]===0x0)return{'ok':!![]};let _0x45d10c=_0x5ea1f4[_0x300dcc(0xaf)]?.[_0x300dcc(0xc7)]||_0x300dcc(0xd0)+(_0x5ea1f4[_0x300dcc(0xc9)]??'unknown');if(_0x4d1381){const _0x5894d6=_0x5ea1f4[_0x300dcc(0xac)]?_0x5ea1f4[_0x300dcc(0xac)][_0x300dcc(0xba)]()[_0x300dcc(0xcc)]():'',_0x234cba=_0x5ea1f4[_0x300dcc(0xd9)]?_0x5ea1f4['stdout'][_0x300dcc(0xba)]()['trim']():'';if(_0x5894d6)_0x45d10c=_0x5894d6;else{if(_0x234cba)_0x45d10c=_0x234cba;}}return{'ok':![],'error':_0x45d10c};}function repairCurrentBuiltinSkill(_0x1a5b59){const _0x50cbd9=a63_0xa34222;console[_0x50cbd9(0xdc)](_0x50cbd9(0xcf));const _0x544052=installBuiltinSkill({'stdio':_0x1a5b59?'pipe':_0x50cbd9(0xae)});if(_0x544052['ok'])return console['log'](_0x50cbd9(0xbf)+_0x544052['skillVersion']+_0x50cbd9(0xcb)),!![];return console[_0x50cbd9(0xdd)](_0x50cbd9(0xc5)+(_0x544052[_0x50cbd9(0xb6)]||'INSTALL_FAILED')+']:\x20'+(_0x544052['error']||_0x50cbd9(0xa9))),console[_0x50cbd9(0xdc)](_0x50cbd9(0xa6)+_0x544052[_0x50cbd9(0xbb)]),![];}function verifyUpdatedBuiltinSkill(_0x1c7657){const _0x4e527a=a63_0xa34222;console[_0x4e527a(0xdc)](_0x4e527a(0xcf));const _0x22655d=inspectInstalledBuiltinSkillVersion(_0x1c7657);if(_0x22655d[_0x4e527a(0x9c)]==='current')return console[_0x4e527a(0xdc)](_0x4e527a(0xbf)+_0x1c7657+_0x4e527a(0xcb)),!![];console[_0x4e527a(0xdd)](_0x4e527a(0xb8)+_0x22655d[_0x4e527a(0x9c)]+'.');if(_0x22655d['reason'])console[_0x4e527a(0xdd)]('\x20\x20'+_0x22655d['reason']);return console[_0x4e527a(0xdc)]('\x20\x20Run\x20manually:\x20'+_0x22655d[_0x4e527a(0xbb)]),![];}async function execute(_0x5827d3){const _0x5bd6d0=a63_0xa34222;await validateUpdateFlags(_0x5827d3);const _0x4199c1=getCliVersion();console['log'](_0x5bd6d0(0x9f)+_0x4199c1),console[_0x5bd6d0(0xdc)](_0x5bd6d0(0xb4));const _0x1dc9a5=await resolveTargetVersion(_0x5827d3);if(!_0x1dc9a5){const _0x392224=_0x5827d3[_0x5bd6d0(0xb2)](_0x5bd6d0(0xa5))?_0x5bd6d0(0xa5):_0x5bd6d0(0xd7),_0x403079='Unable\x20to\x20resolve\x20'+_0x392224+_0x5bd6d0(0xbc);return console[_0x5bd6d0(0xdd)](_0x403079),console['log']('\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x392224),{'ok':![]};}const _0x2e4e2c=[_0x4199c1,_0x1dc9a5['version']][_0x5bd6d0(0xcd)](_0x45badf=>!a63_0x11f8fa[_0x5bd6d0(0xc3)](_0x45badf));if(_0x2e4e2c)return console[_0x5bd6d0(0xdd)]('Version\x20comparison\x20failed:\x20'+_0x2e4e2c+'.'),{'ok':![]};if(!shouldInstallTarget(_0x4199c1,_0x1dc9a5)){const _0x24ebf1=_0x1dc9a5[_0x5bd6d0(0xb0)]===_0x5bd6d0(0xd2)?'Already\x20on\x20requested\x20version\x20(v'+_0x1dc9a5[_0x5bd6d0(0xd2)]+').':_0x5bd6d0(0xc2)+_0x1dc9a5[_0x5bd6d0(0xd2)]+').';return console[_0x5bd6d0(0xdc)](_0x24ebf1),{'ok':repairCurrentBuiltinSkill(_0x5827d3[_0x5bd6d0(0xd3)])};}console[_0x5bd6d0(0xdc)](_0x5bd6d0(0xdb)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x4199c1+_0x5bd6d0(0xa7)+_0x1dc9a5[_0x5bd6d0(0xd2)]);const _0x1a7a70=installCliPackage(_0x1dc9a5['version'],_0x5827d3['nonInteractive']);if(!_0x1a7a70['ok']){const _0x3077c4=_0x5bd6d0(0xc8)+(_0x1a7a70[_0x5bd6d0(0xaf)]||'unknown');return console[_0x5bd6d0(0xaf)](_0x3077c4),console[_0x5bd6d0(0xdc)](_0x5bd6d0(0xaa)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x1dc9a5[_0x5bd6d0(0xd2)]),{'ok':![]};}return console[_0x5bd6d0(0xdc)](_0x5bd6d0(0xad)+_0x1dc9a5[_0x5bd6d0(0xd2)]+'.'),console['log'](_0x5bd6d0(0xa3)),{'ok':verifyUpdatedBuiltinSkill(_0x1dc9a5[_0x5bd6d0(0xd2)])};}export const updateDefinition={'service':'update','command':'run','description':'从\x20npm\x20更新\x20'+CLI_BIN_NAME+a63_0xa34222(0xda),'risk':a63_0xa34222(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
1
+ const a83_0x16f720=a83_0x4f77;(function(_0xdb013c,_0x1110d9){const _0xc390d7=a83_0x4f77,_0xa97f9c=_0xdb013c();while(!![]){try{const _0x4b1684=-parseInt(_0xc390d7(0xdf))/0x1*(-parseInt(_0xc390d7(0xb6))/0x2)+parseInt(_0xc390d7(0xc8))/0x3+-parseInt(_0xc390d7(0xaf))/0x4*(-parseInt(_0xc390d7(0xbf))/0x5)+-parseInt(_0xc390d7(0xc3))/0x6+parseInt(_0xc390d7(0xd8))/0x7+-parseInt(_0xc390d7(0xbd))/0x8+parseInt(_0xc390d7(0xc5))/0x9*(-parseInt(_0xc390d7(0xcb))/0xa);if(_0x4b1684===_0x1110d9)break;else _0xa97f9c['push'](_0xa97f9c['shift']());}catch(_0x58c3f2){_0xa97f9c['push'](_0xa97f9c['shift']());}}}(a83_0x1969,0x84257));import{spawnSync}from'node:child_process';import a83_0x578d75 from'semver';import{CliErrors}from'../errors.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';import{resolveNpmBin}from'../utils/platform.js';import{getCliVersion}from'../utils/version.js';function a83_0x1969(){const _0x44ac5b=['find','/-/package/','latest','Updating\x20','validation','Already\x20on\x20requested\x20version\x20(v','383464ADUbqj','Choose\x20exactly\x20one\x20target:\x20--latest,\x20--beta,\x20or\x20--version\x20<version>.','\x20\x20Built-in\x20Skill\x20verification\x20failed:\x20','Unable\x20to\x20resolve\x20','current','Invalid\x20version:\x20','boolean','3644888tPoqSr','\x20\x20CLI\x20Built-in\x20Skill\x20','10nOufaz','stderr','string','\x20->\x20','2847702iibAJJ','\x20\x20Restart\x20your\x20terminal\x20to\x20use\x20the\x20new\x20version.','117NVqcWn','\x20\x20Run\x20manually:\x20npm\x20install\x20-g\x20','object','1520676XdfukR','trim','\x20\x20Run\x20manually:\x20','884960CidekU','Update\x20failed:\x20','state','unknown','log','message','Use\x20a\x20full\x20semver\x20such\x20as\x202.0.6\x20or\x202.0.7-beta.1.','\x20is\x20current.','read','map','repairCommand','error','status','4716173UABZHp','fromEntries',']:\x20','\x20CLI','run','skillVersion','filter','4aESFhh','beta','str','stdout','pipe','timeout','Install\x20the\x20version\x20from\x20npm\x20latest\x20dist-tag','inherit','\x20version\x20from\x20npm.','exit\x20','warn','bool','version','Checking\x20CLI\x20Built-in\x20Skill...','reason','toString','Checking\x20npm\x20dist-tags...','update','Install\x20a\x20specific\x20CLI\x20version','source','nonInteractive','1348776mjihhV'];a83_0x1969=function(){return _0x44ac5b;};return a83_0x1969();}import{inspectInstalledBuiltinSkillVersion,installBuiltinSkill}from'../skills/builtin-skill.js';const updateFlags=[{'name':a83_0x16f720(0xb2),'type':'boolean','description':a83_0x16f720(0xa0),'default':![]},{'name':'beta','type':a83_0x16f720(0xbc),'description':'Install\x20the\x20version\x20from\x20npm\x20beta\x20dist-tag','default':![]},{'name':a83_0x16f720(0xa6),'type':'string','description':a83_0x16f720(0xac)}];function getRequestedVersion(_0xd97d2d){const _0x1209d7=a83_0x16f720,_0x40ac90=_0xd97d2d[_0x1209d7(0x9c)](_0x1209d7(0xa6))['trim']();if(_0x40ac90)return _0x40ac90;return String(_0xd97d2d['args']?.[0x0]??'')[_0x1209d7(0xc9)]();}async function validateUpdateFlags(_0x5270dc){const _0x59be0b=a83_0x16f720,_0x301957=getRequestedVersion(_0x5270dc),_0x2b6662=[_0x5270dc[_0x59be0b(0xa5)](_0x59be0b(0xb2))?_0x59be0b(0xb2):'',_0x5270dc[_0x59be0b(0xa5)](_0x59be0b(0x9b))?_0x59be0b(0x9b):'',_0x301957?'version':'']['filter'](Boolean);if(_0x2b6662['length']>0x1)throw CliErrors[_0x59be0b(0xb4)]('--latest,\x20--beta,\x20and\x20version\x20cannot\x20be\x20used\x20together.',_0x59be0b(0xb7));if(_0x301957&&!a83_0x578d75['valid'](_0x301957))throw CliErrors[_0x59be0b(0xb4)](_0x59be0b(0xbb)+_0x301957,_0x59be0b(0xd1));}async function fetchNpmDistTags(){const _0x1a5d47=a83_0x16f720;try{const _0xbfb576=NPM_REGISTRY_BASE_URL+_0x1a5d47(0xb1)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+'/dist-tags',_0x47b965=await fetch(_0xbfb576,{'signal':AbortSignal[_0x1a5d47(0x9f)](0x2710)});if(!_0x47b965['ok'])return null;const _0x13635e=await _0x47b965['json']();if(!_0x13635e||typeof _0x13635e!==_0x1a5d47(0xc7))return null;return Object[_0x1a5d47(0xd9)](Object['entries'](_0x13635e)[_0x1a5d47(0xde)](([,_0x3d0205])=>typeof _0x3d0205===_0x1a5d47(0xc1)&&_0x3d0205[_0x1a5d47(0xc9)]())[_0x1a5d47(0xd4)](([_0x814e77,_0xf9d1cb])=>[_0x814e77,String(_0xf9d1cb)[_0x1a5d47(0xc9)]()]));}catch{return null;}}async function resolveTargetVersion(_0x5f5c11){const _0x350ad6=a83_0x16f720,_0xb499ea=getRequestedVersion(_0x5f5c11);if(_0xb499ea)return{'version':_0xb499ea,'source':'version'};const _0x53de07=_0x5f5c11[_0x350ad6(0xa5)]('beta')?'beta':_0x350ad6(0xb2),_0xb2910c=await fetchNpmDistTags(),_0xfbcec6=_0xb2910c?.[_0x53de07];if(!_0xfbcec6)return null;return{'version':_0xfbcec6,'source':_0x53de07};}function shouldInstallTarget(_0x21f3bb,_0x4b39b8){const _0x4b3e03=a83_0x16f720;if(_0x4b39b8[_0x4b3e03(0xad)]===_0x4b3e03(0xa6)||_0x4b39b8[_0x4b3e03(0xad)]===_0x4b3e03(0x9b))return!a83_0x578d75['eq'](_0x21f3bb,_0x4b39b8[_0x4b3e03(0xa6)]);return a83_0x578d75['lt'](_0x21f3bb,_0x4b39b8[_0x4b3e03(0xa6)]);}function installCliPackage(_0x5f1877,_0x23c992){const _0x1bd7cc=a83_0x16f720,_0x2ce12b=resolveNpmBin('npm'),_0x4484fd=['install','-g',LOVRABET_NPM_PACKAGE_NAME+'@'+_0x5f1877];console[_0x1bd7cc(0xcf)]('*\x20'+[_0x2ce12b,..._0x4484fd]['join']('\x20'));const _0x516541=spawnSync(_0x2ce12b,_0x4484fd,{'cwd':process['cwd'](),'stdio':_0x23c992?'pipe':'inherit','env':process.env,'shell':![]});if(_0x516541[_0x1bd7cc(0xd7)]===0x0)return{'ok':!![]};let _0x20104e=_0x516541['error']?.[_0x1bd7cc(0xd0)]||_0x1bd7cc(0xa3)+(_0x516541['status']??'unknown');if(_0x23c992){const _0x8a97a9=_0x516541[_0x1bd7cc(0xc0)]?_0x516541[_0x1bd7cc(0xc0)][_0x1bd7cc(0xa9)]()['trim']():'',_0x5f506a=_0x516541[_0x1bd7cc(0x9d)]?_0x516541[_0x1bd7cc(0x9d)][_0x1bd7cc(0xa9)]()[_0x1bd7cc(0xc9)]():'';if(_0x8a97a9)_0x20104e=_0x8a97a9;else{if(_0x5f506a)_0x20104e=_0x5f506a;}}return{'ok':![],'error':_0x20104e};}function a83_0x4f77(_0x29fceb,_0x206ebc){_0x29fceb=_0x29fceb-0x9b;const _0x19696e=a83_0x1969();let _0x4f7737=_0x19696e[_0x29fceb];return _0x4f7737;}function repairCurrentBuiltinSkill(_0x235f61){const _0x239c38=a83_0x16f720;console[_0x239c38(0xcf)]('Checking\x20CLI\x20Built-in\x20Skill...');const _0x319850=installBuiltinSkill({'stdio':_0x235f61?_0x239c38(0x9e):_0x239c38(0xa1)});if(_0x319850['ok'])return console[_0x239c38(0xcf)](_0x239c38(0xbe)+_0x319850[_0x239c38(0xdd)]+'\x20is\x20current.'),!![];return console[_0x239c38(0xa4)]('\x20\x20CLI\x20Built-in\x20Skill\x20repair\x20failed\x20['+(_0x319850['code']||'INSTALL_FAILED')+_0x239c38(0xda)+(_0x319850[_0x239c38(0xd6)]||'unknown')),console[_0x239c38(0xcf)]('\x20\x20Run\x20manually:\x20'+_0x319850['repairCommand']),![];}function verifyUpdatedBuiltinSkill(_0x195e8a){const _0x5c1f00=a83_0x16f720;console['log'](_0x5c1f00(0xa7));const _0x25d9ed=inspectInstalledBuiltinSkillVersion(_0x195e8a);if(_0x25d9ed[_0x5c1f00(0xcd)]===_0x5c1f00(0xba))return console[_0x5c1f00(0xcf)](_0x5c1f00(0xbe)+_0x195e8a+_0x5c1f00(0xd2)),!![];console[_0x5c1f00(0xa4)](_0x5c1f00(0xb8)+_0x25d9ed[_0x5c1f00(0xcd)]+'.');if(_0x25d9ed[_0x5c1f00(0xa8)])console['warn']('\x20\x20'+_0x25d9ed[_0x5c1f00(0xa8)]);return console['log'](_0x5c1f00(0xca)+_0x25d9ed[_0x5c1f00(0xd5)]),![];}async function execute(_0x210366){const _0x14f51f=a83_0x16f720;await validateUpdateFlags(_0x210366);const _0x2b0be7=getCliVersion();console['log']('Current\x20version:\x20'+_0x2b0be7),console[_0x14f51f(0xcf)](_0x14f51f(0xaa));const _0x30cf48=await resolveTargetVersion(_0x210366);if(!_0x30cf48){const _0x4ebfae=_0x210366[_0x14f51f(0xa5)]('beta')?_0x14f51f(0x9b):_0x14f51f(0xb2),_0x58e794=_0x14f51f(0xb9)+_0x4ebfae+_0x14f51f(0xa2);return console[_0x14f51f(0xa4)](_0x58e794),console[_0x14f51f(0xcf)](_0x14f51f(0xc6)+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x4ebfae),{'ok':![]};}const _0x5e357c=[_0x2b0be7,_0x30cf48[_0x14f51f(0xa6)]][_0x14f51f(0xb0)](_0x26094b=>!a83_0x578d75['valid'](_0x26094b));if(_0x5e357c)return console['warn']('Version\x20comparison\x20failed:\x20'+_0x5e357c+'.'),{'ok':![]};if(!shouldInstallTarget(_0x2b0be7,_0x30cf48)){const _0x3bd1f0=_0x30cf48[_0x14f51f(0xad)]===_0x14f51f(0xa6)?_0x14f51f(0xb5)+_0x30cf48[_0x14f51f(0xa6)]+').':'Already\x20up\x20to\x20date\x20(v'+_0x30cf48['version']+').';return console[_0x14f51f(0xcf)](_0x3bd1f0),{'ok':repairCurrentBuiltinSkill(_0x210366[_0x14f51f(0xae)])};}console['log'](_0x14f51f(0xb3)+LOVRABET_NPM_PACKAGE_NAME+':\x20'+_0x2b0be7+_0x14f51f(0xc2)+_0x30cf48['version']);const _0x34c1dc=installCliPackage(_0x30cf48[_0x14f51f(0xa6)],_0x210366[_0x14f51f(0xae)]);if(!_0x34c1dc['ok']){const _0x3da7ec=_0x14f51f(0xcc)+(_0x34c1dc[_0x14f51f(0xd6)]||_0x14f51f(0xce));return console['error'](_0x3da7ec),console[_0x14f51f(0xcf)]('\x20\x20Try\x20manually:\x20npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+_0x30cf48[_0x14f51f(0xa6)]),{'ok':![]};}return console[_0x14f51f(0xcf)]('Updated\x20to\x20v'+_0x30cf48[_0x14f51f(0xa6)]+'.'),console[_0x14f51f(0xcf)](_0x14f51f(0xc4)),{'ok':verifyUpdatedBuiltinSkill(_0x30cf48['version'])};}export const updateDefinition={'service':a83_0x16f720(0xab),'command':a83_0x16f720(0xdc),'description':'从\x20npm\x20更新\x20'+CLI_BIN_NAME+a83_0x16f720(0xdb),'risk':a83_0x16f720(0xd3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':updateFlags,'validate':validateUpdateFlags,'execute':execute};
@@ -1 +1 @@
1
- const a64_0x2d7eb1=a64_0x3cf4;(function(_0x2c31dc,_0x2e332f){const _0x39a9ea=a64_0x3cf4,_0x2fe095=_0x2c31dc();while(!![]){try{const _0x3908b1=-parseInt(_0x39a9ea(0x148))/0x1+-parseInt(_0x39a9ea(0x144))/0x2*(-parseInt(_0x39a9ea(0x14e))/0x3)+parseInt(_0x39a9ea(0x14c))/0x4*(-parseInt(_0x39a9ea(0x14b))/0x5)+-parseInt(_0x39a9ea(0x133))/0x6*(-parseInt(_0x39a9ea(0x13e))/0x7)+-parseInt(_0x39a9ea(0x13b))/0x8*(-parseInt(_0x39a9ea(0x143))/0x9)+parseInt(_0x39a9ea(0x145))/0xa+parseInt(_0x39a9ea(0x138))/0xb*(-parseInt(_0x39a9ea(0x150))/0xc);if(_0x3908b1===_0x2e332f)break;else _0x2fe095['push'](_0x2fe095['shift']());}catch(_0x5eeecb){_0x2fe095['push'](_0x2fe095['shift']());}}}(a64_0x5c50,0xc0518));function a64_0x3cf4(_0x59cfa5,_0xc97c69){_0x59cfa5=_0x59cfa5-0x132;const _0x5c50aa=a64_0x5c50();let _0x3cf45b=_0x5c50aa[_0x59cfa5];return _0x3cf45b;}import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';function a64_0x5c50(){const _0x115db4=['Pass\x20one\x20of:\x20','account-id','6FxHwXz','POST','join','将当前\x20AccessKey\x20所属的平台用户绑定到指定协同生态外部账号;已有同\x20provider\x20绑定可能被替换。','External\x20account\x20binding\x20was\x20not\x20confirmed.','11OzwxFu','string','bind','9928wGbinB','validation','Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.','986167gkkzbq','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','dingtalk','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','provider','981tapmAj','462sSsXvk','11477600QyFxuE','str','toLowerCase','1068233VsYXOA','includes','apiError','160vSVFrY','30852NtIvSx','trim','10131gcSqMH','write','1214544GBfefI','Unsupported\x20provider:\x20','user-account'];a64_0x5c50=function(){return _0x115db4;};return a64_0x5c50();}import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a64_0x2d7eb1(0x141),SUPPORTED_PROVIDERS=[a64_0x2d7eb1(0x140)];function readBindingInput(_0x403f11){const _0xc2a647=a64_0x2d7eb1,_0x44f6fd=_0x403f11['str'](_0xc2a647(0x142))[_0xc2a647(0x14d)]()[_0xc2a647(0x147)]();if(!SUPPORTED_PROVIDERS[_0xc2a647(0x149)](_0x44f6fd))throw CliErrors[_0xc2a647(0x13c)](_0xc2a647(0x151)+(_0x44f6fd||'(empty)')+'.',_0xc2a647(0x153)+SUPPORTED_PROVIDERS[_0xc2a647(0x135)](',\x20')+'.');const _0x1c68e7=_0x403f11[_0xc2a647(0x146)]('account-id')['trim']();if(!_0x1c68e7)throw CliErrors[_0xc2a647(0x13c)]('--account-id\x20cannot\x20be\x20empty.','Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.');return{'provider':_0x44f6fd,'accountId':_0x1c68e7};}function buildBindingData(_0x320af1,_0x1cff01,_0x506b95){const _0x315ec1=a64_0x2d7eb1;return{'operation':_0x315ec1(0x13a),'selector':{'provider':_0x320af1,'accountId':_0x1cff01},'before':null,'after':{'provider':_0x320af1,'accountId':_0x1cff01,'bound':!![]},'dryRun':_0x506b95,'warnings':[CURRENT_BINDING_WARNING]};}export const bindUserAccount={'service':a64_0x2d7eb1(0x152),'command':a64_0x2d7eb1(0x13a),'description':'Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','risk':a64_0x2d7eb1(0x14f),'confirmationDescription':a64_0x2d7eb1(0x136),'requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a64_0x2d7eb1(0x142),'type':a64_0x2d7eb1(0x139),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':'External\x20account\x20provider'},{'name':a64_0x2d7eb1(0x132),'type':a64_0x2d7eb1(0x139),'required':!![],'description':'External\x20account\x20ID\x20for\x20the\x20selected\x20provider'}],async 'validate'(_0x545f37){readBindingInput(_0x545f37);},async 'dryRun'(_0x1c9d6b){const _0x572ce0=a64_0x2d7eb1,{provider:_0x5a6577,accountId:_0xfcc368}=readBindingInput(_0x1c9d6b);return{...buildBindingData(_0x5a6577,_0xfcc368,!![]),'method':_0x572ce0(0x134),'url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x5a6577,'accountId':_0xfcc368}};},async 'execute'(_0xa3e621){const _0x246e09=a64_0x2d7eb1,{provider:_0x4f48f6,accountId:_0x4d1bd3}=readBindingInput(_0xa3e621),_0x1a1eb3=await bindExternalUserAccount(_0x4f48f6,_0x4d1bd3);if(_0x1a1eb3!==!![])throw CliErrors[_0x246e09(0x14a)](_0x246e09(0x137),_0x246e09(0x13d));return{'ok':!![],'data':buildBindingData(_0x4f48f6,_0x4d1bd3,![]),'message':_0x246e09(0x13f)};}};
1
+ const a84_0x5b2907=a84_0x3a14;(function(_0x28195c,_0x20b552){const _0x366084=a84_0x3a14,_0x13926=_0x28195c();while(!![]){try{const _0x27eaca=parseInt(_0x366084(0x19f))/0x1*(parseInt(_0x366084(0x185))/0x2)+-parseInt(_0x366084(0x18c))/0x3*(-parseInt(_0x366084(0x19a))/0x4)+parseInt(_0x366084(0x19b))/0x5*(parseInt(_0x366084(0x1a1))/0x6)+parseInt(_0x366084(0x196))/0x7+parseInt(_0x366084(0x189))/0x8+-parseInt(_0x366084(0x190))/0x9+-parseInt(_0x366084(0x194))/0xa;if(_0x27eaca===_0x20b552)break;else _0x13926['push'](_0x13926['shift']());}catch(_0xaffea2){_0x13926['push'](_0x13926['shift']());}}}(a84_0xd78e,0xf0ffc));import{bindExternalUserAccount,USER_ACCOUNT_BIND_PATH}from'../../core/api-client.js';function a84_0x3a14(_0xe826a3,_0xf77788){_0xe826a3=_0xe826a3-0x185;const _0xd78e7f=a84_0xd78e();let _0x3a14ac=_0xd78e7f[_0xe826a3];return _0x3a14ac;}import{CliErrors}from'../../errors.js';const CURRENT_BINDING_WARNING=a84_0x5b2907(0x188),SUPPORTED_PROVIDERS=[a84_0x5b2907(0x18b)];function readBindingInput(_0x10d67d){const _0x216f36=a84_0x5b2907,_0x1522aa=_0x10d67d[_0x216f36(0x18e)](_0x216f36(0x19d))['trim']()[_0x216f36(0x1a3)]();if(!SUPPORTED_PROVIDERS['includes'](_0x1522aa))throw CliErrors[_0x216f36(0x1a0)](_0x216f36(0x197)+(_0x1522aa||_0x216f36(0x18f))+'.',_0x216f36(0x19e)+SUPPORTED_PROVIDERS[_0x216f36(0x186)](',\x20')+'.');const _0x511670=_0x10d67d[_0x216f36(0x18e)](_0x216f36(0x192))[_0x216f36(0x195)]();if(!_0x511670)throw CliErrors[_0x216f36(0x1a0)](_0x216f36(0x18d),'Pass\x20the\x20external\x20account\x20ID\x20for\x20the\x20selected\x20provider.');return{'provider':_0x1522aa,'accountId':_0x511670};}function buildBindingData(_0x5ebec,_0xbabfc4,_0x52d8f6){return{'operation':'bind','selector':{'provider':_0x5ebec,'accountId':_0xbabfc4},'before':null,'after':{'provider':_0x5ebec,'accountId':_0xbabfc4,'bound':!![]},'dryRun':_0x52d8f6,'warnings':[CURRENT_BINDING_WARNING]};}function a84_0xd78e(){const _0x11f8ea=['Unsupported\x20provider:\x20','Bind\x20the\x20current\x20platform\x20user\x20to\x20an\x20external\x20provider\x20account','bind','88zCQDEp','5XeIGne','string','provider','Pass\x20one\x20of:\x20','60141WMkYUg','validation','1746888RyZPfQ','External\x20account\x20binding\x20was\x20not\x20confirmed.','toLowerCase','6ueazxA','join','Bound\x20current\x20user\x20to\x20external\x20provider\x20account.','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','3902440HRFfQJ','write','dingtalk','119967TYEaXv','--account-id\x20cannot\x20be\x20empty.','str','(empty)','5259348xllYIv','user-account','account-id','apiError','10382960YETaHV','trim','5394662HgGYKE'];a84_0xd78e=function(){return _0x11f8ea;};return a84_0xd78e();}export const bindUserAccount={'service':a84_0x5b2907(0x191),'command':a84_0x5b2907(0x199),'description':a84_0x5b2907(0x198),'risk':a84_0x5b2907(0x18a),'confirmationDescription':'将当前\x20AccessKey\x20所属的平台用户绑定到指定协同生态外部账号;已有同\x20provider\x20绑定可能被替换。','requiresAuth':!![],'requiresAppCode':![],'flags':[{'name':a84_0x5b2907(0x19d),'type':a84_0x5b2907(0x19c),'required':!![],'enum':[...SUPPORTED_PROVIDERS],'description':'External\x20account\x20provider'},{'name':a84_0x5b2907(0x192),'type':a84_0x5b2907(0x19c),'required':!![],'description':'External\x20account\x20ID\x20for\x20the\x20selected\x20provider'}],async 'validate'(_0x169251){readBindingInput(_0x169251);},async 'dryRun'(_0x3b9c47){const {provider:_0x51d289,accountId:_0x99ee18}=readBindingInput(_0x3b9c47);return{...buildBindingData(_0x51d289,_0x99ee18,!![]),'method':'POST','url':USER_ACCOUNT_BIND_PATH,'body':{'provider':_0x51d289,'accountId':_0x99ee18}};},async 'execute'(_0x35d132){const _0x4cb1f4=a84_0x5b2907,{provider:_0x1d8690,accountId:_0x20fcc0}=readBindingInput(_0x35d132),_0x56d90e=await bindExternalUserAccount(_0x1d8690,_0x20fcc0);if(_0x56d90e!==!![])throw CliErrors[_0x4cb1f4(0x193)](_0x4cb1f4(0x1a2),'Retry\x20with\x20the\x20same\x20--provider\x20and\x20--account-id\x20only\x20after\x20checking\x20the\x20current\x20AccessKey\x20identity.');return{'ok':!![],'data':buildBindingData(_0x1d8690,_0x20fcc0,![]),'message':_0x4cb1f4(0x187)};}};
@@ -1 +1 @@
1
- function a65_0x447d(_0x5db99d,_0x216c49){_0x5db99d=_0x5db99d-0x12a;const _0x34be24=a65_0x34be();let _0x447d1d=_0x34be24[_0x5db99d];return _0x447d1d;}(function(_0x4b2f22,_0x1eedf0){const _0x3b9326=a65_0x447d,_0x3ac64d=_0x4b2f22();while(!![]){try{const _0x456867=-parseInt(_0x3b9326(0x12d))/0x1*(parseInt(_0x3b9326(0x131))/0x2)+parseInt(_0x3b9326(0x130))/0x3+-parseInt(_0x3b9326(0x133))/0x4*(parseInt(_0x3b9326(0x12c))/0x5)+parseInt(_0x3b9326(0x134))/0x6*(-parseInt(_0x3b9326(0x12e))/0x7)+-parseInt(_0x3b9326(0x12a))/0x8+-parseInt(_0x3b9326(0x12b))/0x9*(-parseInt(_0x3b9326(0x132))/0xa)+parseInt(_0x3b9326(0x12f))/0xb;if(_0x456867===_0x1eedf0)break;else _0x3ac64d['push'](_0x3ac64d['shift']());}catch(_0x569a7a){_0x3ac64d['push'](_0x3ac64d['shift']());}}}(a65_0x34be,0x1aa1f));function a65_0x34be(){const _0x4ab540=['1489848OqYCkU','686358izpyqQ','5BviRHB','20217EMOTCT','7eZEEMr','4247287qPUxeM','67854wCfJiP','18YePoIc','20Vuwuct','248180SmTzgF','131658BlPzoR'];a65_0x34be=function(){return _0x4ab540;};return a65_0x34be();}import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];
1
+ (function(_0x591a77,_0x179efc){const _0x3e485e=a85_0x5218,_0x3be2fb=_0x591a77();while(!![]){try{const _0x33e71a=-parseInt(_0x3e485e(0x8d))/0x1+parseInt(_0x3e485e(0x8c))/0x2+parseInt(_0x3e485e(0x8b))/0x3+parseInt(_0x3e485e(0x90))/0x4+parseInt(_0x3e485e(0x8f))/0x5*(-parseInt(_0x3e485e(0x91))/0x6)+parseInt(_0x3e485e(0x92))/0x7+-parseInt(_0x3e485e(0x8e))/0x8;if(_0x33e71a===_0x179efc)break;else _0x3be2fb['push'](_0x3be2fb['shift']());}catch(_0x181dc8){_0x3be2fb['push'](_0x3be2fb['shift']());}}}(a85_0x31d3,0xf25fb));function a85_0x5218(_0x393deb,_0x2a8bc4){_0x393deb=_0x393deb-0x8b;const _0x31d3d9=a85_0x31d3();let _0x5218d0=_0x31d3d9[_0x393deb];return _0x5218d0;}function a85_0x31d3(){const _0x561933=['4326200vTPeUb','3655WMHjRT','5410968MgQtzR','14304YJvfVX','2531522SgKVMd','3873684TzXjhp','1780002RAkZoH','619375KmimWl'];a85_0x31d3=function(){return _0x561933;};return a85_0x31d3();}import{bindUserAccount}from'../../commands/user-account/bind.js';export const userAccountDefinitions=[bindUserAccount];
@@ -1 +1 @@
1
- const a66_0x490c85=a66_0x268d;function a66_0x4805(){const _0x291d08=['Run\x20`','trim','workspace','180adtmKI','items','validation','appName','join','isArray','7LmaTFy','\x0aAccessKey:\x20not\x20written','Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20','project','command','env','appcode','\x22.\x20Allowed:\x20','3210363kuBFGY','appCode','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','app','accessKey','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','108495NHGjbT','object','750630ymtkkj','1470224MInTMJ','apps','filter','use','Invalid\x20env\x20\x22','App\x20code\x20to\x20bind\x20directly','shouldWriteEnv','\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`','string','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','\x20workspace\x20','181705jkMMJy','Usage:\x20','../../core/api-client.js','includes','App\x20\x22','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','Available\x20apps:\x20','length','init','Workspace\x20app\x20context\x20is\x20already\x20initialized.','from','defaultApp','Workspace\x20app\x20context\x20is\x20not\x20initialized.','修改当前工作目录已有绑定的应用上下文','将在尚未绑定应用的当前工作目录写入\x20Lovrabet\x20项目配置,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','660274XodyBN','../../commands/app/remote-source.js','Use\x20`','18156bHpmBT','write','str','Missing\x20workspace\x20app\x20selector.'];a66_0x4805=function(){return _0x291d08;};return a66_0x4805();}(function(_0x110629,_0xbc1e62){const _0x3a87c1=a66_0x268d,_0x4a14e5=_0x110629();while(!![]){try{const _0x10a026=-parseInt(_0x3a87c1(0xf5))/0x1+-parseInt(_0x3a87c1(0xd7))/0x2+-parseInt(_0x3a87c1(0xda))/0x3*(-parseInt(_0x3a87c1(0xe1))/0x4)+parseInt(_0x3a87c1(0xc7))/0x5+parseInt(_0x3a87c1(0xf7))/0x6+parseInt(_0x3a87c1(0xe7))/0x7*(-parseInt(_0x3a87c1(0xbc))/0x8)+parseInt(_0x3a87c1(0xef))/0x9;if(_0x10a026===_0xbc1e62)break;else _0x4a14e5['push'](_0x4a14e5['shift']());}catch(_0x20720d){_0x4a14e5['push'](_0x4a14e5['shift']());}}}(a66_0x4805,0x29093));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':a66_0x490c85(0xf2),'type':a66_0x490c85(0xc4),'description':a66_0x490c85(0xd6)},{'name':a66_0x490c85(0xed),'type':a66_0x490c85(0xc4),'description':a66_0x490c85(0xc1)},{'name':a66_0x490c85(0xec),'type':a66_0x490c85(0xc4),'description':'Target\x20environment','enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x3e99c6,_0x4d7531){const _0x5a6bb5=a66_0x490c85,_0x564107=_0x3e99c6[_0x5a6bb5(0xdc)]('app')[_0x5a6bb5(0xdf)](),_0x4c5d4d=_0x3e99c6['str'](_0x5a6bb5(0xed))[_0x5a6bb5(0xdf)](),_0x3d7ecf=_0x3e99c6[_0x5a6bb5(0xdc)]('env')[_0x5a6bb5(0xdf)](),_0x1185ab=resolveWorkspaceEnv(_0x3d7ecf||_0x3e99c6['envName']||DEFAULT_CONFIG_VALUES[_0x5a6bb5(0xec)]);if(!_0x564107&&!_0x4c5d4d)throw CliErrors[_0x5a6bb5(0xe3)](_0x5a6bb5(0xdd),_0x5a6bb5(0xc8)+CLI_BIN_NAME+_0x5a6bb5(0xc6)+_0x4d7531+_0x5a6bb5(0xcc)+CLI_BIN_NAME+'\x20workspace\x20'+_0x4d7531+'\x20--appcode\x20<code>\x20[--env\x20daily]');if(_0x564107&&_0x4c5d4d)throw CliErrors[_0x5a6bb5(0xe3)]('Conflicting\x20workspace\x20app\x20selectors.','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.');const _0x13569e=resolveWriteConfigPath(_0x5a6bb5(0xea)),_0x45a269=readConfigFile(_0x13569e);assertWorkspaceCommandState(_0x4d7531,_0x45a269);const _0x1a3d4d=_0x4c5d4d||await resolveRemoteAppCode({'command':_0x4d7531,'appName':_0x564107,'env':_0x1185ab,'accessKey':_0x3e99c6['accessKey']});return writeWorkspaceConfig({'command':_0x4d7531,'appName':_0x564107,'appcode':_0x1a3d4d,'env':_0x1185ab,'shouldWriteEnv':!!_0x3d7ecf,'accessKey':_0x3e99c6[_0x5a6bb5(0xf3)]},_0x13569e,_0x45a269),{'ok':!![],'data':{'configPath':_0x13569e,'app':_0x564107||null,'appcode':_0x1a3d4d,'env':_0x3d7ecf?_0x1185ab:null,'accessKeyWritten':![],'command':'workspace\x20'+_0x4d7531},'message':buildWorkspaceMessage(_0x13569e,_0x564107,_0x1a3d4d,_0x3d7ecf?_0x1185ab:undefined)};}async function resolveRemoteAppCode(_0x52d087){const _0x306274=a66_0x490c85;if(!_0x52d087[_0x306274(0xf3)])throw CliErrors['authRequired'](_0x306274(0xe9)+CLI_BIN_NAME+_0x306274(0xc6)+_0x52d087[_0x306274(0xeb)]+'.');const {setActiveAK:_0x5db360}=await import(_0x306274(0xc9)),{getRemoteAppList:_0x5a2c83}=await import(_0x306274(0xd8));_0x5db360(_0x52d087[_0x306274(0xf3)]);const _0x4b3dd1=await _0x5a2c83({'env':_0x52d087['env'],'accessKey':_0x52d087[_0x306274(0xf3)],'noCache':![]}),_0x22ab34=findAppByName(_0x4b3dd1[_0x306274(0xe2)],_0x52d087['appName']);if(_0x22ab34&&!isRuntimeAccessibleApp(_0x22ab34))throw runtimeInaccessibleAppError(_0x22ab34,'\x22'+_0x52d087[_0x306274(0xe4)]+'\x22');const _0x3e4203=_0x22ab34?.[_0x306274(0xf0)]?.[_0x306274(0xdf)]();if(_0x3e4203)return _0x3e4203;const _0x1bd199=_0x4b3dd1[_0x306274(0xe2)]['map'](_0x5d4eae=>_0x5d4eae[_0x306274(0xe4)])[_0x306274(0xbe)](Boolean),_0x4bab3a=_0x1bd199[_0x306274(0xce)]?_0x306274(0xcd)+Array[_0x306274(0xd1)](new Set(_0x1bd199))[_0x306274(0xe5)](',\x20')+'.':_0x306274(0xde)+CLI_BIN_NAME+_0x306274(0xf1);throw CliErrors[_0x306274(0xe3)](_0x306274(0xcb)+_0x52d087[_0x306274(0xe4)]+'\x22\x20not\x20found.',_0x4bab3a);}function writeWorkspaceConfig(_0x325c73,_0x445311,_0x18d932){const _0x6cacfb=a66_0x490c85;_0x325c73[_0x6cacfb(0xc2)]&&(_0x18d932[_0x6cacfb(0xec)]=_0x325c73[_0x6cacfb(0xec)]);if(_0x325c73[_0x6cacfb(0xe4)]){const _0x1c9ad7=isRecord(_0x18d932[_0x6cacfb(0xbd)])?{..._0x18d932[_0x6cacfb(0xbd)]}:{},_0x21d857=isRecord(_0x1c9ad7[_0x325c73[_0x6cacfb(0xe4)]])?_0x1c9ad7[_0x325c73[_0x6cacfb(0xe4)]]:{};return _0x1c9ad7[_0x325c73[_0x6cacfb(0xe4)]]={..._0x21d857,'appcode':_0x325c73['appcode']},_0x18d932[_0x6cacfb(0xbd)]=_0x1c9ad7,_0x18d932[_0x6cacfb(0xd2)]=_0x325c73[_0x6cacfb(0xe4)],delete _0x18d932[_0x6cacfb(0xed)],delete _0x18d932[_0x6cacfb(0xf2)],writeAndReturn(_0x445311,_0x18d932);}return _0x18d932[_0x6cacfb(0xed)]=_0x325c73[_0x6cacfb(0xed)],delete _0x18d932['defaultApp'],delete _0x18d932[_0x6cacfb(0xf2)],writeAndReturn(_0x445311,_0x18d932);}function writeAndReturn(_0x551d88,_0x298b09){return writeConfigFile(_0x551d88,_0x298b09),_0x551d88;}function a66_0x268d(_0x5476e6,_0x424d5b){_0x5476e6=_0x5476e6-0xbc;const _0x4805a2=a66_0x4805();let _0x268d2c=_0x4805a2[_0x5476e6];return _0x268d2c;}function resolveWorkspaceEnv(_0x527001){const _0x7036b4=a66_0x490c85;if(RUNTIME_ENV_VALUES[_0x7036b4(0xca)](_0x527001))return _0x527001;throw CliErrors['validation'](_0x7036b4(0xc0)+_0x527001+_0x7036b4(0xee)+RUNTIME_ENV_VALUES[_0x7036b4(0xe5)](',\x20'));}function buildWorkspaceMessage(_0x158aa6,_0x367c3b,_0x48ead9,_0x584ead){const _0x12853b=a66_0x490c85,_0x2bed50=_0x367c3b?_0x367c3b+'\x20('+_0x48ead9+')':_0x48ead9,_0x543895=_0x584ead?'\x0aEnv:\x20'+_0x584ead:'';return'Workspace\x20configured.\x0aConfig\x20file:\x20'+_0x158aa6+'\x0aDefault\x20app:\x20'+_0x2bed50+_0x543895+_0x12853b(0xe8);}function isRecord(_0x5b8f74){const _0x94ccb5=a66_0x490c85;return typeof _0x5b8f74===_0x94ccb5(0xf6)&&_0x5b8f74!==null&&!Array[_0x94ccb5(0xe6)](_0x5b8f74);}function hasWorkspaceAppBinding(_0x490f30){const _0x27423e=a66_0x490c85;if(typeof _0x490f30[_0x27423e(0xed)]==='string'&&_0x490f30[_0x27423e(0xed)][_0x27423e(0xdf)]()[_0x27423e(0xce)]>0x0)return!![];if(typeof _0x490f30[_0x27423e(0xd2)]!=='string'||!_0x490f30[_0x27423e(0xd2)][_0x27423e(0xdf)]())return![];if(!isRecord(_0x490f30[_0x27423e(0xbd)]))return![];const _0x1492f6=_0x490f30[_0x27423e(0xbd)][_0x490f30[_0x27423e(0xd2)][_0x27423e(0xdf)]()];return isRecord(_0x1492f6)&&typeof _0x1492f6[_0x27423e(0xed)]==='string'&&_0x1492f6[_0x27423e(0xed)][_0x27423e(0xdf)]()[_0x27423e(0xce)]>0x0;}function assertWorkspaceCommandState(_0x14b4d4,_0x35f772){const _0x1a7198=a66_0x490c85,_0x9cd1b5=hasWorkspaceAppBinding(_0x35f772);if(_0x14b4d4==='init'&&_0x9cd1b5)throw CliErrors[_0x1a7198(0xe3)](_0x1a7198(0xd0),_0x1a7198(0xd9)+CLI_BIN_NAME+_0x1a7198(0xf4)+CLI_BIN_NAME+'\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.');if(_0x14b4d4===_0x1a7198(0xbf)&&!_0x9cd1b5)throw CliErrors[_0x1a7198(0xe3)](_0x1a7198(0xd3),_0x1a7198(0xde)+CLI_BIN_NAME+_0x1a7198(0xc3)+CLI_BIN_NAME+_0x1a7198(0xc5));}function makeWorkspaceCommand(_0x4d40d6){const _0x579371=a66_0x490c85;return{'service':_0x579371(0xe0),'command':_0x4d40d6,'description':_0x4d40d6===_0x579371(0xcf)?'为尚未绑定应用的当前工作目录初始化应用上下文':_0x579371(0xd4),'risk':_0x579371(0xdb),'confirmationDescription':_0x4d40d6===_0x579371(0xcf)?_0x579371(0xd5):'将更新当前工作目录已有的应用绑定,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x3ee9d1){return executeWorkspaceUse(_0x3ee9d1,_0x4d40d6);}};}export const workspaceDefinitions=[makeWorkspaceCommand(a66_0x490c85(0xcf)),makeWorkspaceCommand('use')];
1
+ const a86_0x10e23c=a86_0x4e50;(function(_0x5c2643,_0x13f459){const _0x23775f=a86_0x4e50,_0x1910c7=_0x5c2643();while(!![]){try{const _0x4efb16=-parseInt(_0x23775f(0x18e))/0x1+-parseInt(_0x23775f(0x1b4))/0x2+parseInt(_0x23775f(0x19c))/0x3+parseInt(_0x23775f(0x1a7))/0x4*(parseInt(_0x23775f(0x1c7))/0x5)+parseInt(_0x23775f(0x19b))/0x6*(parseInt(_0x23775f(0x1b8))/0x7)+-parseInt(_0x23775f(0x1a1))/0x8*(parseInt(_0x23775f(0x1b2))/0x9)+parseInt(_0x23775f(0x1bd))/0xa;if(_0x4efb16===_0x13f459)break;else _0x1910c7['push'](_0x1910c7['shift']());}catch(_0x3a0ed5){_0x1910c7['push'](_0x1910c7['shift']());}}}(a86_0x1555,0x45c28));import{CLI_BIN_NAME}from'../../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../../constant/env.js';import{CliErrors}from'../../errors.js';import{readConfigFile,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{findAppByName,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const WORKSPACE_USE_FLAGS=[{'name':'app','type':a86_0x10e23c(0x191),'description':a86_0x10e23c(0x19f)},{'name':a86_0x10e23c(0x1b5),'type':a86_0x10e23c(0x191),'description':a86_0x10e23c(0x1c6)},{'name':a86_0x10e23c(0x1c0),'type':a86_0x10e23c(0x191),'description':a86_0x10e23c(0x1a6),'enum':[...RUNTIME_ENV_VALUES]}];async function executeWorkspaceUse(_0x4ab276,_0x3a5811){const _0x2ed279=a86_0x10e23c,_0x3831b3=_0x4ab276['str'](_0x2ed279(0x1c8))['trim'](),_0x4d76f0=_0x4ab276[_0x2ed279(0x1af)](_0x2ed279(0x1b5))[_0x2ed279(0x1ca)](),_0x526531=_0x4ab276[_0x2ed279(0x1af)](_0x2ed279(0x1c0))[_0x2ed279(0x1ca)](),_0x226f45=resolveWorkspaceEnv(_0x526531||_0x4ab276[_0x2ed279(0x1be)]||DEFAULT_CONFIG_VALUES['env']);if(!_0x3831b3&&!_0x4d76f0)throw CliErrors['validation'](_0x2ed279(0x190),'Usage:\x20'+CLI_BIN_NAME+'\x20workspace\x20'+_0x3a5811+_0x2ed279(0x1c3)+CLI_BIN_NAME+_0x2ed279(0x1b0)+_0x3a5811+_0x2ed279(0x1a4));if(_0x3831b3&&_0x4d76f0)throw CliErrors['validation'](_0x2ed279(0x197),_0x2ed279(0x1bb));const _0x240753=resolveWriteConfigPath('project'),_0xcc7609=readConfigFile(_0x240753);assertWorkspaceCommandState(_0x3a5811,_0xcc7609);const _0x25b26e=_0x4d76f0||await resolveRemoteAppCode({'command':_0x3a5811,'appName':_0x3831b3,'env':_0x226f45,'accessKey':_0x4ab276['accessKey']});return writeWorkspaceConfig({'command':_0x3a5811,'appName':_0x3831b3,'appcode':_0x25b26e,'env':_0x226f45,'shouldWriteEnv':!!_0x526531,'accessKey':_0x4ab276['accessKey']},_0x240753,_0xcc7609),{'ok':!![],'data':{'configPath':_0x240753,'app':_0x3831b3||null,'appcode':_0x25b26e,'env':_0x526531?_0x226f45:null,'accessKeyWritten':![],'command':_0x2ed279(0x1cc)+_0x3a5811},'message':buildWorkspaceMessage(_0x240753,_0x3831b3,_0x25b26e,_0x526531?_0x226f45:undefined)};}async function resolveRemoteAppCode(_0x34ea94){const _0xa54414=a86_0x10e23c;if(!_0x34ea94[_0xa54414(0x1cf)])throw CliErrors[_0xa54414(0x1cb)]('Resolving\x20--app\x20requires\x20accessKey.\x20Pass\x20--appcode\x20directly,\x20or\x20set\x20accessKey\x20before\x20running\x20'+CLI_BIN_NAME+_0xa54414(0x1b0)+_0x34ea94[_0xa54414(0x1a0)]+'.');const {setActiveAK:_0xd023af}=await import(_0xa54414(0x1a3)),{getRemoteAppList:_0x2888d0}=await import(_0xa54414(0x1ba));_0xd023af(_0x34ea94[_0xa54414(0x1cf)]);const _0x453199=await _0x2888d0({'env':_0x34ea94[_0xa54414(0x1c0)],'accessKey':_0x34ea94[_0xa54414(0x1cf)],'noCache':![]}),_0x4ebb03=findAppByName(_0x453199[_0xa54414(0x1a9)],_0x34ea94[_0xa54414(0x1b1)]);if(_0x4ebb03&&!isRuntimeAccessibleApp(_0x4ebb03))throw runtimeInaccessibleAppError(_0x4ebb03,'\x22'+_0x34ea94[_0xa54414(0x1b1)]+'\x22');const _0x34b9be=_0x4ebb03?.['appCode']?.[_0xa54414(0x1ca)]();if(_0x34b9be)return _0x34b9be;const _0x2d630d=_0x453199['items'][_0xa54414(0x1aa)](_0x54b766=>_0x54b766[_0xa54414(0x1b1)])[_0xa54414(0x1ad)](Boolean),_0x2f65d9=_0x2d630d['length']?'Available\x20apps:\x20'+Array[_0xa54414(0x1c5)](new Set(_0x2d630d))[_0xa54414(0x1bc)](',\x20')+'.':_0xa54414(0x196)+CLI_BIN_NAME+_0xa54414(0x1a8);throw CliErrors[_0xa54414(0x19e)]('App\x20\x22'+_0x34ea94['appName']+_0xa54414(0x192),_0x2f65d9);}function writeWorkspaceConfig(_0x3daff9,_0x53a5a1,_0x16a2bd){const _0x11a0a9=a86_0x10e23c;_0x3daff9[_0x11a0a9(0x1b6)]&&(_0x16a2bd[_0x11a0a9(0x1c0)]=_0x3daff9[_0x11a0a9(0x1c0)]);if(_0x3daff9['appName']){const _0x2c7707=isRecord(_0x16a2bd[_0x11a0a9(0x1ac)])?{..._0x16a2bd[_0x11a0a9(0x1ac)]}:{},_0x292dcd=isRecord(_0x2c7707[_0x3daff9[_0x11a0a9(0x1b1)]])?_0x2c7707[_0x3daff9['appName']]:{};return _0x2c7707[_0x3daff9[_0x11a0a9(0x1b1)]]={..._0x292dcd,'appcode':_0x3daff9[_0x11a0a9(0x1b5)]},_0x16a2bd[_0x11a0a9(0x1ac)]=_0x2c7707,_0x16a2bd[_0x11a0a9(0x193)]=_0x3daff9[_0x11a0a9(0x1b1)],delete _0x16a2bd[_0x11a0a9(0x1b5)],delete _0x16a2bd['app'],writeAndReturn(_0x53a5a1,_0x16a2bd);}return _0x16a2bd[_0x11a0a9(0x1b5)]=_0x3daff9[_0x11a0a9(0x1b5)],delete _0x16a2bd[_0x11a0a9(0x193)],delete _0x16a2bd[_0x11a0a9(0x1c8)],writeAndReturn(_0x53a5a1,_0x16a2bd);}function writeAndReturn(_0x5c85e0,_0x4cc569){return writeConfigFile(_0x5c85e0,_0x4cc569),_0x5c85e0;}function resolveWorkspaceEnv(_0x1aee79){const _0xfbe54=a86_0x10e23c;if(RUNTIME_ENV_VALUES[_0xfbe54(0x1bf)](_0x1aee79))return _0x1aee79;throw CliErrors['validation'](_0xfbe54(0x1ab)+_0x1aee79+_0xfbe54(0x1b7)+RUNTIME_ENV_VALUES[_0xfbe54(0x1bc)](',\x20'));}function buildWorkspaceMessage(_0x40ddc2,_0x56e9a1,_0x484789,_0x4b6219){const _0x2e49f1=a86_0x10e23c,_0x17ed5d=_0x56e9a1?_0x56e9a1+'\x20('+_0x484789+')':_0x484789,_0x33f96b=_0x4b6219?_0x2e49f1(0x199)+_0x4b6219:'';return _0x2e49f1(0x1c9)+_0x40ddc2+_0x2e49f1(0x18f)+_0x17ed5d+_0x33f96b+_0x2e49f1(0x198);}function isRecord(_0x22bdd3){const _0x4c74e6=a86_0x10e23c;return typeof _0x22bdd3===_0x4c74e6(0x1a5)&&_0x22bdd3!==null&&!Array[_0x4c74e6(0x1c4)](_0x22bdd3);}function hasWorkspaceAppBinding(_0x26522a){const _0xad7a66=a86_0x10e23c;if(typeof _0x26522a[_0xad7a66(0x1b5)]===_0xad7a66(0x191)&&_0x26522a[_0xad7a66(0x1b5)]['trim']()['length']>0x0)return!![];if(typeof _0x26522a[_0xad7a66(0x193)]!==_0xad7a66(0x191)||!_0x26522a[_0xad7a66(0x193)][_0xad7a66(0x1ca)]())return![];if(!isRecord(_0x26522a[_0xad7a66(0x1ac)]))return![];const _0x56e791=_0x26522a[_0xad7a66(0x1ac)][_0x26522a[_0xad7a66(0x193)]['trim']()];return isRecord(_0x56e791)&&typeof _0x56e791[_0xad7a66(0x1b5)]===_0xad7a66(0x191)&&_0x56e791[_0xad7a66(0x1b5)][_0xad7a66(0x1ca)]()['length']>0x0;}function assertWorkspaceCommandState(_0x277da3,_0x21c50a){const _0x3651a5=a86_0x10e23c,_0x127290=hasWorkspaceAppBinding(_0x21c50a);if(_0x277da3===_0x3651a5(0x1ce)&&_0x127290)throw CliErrors[_0x3651a5(0x19e)](_0x3651a5(0x1b9),_0x3651a5(0x1a2)+CLI_BIN_NAME+_0x3651a5(0x195)+CLI_BIN_NAME+_0x3651a5(0x194));if(_0x277da3==='use'&&!_0x127290)throw CliErrors[_0x3651a5(0x19e)](_0x3651a5(0x19d),_0x3651a5(0x196)+CLI_BIN_NAME+'\x20workspace\x20init\x20--app\x20<name>`\x20or\x20`'+CLI_BIN_NAME+_0x3651a5(0x1b3));}function a86_0x4e50(_0x58f56b,_0x52e01f){_0x58f56b=_0x58f56b-0x18e;const _0x155587=a86_0x1555();let _0x4e500b=_0x155587[_0x58f56b];return _0x4e500b;}function makeWorkspaceCommand(_0x470db5){const _0x3f404d=a86_0x10e23c;return{'service':_0x3f404d(0x19a),'command':_0x470db5,'description':_0x470db5===_0x3f404d(0x1ce)?'为尚未绑定应用的当前工作目录初始化应用上下文':_0x3f404d(0x1ae),'risk':_0x3f404d(0x1c2),'confirmationDescription':_0x470db5===_0x3f404d(0x1ce)?_0x3f404d(0x1c1):'将更新当前工作目录已有的应用绑定,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':WORKSPACE_USE_FLAGS,async 'execute'(_0x9d6d03){return executeWorkspaceUse(_0x9d6d03,_0x470db5);}};}function a86_0x1555(){const _0x2d17e0=['将在尚未绑定应用的当前工作目录写入\x20Lovrabet\x20项目配置,并把所选应用设为该目录的默认应用;不会写入\x20AccessKey。','write','\x20--app\x20<name>\x20[--env\x20daily]\x20or\x20','isArray','from','App\x20code\x20to\x20bind\x20directly','80PfCmgU','app','Workspace\x20configured.\x0aConfig\x20file:\x20','trim','authRequired','workspace\x20','use','init','accessKey','524448cmOIpB','\x0aDefault\x20app:\x20','Missing\x20workspace\x20app\x20selector.','string','\x22\x20not\x20found.','defaultApp','\x20workspace\x20use\x20--appcode\x20<code>`\x20to\x20change\x20it.','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20`','Run\x20`','Conflicting\x20workspace\x20app\x20selectors.','\x0aAccessKey:\x20not\x20written','\x0aEnv:\x20','workspace','6WZpMpo','789657bNmRmd','Workspace\x20app\x20context\x20is\x20not\x20initialized.','validation','App\x20name\x20to\x20bind\x20as\x20the\x20current\x20workspace\x20default','command','14040zptzgd','Use\x20`','../../core/api-client.js','\x20--appcode\x20<code>\x20[--env\x20daily]','object','Target\x20environment','119452AlbPHy','\x20app\x20list\x20--no-cache`\x20to\x20refresh\x20available\x20apps,\x20or\x20pass\x20--appcode\x20directly.','items','map','Invalid\x20env\x20\x22','apps','filter','修改当前工作目录已有绑定的应用上下文','str','\x20workspace\x20','appName','1323rOSadV','\x20workspace\x20init\x20--appcode\x20<code>`\x20first.','233346JuBweQ','appcode','shouldWriteEnv','\x22.\x20Allowed:\x20','342440XGTTzw','Workspace\x20app\x20context\x20is\x20already\x20initialized.','../../commands/app/remote-source.js','Pass\x20either\x20--app\x20<name>\x20or\x20--appcode\x20<code>,\x20not\x20both.','join','3948950VSoFnd','envName','includes','env'];a86_0x1555=function(){return _0x2d17e0;};return a86_0x1555();}export const workspaceDefinitions=[makeWorkspaceCommand(a86_0x10e23c(0x1ce)),makeWorkspaceCommand(a86_0x10e23c(0x1cd))];
@@ -1 +1 @@
1
- const a67_0x15f063=a67_0x198a;(function(_0x53c9c1,_0x104bda){const _0x557a1f=a67_0x198a,_0x413f31=_0x53c9c1();while(!![]){try{const _0x21b5ec=parseInt(_0x557a1f(0xe9))/0x1+parseInt(_0x557a1f(0xfc))/0x2+-parseInt(_0x557a1f(0xe3))/0x3+-parseInt(_0x557a1f(0xe4))/0x4*(parseInt(_0x557a1f(0xee))/0x5)+parseInt(_0x557a1f(0xf2))/0x6*(-parseInt(_0x557a1f(0xf5))/0x7)+parseInt(_0x557a1f(0xfb))/0x8+parseInt(_0x557a1f(0xfd))/0x9;if(_0x21b5ec===_0x104bda)break;else _0x413f31['push'](_0x413f31['shift']());}catch(_0x49c482){_0x413f31['push'](_0x413f31['shift']());}}}(a67_0x215d,0xb6808));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a67_0x15f063(0xf6)],'importable':!![]},'format':{'description':a67_0x15f063(0xe5),'topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a67_0x15f063(0xec)],'importable':!![]},'pageSize':{'description':a67_0x15f063(0xfa),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':a67_0x15f063(0xe6),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':a67_0x15f063(0xe1),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':a67_0x15f063(0xff),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':a67_0x15f063(0xf9),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a67_0x15f063(0x100),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a67_0x15f063(0xf7),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a67_0x15f063(0xea)],'importable':!![]},'locale':{'description':a67_0x15f063(0xeb),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a67_0x15f063(0xe8)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object[a67_0x15f063(0xf0)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x1d3aad])=>_0x1d3aad[a67_0x15f063(0xef)])[a67_0x15f063(0xf8)](([_0x256aa4])=>_0x256aa4));function a67_0x198a(_0x123066,_0x19761e){_0x123066=_0x123066-0xe1;const _0x215dec=a67_0x215d();let _0x198aaa=_0x215dec[_0x123066];return _0x198aaa;}export const CONFIG_ENUM_VALUES=Object[a67_0x15f063(0xf1)](Object[a67_0x15f063(0xf0)](CONFIG_FIELD_SCHEMAS)[a67_0x15f063(0xe7)](([,_0x150be0])=>_0x150be0[a67_0x15f063(0xfe)])[a67_0x15f063(0xf8)](([_0x330bb1,_0x55767b])=>[_0x330bb1,[..._0x55767b[a67_0x15f063(0xfe)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a67_0x15f063(0xf0)](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x3de292])=>_0x3de292['importable'])[a67_0x15f063(0xf8)](([_0x92db7a])=>_0x92db7a);export function getConfigFieldSchema(_0x4f2216){return CONFIG_FIELD_SCHEMAS[_0x4f2216];}export function getConfigEnumValues(_0x17d13e){return getConfigFieldSchema(_0x17d13e)?.['enumValues'];}export function getConfigDefaultValue(_0x23c433){const _0x432aeb=a67_0x15f063;return getConfigFieldSchema(_0x23c433)?.[_0x432aeb(0xe2)];}export function isTopLevelConfigKey(_0x30bda9){return TOP_LEVEL_CONFIG_KEYS['has'](_0x30bda9);}export function isLegacyCompatConfigKey(_0x37bc9f){const _0x5319cd=a67_0x15f063;return getConfigFieldSchema(_0x37bc9f)?.[_0x5319cd(0xed)]===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x28a86f){return[..._0x28a86f]['join'](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5a5d4=a67_0x15f063;return _0x5a5d4(0xf3)+getTopLevelConfigKeySummary()+_0x5a5d4(0xf4);}function a67_0x215d(){const _0x37d84f=['filter','locale','983458aGCDXu','riskLevel','Locale','format','legacyCompatOnly','2861165OlTyFs','cliSettableTopLevel','entries','fromEntries','137652IzMIbK','Config\x20key.\x20Top-level:\x20',';\x20local\x20alias:\x20apps.<alias>.appcode','434uQsNBK','env','Risk\x20level','map','Override\x20SkillHub\x20domain','Default\x20page\x20size','3347968GUoYtO','251956kFfLPB','16758891uZWLAu','enumValues','Override\x20runtime\x20domain','Access\x20key\x20(client-ak\x20auth)','Override\x20user\x20domain','defaultValue','1943598OCvqYk','4GhNKSv','Default\x20output\x20format','Override\x20API\x20domain'];a67_0x215d=function(){return _0x37d84f;};return a67_0x215d();}export function buildAppProfileListFields(_0x3a675e){return{'env':_0x3a675e,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
1
+ const a87_0x4c26ae=a87_0x4f04;(function(_0x4ea87b,_0x211f02){const _0x1fea30=a87_0x4f04,_0x246587=_0x4ea87b();while(!![]){try{const _0x100311=-parseInt(_0x1fea30(0xde))/0x1+-parseInt(_0x1fea30(0xe3))/0x2+parseInt(_0x1fea30(0xd2))/0x3+-parseInt(_0x1fea30(0xdd))/0x4+parseInt(_0x1fea30(0xdb))/0x5*(parseInt(_0x1fea30(0xce))/0x6)+parseInt(_0x1fea30(0xdf))/0x7+parseInt(_0x1fea30(0xd9))/0x8;if(_0x100311===_0x211f02)break;else _0x246587['push'](_0x246587['shift']());}catch(_0x6fda6b){_0x246587['push'](_0x246587['shift']());}}}(a87_0x225f,0x5f72e));function a87_0x4f04(_0x86db2c,_0xecf491){_0x86db2c=_0x86db2c-0xcc;const _0x225f48=a87_0x225f();let _0x4f0499=_0x225f48[_0x86db2c];return _0x4f0499;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{OUTPUT_FORMAT_VALUES}from'../constant/output.js';export const CONFIG_FIELD_SCHEMAS={'env':{'description':'Target\x20environment','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':RUNTIME_ENV_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x4c26ae(0xd0)],'importable':!![]},'format':{'description':'Default\x20output\x20format','topLevel':!![],'cliSettableTopLevel':!![],'enumValues':OUTPUT_FORMAT_VALUES,'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x4c26ae(0xd6)],'importable':!![]},'pageSize':{'description':'Default\x20page\x20size','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'apiDomain':{'description':'Override\x20API\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'userDomain':{'description':'Override\x20user\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'runtimeDomain':{'description':'Override\x20runtime\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'skillHubDomain':{'description':'Override\x20SkillHub\x20domain','topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'accessKey':{'description':a87_0x4c26ae(0xd4),'topLevel':!![],'cliSettableTopLevel':!![],'importable':!![]},'riskLevel':{'description':a87_0x4c26ae(0xcc),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x4c26ae(0xd5)],'importable':!![]},'locale':{'description':a87_0x4c26ae(0xe0),'topLevel':!![],'defaultValue':DEFAULT_CONFIG_VALUES[a87_0x4c26ae(0xda)],'importable':!![],'legacyCompatOnly':!![]}};export const TOP_LEVEL_CONFIG_KEYS=new Set(Object['entries'](CONFIG_FIELD_SCHEMAS)[a87_0x4c26ae(0xe2)](([,_0x3aa36b])=>_0x3aa36b[a87_0x4c26ae(0xdc)])['map'](([_0x5cb21c])=>_0x5cb21c));export const CONFIG_ENUM_VALUES=Object[a87_0x4c26ae(0xd3)](Object['entries'](CONFIG_FIELD_SCHEMAS)['filter'](([,_0x3822f6])=>_0x3822f6[a87_0x4c26ae(0xcf)])[a87_0x4c26ae(0xd7)](([_0x24a41a,_0x3f7a02])=>[_0x24a41a,[..._0x3f7a02[a87_0x4c26ae(0xcf)]||[]]]));export const IMPORTABLE_RUNTIME_CONFIG_KEYS=Object[a87_0x4c26ae(0xe1)](CONFIG_FIELD_SCHEMAS)[a87_0x4c26ae(0xe2)](([,_0x50ec46])=>_0x50ec46['importable'])['map'](([_0x369a7a])=>_0x369a7a);export function getConfigFieldSchema(_0x5e591e){return CONFIG_FIELD_SCHEMAS[_0x5e591e];}export function getConfigEnumValues(_0x25da70){return getConfigFieldSchema(_0x25da70)?.['enumValues'];}export function getConfigDefaultValue(_0x99480f){const _0xc90048=a87_0x4c26ae;return getConfigFieldSchema(_0x99480f)?.[_0xc90048(0xcd)];}export function isTopLevelConfigKey(_0x334fcb){const _0x573041=a87_0x4c26ae;return TOP_LEVEL_CONFIG_KEYS[_0x573041(0xd8)](_0x334fcb);}export function isLegacyCompatConfigKey(_0x410cc8){return getConfigFieldSchema(_0x410cc8)?.['legacyCompatOnly']===!![];}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function formatConfigKeyList(_0x41d1b3){const _0x537092=a87_0x4c26ae;return[..._0x41d1b3][_0x537092(0xe4)](',\x20');}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a87_0x225f(){const _0x357dbc=['276maBqqh','enumValues','env',';\x20local\x20alias:\x20apps.<alias>.appcode','1143393zjSTsD','fromEntries','Access\x20key\x20(client-ak\x20auth)','riskLevel','format','map','has','8804864uxnJmV','locale','27325HarJYD','cliSettableTopLevel','1533432TrwMyd','629324QuwVTm','1359267YmaOGz','Locale','entries','filter','1047340veisdA','join','Risk\x20level','defaultValue'];a87_0x225f=function(){return _0x357dbc;};return a87_0x225f();}export function getConfigCommandKeyDescription(){const _0x26a234=a87_0x4c26ae;return'Config\x20key.\x20Top-level:\x20'+getTopLevelConfigKeySummary()+_0x26a234(0xd1);}export function buildAppProfileListFields(_0x43b616){return{'env':_0x43b616,'hasAccessKey':![],'format':null,'pageSize':null,'riskLevel':null,'locale':null};}
@@ -1 +1 @@
1
- const a68_0x1a4dd8=a68_0x54ea;function a68_0x54ea(_0x438173,_0x16ab8d){_0x438173=_0x438173-0x125;const _0xa3f93a=a68_0xa3f9();let _0x54eabb=_0xa3f93a[_0x438173];return _0x54eabb;}(function(_0x217f17,_0x3168ed){const _0x465fa0=a68_0x54ea,_0x5288bc=_0x217f17();while(!![]){try{const _0x19ce32=parseInt(_0x465fa0(0x128))/0x1*(-parseInt(_0x465fa0(0x131))/0x2)+parseInt(_0x465fa0(0x129))/0x3+parseInt(_0x465fa0(0x12d))/0x4*(parseInt(_0x465fa0(0x12a))/0x5)+-parseInt(_0x465fa0(0x130))/0x6+parseInt(_0x465fa0(0x126))/0x7*(parseInt(_0x465fa0(0x127))/0x8)+-parseInt(_0x465fa0(0x125))/0x9*(parseInt(_0x465fa0(0x12b))/0xa)+parseInt(_0x465fa0(0x132))/0xb;if(_0x19ce32===_0x3168ed)break;else _0x5288bc['push'](_0x5288bc['shift']());}catch(_0x51c497){_0x5288bc['push'](_0x5288bc['shift']());}}}(a68_0xa3f9,0x3976d));function a68_0xa3f9(){const _0x2c258e=['PUBLISHED','2806122kxEpFC','2518aFUePO','864754hazcvc','54882iycgfw','3295166uNIKNc','8pdgLSA','263MoamPW','801504wRNuWE','284735wWDJIT','110XuhNoO','UNPUBLISH','20LIEaSM','Published'];a68_0xa3f9=function(){return _0x2c258e;};return a68_0xa3f9();}export const APP_PUBLISH_STATUS={'Published':a68_0x1a4dd8(0x12f),'Unpublished':a68_0x1a4dd8(0x12c)};export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a68_0x1a4dd8(0x12e)];
1
+ const a88_0x559fff=a88_0x4648;function a88_0x4648(_0x16be80,_0x18af59){_0x16be80=_0x16be80-0xbe;const _0x55031c=a88_0x5503();let _0x46488d=_0x55031c[_0x16be80];return _0x46488d;}(function(_0x5518cc,_0x5d99da){const _0x273a69=a88_0x4648,_0x498685=_0x5518cc();while(!![]){try{const _0x4e80da=-parseInt(_0x273a69(0xca))/0x1+parseInt(_0x273a69(0xc6))/0x2*(-parseInt(_0x273a69(0xc3))/0x3)+-parseInt(_0x273a69(0xc7))/0x4+parseInt(_0x273a69(0xc5))/0x5+parseInt(_0x273a69(0xbf))/0x6*(parseInt(_0x273a69(0xcb))/0x7)+-parseInt(_0x273a69(0xc1))/0x8*(parseInt(_0x273a69(0xbe))/0x9)+parseInt(_0x273a69(0xc4))/0xa*(parseInt(_0x273a69(0xc9))/0xb);if(_0x4e80da===_0x5d99da)break;else _0x498685['push'](_0x498685['shift']());}catch(_0xde3791){_0x498685['push'](_0x498685['shift']());}}}(a88_0x5503,0x7cc60));export const APP_PUBLISH_STATUS={'Published':a88_0x559fff(0xc8),'Unpublished':a88_0x559fff(0xc2)};function a88_0x5503(){const _0x387c5c=['9ePawwi','1499028fTSRBT','Published','3871136QRgoHn','UNPUBLISH','87YWOWns','10xyPNeM','1604995Yiiwkw','20744vSAjiS','2500344SSwQKG','PUBLISHED','18613716SKehLm','841831XOBvEE','21MBzWlV'];a88_0x5503=function(){return _0x387c5c;};return a88_0x5503();}export const RUNTIME_ACCESSIBLE_APP_STATUS=APP_PUBLISH_STATUS[a88_0x559fff(0xc0)];