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

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 (160) 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.js +1 -1
  36. package/lib/commands/notification/index.js +1 -1
  37. package/lib/commands/notification/shared.js +1 -1
  38. package/lib/commands/ocr/index.js +1 -1
  39. package/lib/commands/permit/dataset-get.js +1 -1
  40. package/lib/commands/permit/dataset-set.js +1 -1
  41. package/lib/commands/permit/index.js +1 -1
  42. package/lib/commands/permit/page-get.js +1 -1
  43. package/lib/commands/permit/page-set.js +1 -1
  44. package/lib/commands/permit/role-menus-set.js +1 -1
  45. package/lib/commands/permit/role-menus.js +1 -1
  46. package/lib/commands/permit/shared.js +1 -1
  47. package/lib/commands/personal-bff/index.js +1 -1
  48. package/lib/commands/registry.js +1 -1
  49. package/lib/commands/role/create.js +1 -1
  50. package/lib/commands/role/delete.js +1 -1
  51. package/lib/commands/role/detail.js +1 -1
  52. package/lib/commands/role/index.js +1 -1
  53. package/lib/commands/role/list.js +1 -1
  54. package/lib/commands/role/shared.js +1 -1
  55. package/lib/commands/role/update.js +1 -1
  56. package/lib/commands/role/user-add.js +1 -1
  57. package/lib/commands/role/user-remove.js +1 -1
  58. package/lib/commands/schedule/index.js +1 -1
  59. package/lib/commands/schema.js +1 -1
  60. package/lib/commands/service/dynamic.js +1 -1
  61. package/lib/commands/service/function-name-adapter.js +1 -1
  62. package/lib/commands/service/index.js +1 -1
  63. package/lib/commands/service/registry.js +1 -1
  64. package/lib/commands/skill/commands/create.js +1 -1
  65. package/lib/commands/skill/commands/diagram.js +1 -1
  66. package/lib/commands/skill/commands/install.js +1 -1
  67. package/lib/commands/skill/commands/list.js +1 -1
  68. package/lib/commands/skill/commands/push.js +1 -1
  69. package/lib/commands/skill/commands/validate.js +1 -1
  70. package/lib/commands/skill/diagram.js +1 -1
  71. package/lib/commands/skill/flags.js +1 -1
  72. package/lib/commands/skill/index.js +1 -1
  73. package/lib/commands/skill/manifest-helpers.js +1 -1
  74. package/lib/commands/skill/push-execute.js +1 -1
  75. package/lib/commands/skill/push-flow-helpers.js +1 -1
  76. package/lib/commands/skill/push-retarget.js +1 -1
  77. package/lib/commands/skill/scopes.js +1 -1
  78. package/lib/commands/skill/summary.js +1 -1
  79. package/lib/commands/skill/templates.js +1 -1
  80. package/lib/commands/skill/validate.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/update.js +1 -1
  85. package/lib/commands/user-account/bind.js +1 -1
  86. package/lib/commands/user-account/index.js +1 -1
  87. package/lib/commands/workspace/index.js +1 -1
  88. package/lib/config/schema.js +1 -1
  89. package/lib/constant/app.js +1 -1
  90. package/lib/constant/auth-mode.js +1 -1
  91. package/lib/constant/cli.js +1 -1
  92. package/lib/constant/defaults.js +1 -1
  93. package/lib/constant/distribution.js +1 -1
  94. package/lib/constant/domain.js +1 -1
  95. package/lib/constant/env.js +1 -1
  96. package/lib/constant/output.js +1 -1
  97. package/lib/constant/product.js +1 -1
  98. package/lib/constant/risk.js +1 -1
  99. package/lib/constant/url.js +1 -1
  100. package/lib/context.js +1 -1
  101. package/lib/core/api-client.d.ts +3 -3
  102. package/lib/core/api-client.js +1 -1
  103. package/lib/core/db-resolver.js +1 -1
  104. package/lib/core/sdk-client.js +1 -1
  105. package/lib/errors.js +1 -1
  106. package/lib/framework/build-all-flags.js +1 -1
  107. package/lib/framework/dryrun.js +1 -1
  108. package/lib/framework/flags.js +1 -1
  109. package/lib/framework/help.js +1 -1
  110. package/lib/framework/index.js +1 -1
  111. package/lib/framework/output.js +1 -1
  112. package/lib/framework/preparse.js +1 -1
  113. package/lib/framework/rate-limit.js +1 -1
  114. package/lib/framework/raw-flags.js +1 -1
  115. package/lib/framework/response.js +1 -1
  116. package/lib/framework/runner-confirmation.js +1 -1
  117. package/lib/framework/runner-error.js +1 -1
  118. package/lib/framework/runner.js +1 -1
  119. package/lib/framework/schema-export.js +1 -1
  120. package/lib/framework/service-order.js +1 -1
  121. package/lib/framework/types.js +1 -1
  122. package/lib/generated/build-info.d.ts +4 -4
  123. package/lib/generated/build-info.js +1 -1
  124. package/lib/help.js +1 -1
  125. package/lib/postinstall.js +1 -1
  126. package/lib/runtime/confirmation.js +1 -1
  127. package/lib/runtime/event.js +1 -1
  128. package/lib/runtime/index.js +1 -1
  129. package/lib/runtime/queue.js +1 -1
  130. package/lib/runtime/resolve.js +1 -1
  131. package/lib/skills/builtin-skill.js +1 -1
  132. package/lib/skills/npx-skills-add.js +1 -1
  133. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  134. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  135. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  136. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  137. package/lib/skills/runtime-skill-sync/links.js +1 -1
  138. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  139. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  140. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  141. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  142. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  143. package/lib/skills/runtime-skill-sync/push.js +1 -1
  144. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  146. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  147. package/lib/skills/runtime-skill-sync.js +1 -1
  148. package/lib/skills/skill-presence.js +1 -1
  149. package/lib/utils/apply-jq-filter.js +1 -1
  150. package/lib/utils/logger.js +1 -1
  151. package/lib/utils/lossless-json.js +1 -1
  152. package/lib/utils/params.js +1 -1
  153. package/lib/utils/platform.js +1 -1
  154. package/lib/utils/update-notice.js +1 -1
  155. package/lib/utils/version.js +1 -1
  156. package/lib/utils/write-cli-side-channel.js +1 -1
  157. package/package.json +1 -1
  158. package/skills/lovrabet/SKILL.md +4 -4
  159. package/skills/lovrabet/references/lovrabet-schedule-workflow.md +7 -6
  160. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a57_0x5c8dd7=a57_0x6322;(function(_0x45d110,_0x4e28d4){const _0x4560d9=a57_0x6322,_0x4299bc=_0x45d110();while(!![]){try{const _0x13f924=parseInt(_0x4560d9(0xfb))/0x1*(-parseInt(_0x4560d9(0x12c))/0x2)+parseInt(_0x4560d9(0x126))/0x3*(-parseInt(_0x4560d9(0xfc))/0x4)+parseInt(_0x4560d9(0x145))/0x5*(-parseInt(_0x4560d9(0x140))/0x6)+-parseInt(_0x4560d9(0x122))/0x7*(-parseInt(_0x4560d9(0x10c))/0x8)+-parseInt(_0x4560d9(0x131))/0x9*(parseInt(_0x4560d9(0x137))/0xa)+-parseInt(_0x4560d9(0x12b))/0xb*(parseInt(_0x4560d9(0x117))/0xc)+-parseInt(_0x4560d9(0xf7))/0xd*(-parseInt(_0x4560d9(0x13f))/0xe);if(_0x13f924===_0x4e28d4)break;else _0x4299bc['push'](_0x4299bc['shift']());}catch(_0x509669){_0x4299bc['push'](_0x4299bc['shift']());}}}(a57_0x332d,0x887e6));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a57_0x5c8dd7(0x134),'type':a57_0x5c8dd7(0x143),'required':!![],'enum':['CRON',a57_0x5c8dd7(0x104)],'description':a57_0x5c8dd7(0x11a)},CRON_FLAG={'name':a57_0x5c8dd7(0x109),'type':'string','description':a57_0x5c8dd7(0x11c)},SCHEDULED_AT_FLAG={'name':a57_0x5c8dd7(0x13d),'type':a57_0x5c8dd7(0x143),'description':a57_0x5c8dd7(0x120)},TITLE_FLAG={'name':a57_0x5c8dd7(0x133),'type':'string','required':!![],'description':a57_0x5c8dd7(0x10f)},PROMPT_FLAG={'name':a57_0x5c8dd7(0x12f),'type':'string','required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':a57_0x5c8dd7(0x141),'type':a57_0x5c8dd7(0x143),'enum':[a57_0x5c8dd7(0x11f),'premium'],'default':a57_0x5c8dd7(0x132),'description':a57_0x5c8dd7(0x115)},SCHEDULE_ID_FLAG={'name':a57_0x5c8dd7(0x144),'type':'string','required':!![],'description':a57_0x5c8dd7(0x142),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a57_0x5c8dd7(0x118),'type':a57_0x5c8dd7(0x11d),'default':0x14,'description':a57_0x5c8dd7(0x108)},CURSOR_FLAG={'name':'cursor','type':a57_0x5c8dd7(0x143),'description':a57_0x5c8dd7(0x102)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x1c5f39){const _0x31d4c3=a57_0x5c8dd7,_0x3673bc=_0x1c5f39[_0x31d4c3(0x12d)]('kind'),_0x22578f=_0x1c5f39['str'](_0x31d4c3(0x133))[_0x31d4c3(0x116)](),_0x22940b=_0x1c5f39[_0x31d4c3(0x12d)]('prompt')['trim'](),_0x2a31e1=_0x1c5f39[_0x31d4c3(0x12d)]('channel'),_0x1f07d7=_0x1c5f39[_0x31d4c3(0x12d)](_0x31d4c3(0x109)),_0x597752=_0x1c5f39[_0x31d4c3(0x12d)](_0x31d4c3(0x13d));if(!_0x22578f)throw CliErrors[_0x31d4c3(0x128)](_0x31d4c3(0x13b));if(!_0x22940b)throw CliErrors['validation'](_0x31d4c3(0x105));if(_0x3673bc===_0x31d4c3(0x125)){if(!_0x1f07d7||_0x597752)throw CliErrors[_0x31d4c3(0x128)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x3673bc,'timezone':_0x31d4c3(0x11b),'cron':_0x1f07d7,'title':_0x22578f,'prompt':_0x22940b,'channel':_0x2a31e1};}if(_0x3673bc===_0x31d4c3(0x104)){if(!_0x597752||_0x1f07d7)throw CliErrors[_0x31d4c3(0x128)](_0x31d4c3(0x13e));return{'kind':_0x3673bc,'timezone':_0x31d4c3(0x11b),'scheduledAt':_0x597752,'title':_0x22578f,'prompt':_0x22940b,'channel':_0x2a31e1};}throw CliErrors['validation'](_0x31d4c3(0xfd));}function scheduleCollectionPath(_0x3f020c){const _0x407689=a57_0x5c8dd7;return'/api/harness/apps/'+encodeURIComponent(_0x3f020c)+_0x407689(0x113);}function scheduleItemPath(_0x91f0ef,_0x3d41bb){return scheduleCollectionPath(_0x91f0ef)+'/'+encodeURIComponent(_0x3d41bb);}function a57_0x6322(_0x39c6ad,_0x4f37ee){_0x39c6ad=_0x39c6ad-0xf6;const _0x332da5=a57_0x332d();let _0x6322f0=_0x332da5[_0x39c6ad];return _0x6322f0;}const scheduleValidate={'service':'schedule','command':a57_0x5c8dd7(0x10d),'description':a57_0x5c8dd7(0x119),'risk':a57_0x5c8dd7(0x127),'flags':INPUT_FLAGS,async 'validate'(_0x476074){readScheduleInput(_0x476074);},async 'execute'(_0x2afe30){const _0x3fcaa3=a57_0x5c8dd7,_0x4d49e3=readScheduleInput(_0x2afe30),_0x3c8942=await validateRuntimeSchedule(_0x2afe30[_0x3fcaa3(0x111)],_0x4d49e3);return{'ok':!![],'data':_0x3c8942,'message':_0x3fcaa3(0x13a)};}},scheduleCreate={'service':a57_0x5c8dd7(0x12e),'command':a57_0x5c8dd7(0x138),'description':a57_0x5c8dd7(0x121),'risk':'high-risk-write','confirmationDescription':a57_0x5c8dd7(0x106),'flags':INPUT_FLAGS,async 'validate'(_0x1a64f8){readScheduleInput(_0x1a64f8);},async 'execute'(_0x301eec){const _0x3d3253=a57_0x5c8dd7,_0xfa9eed=readScheduleInput(_0x301eec),_0x28d198=await validateRuntimeSchedule(_0x301eec[_0x3d3253(0x111)],_0xfa9eed),_0x30b832=await createRuntimeSchedule(_0x301eec[_0x3d3253(0x111)],_0x28d198);return{'ok':!![],'data':_0x30b832,'message':_0x3d3253(0x12a)+_0x30b832[_0x3d3253(0x134)]+_0x3d3253(0x146)+_0x30b832[_0x3d3253(0x13c)]};},async 'dryRun'(_0x599fbb){const _0x1f914d=a57_0x5c8dd7,_0x52fb8a=readScheduleInput(_0x599fbb);return dryRun(_0x1f914d(0x10e),scheduleCollectionPath(_0x599fbb['appCode']))[_0x1f914d(0x10b)](_0x52fb8a)[_0x1f914d(0xf9)](_0x1f914d(0xff))[_0x1f914d(0x147)]();}},scheduleList={'service':a57_0x5c8dd7(0x12e),'command':a57_0x5c8dd7(0x124),'description':a57_0x5c8dd7(0xf6),'risk':a57_0x5c8dd7(0x127),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0xd38a1a){const _0x2c3114=a57_0x5c8dd7,_0x558abd=_0xd38a1a[_0x2c3114(0x114)](_0x2c3114(0x118));if(!Number[_0x2c3114(0x130)](_0x558abd)||_0x558abd<0x1||_0x558abd>0x64)throw CliErrors[_0x2c3114(0x128)](_0x2c3114(0x103));const _0x2dd60e=_0xd38a1a['str'](_0x2c3114(0x135));if(_0x2dd60e&&(_0x2dd60e[_0x2c3114(0x112)]>0x400||_0x2dd60e['trim']()!==_0x2dd60e))throw CliErrors[_0x2c3114(0x128)]('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x1ea7ac){const _0x4c8e34=a57_0x5c8dd7,_0x480a16=_0x1ea7ac[_0x4c8e34(0x12d)](_0x4c8e34(0x135)),_0x1c57c3=await listRuntimeSchedules(_0x1ea7ac[_0x4c8e34(0x111)],{'kind':_0x1ea7ac[_0x4c8e34(0x12d)](_0x4c8e34(0x134)),'limit':_0x1ea7ac[_0x4c8e34(0x114)](_0x4c8e34(0x118)),..._0x480a16?{'cursor':_0x480a16}:{}});return{'ok':!![],'data':_0x1c57c3};}},scheduleDetail={'service':a57_0x5c8dd7(0x12e),'command':a57_0x5c8dd7(0x10a),'description':a57_0x5c8dd7(0x100),'risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2ca5ea){const _0x544eb6=a57_0x5c8dd7,_0x1ced44=await getRuntimeSchedule(_0x2ca5ea[_0x544eb6(0x111)],_0x2ca5ea[_0x544eb6(0x12d)](_0x544eb6(0x144)));return{'ok':!![],'data':_0x1ced44};}},scheduleRun={'service':'schedule','command':'run','description':a57_0x5c8dd7(0x11e),'risk':a57_0x5c8dd7(0x107),'confirmationDescription':a57_0x5c8dd7(0x101),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1aaaf7){const _0x4b304b=a57_0x5c8dd7,_0x4035d5=_0x1aaaf7[_0x4b304b(0x12d)]('schedule-id'),_0x18cde0=await runRuntimeSchedule(_0x1aaaf7[_0x4b304b(0x111)],_0x4035d5);return{'ok':!![],'data':_0x18cde0,'message':_0x4b304b(0x129)+_0x18cde0['taskId']+'\x20from\x20schedule\x20'+_0x4035d5};},async 'dryRun'(_0x586018){const _0x72d493=a57_0x5c8dd7,_0x4d1df8=_0x586018[_0x72d493(0x12d)](_0x72d493(0x144));return dryRun('POST',scheduleItemPath(_0x586018[_0x72d493(0x111)],_0x4d1df8)+_0x72d493(0xf8))[_0x72d493(0xf9)](_0x72d493(0x123)+_0x4d1df8+'\x20immediately')[_0x72d493(0x147)]();}},scheduleDelete={'service':a57_0x5c8dd7(0x12e),'command':a57_0x5c8dd7(0x139),'description':a57_0x5c8dd7(0xfe),'risk':a57_0x5c8dd7(0x107),'confirmationDescription':a57_0x5c8dd7(0xfa),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2268cb){const _0x58cc27=a57_0x5c8dd7,_0x313b8d=_0x2268cb['str']('schedule-id'),_0x1a1992=await deleteRuntimeSchedule(_0x2268cb[_0x58cc27(0x111)],_0x313b8d);return{'ok':!![],'data':_0x1a1992,'message':'Deleted\x20schedule\x20'+_0x313b8d};},async 'dryRun'(_0x4d2dc6){const _0x1c0ccf=a57_0x5c8dd7,_0x39dcbf=_0x4d2dc6[_0x1c0ccf(0x12d)]('schedule-id');return dryRun(_0x1c0ccf(0x110),scheduleItemPath(_0x4d2dc6[_0x1c0ccf(0x111)],_0x39dcbf))['description'](_0x1c0ccf(0x136)+_0x39dcbf)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];function a57_0x332d(){const _0x488a5d=['auto','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','创建周期性或单次执行的\x20Agent\x20定时任务','28rvEKDX','Preview:\x20run\x20schedule\x20','list','CRON','9LCcnAs','read','validation','Queued\x20Task\x20','Created\x20','5379xKstUp','2FiJnIH','str','schedule','prompt','isSafeInteger','18VQFWxf','premium','title','kind','cursor','Preview:\x20delete\x20schedule\x20','143230flwUyU','create','delete','Schedule\x20input\x20is\x20valid','--title\x20must\x20not\x20be\x20blank.','scheduleId','scheduled-at','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','18124330zEoKSW','18xURcfA','channel','Schedule\x20UUID','string','schedule-id','955610RFiNgt','\x20schedule\x20','build','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','26sJPfRx','/run','description','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','429643gDHDCL','129764aDhRYl','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','删除定时任务并停止其后续触发','Preview:\x20create\x20an\x20Agent\x20schedule','Show\x20one\x20schedule\x20by\x20schedule\x20ID','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','ONCE','--prompt\x20must\x20not\x20be\x20blank.','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','high-risk-write','Page\x20size\x20from\x201\x20to\x20100','cron','detail','body','230016HqMrem','validate','POST','Schedule\x20title','DELETE','appCode','length','/schedules','num','Task\x20channel:\x20auto\x20or\x20premium','trim','24936ylMdIY','limit','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','Schedule\x20kind:\x20CRON\x20or\x20ONCE','UTC','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','number','立即运行一次定时任务并创建\x20Task'];a57_0x332d=function(){return _0x488a5d;};return a57_0x332d();}
1
+ const a57_0x3c9fc8=a57_0x11c3;(function(_0x24178a,_0x381055){const _0x15bf28=a57_0x11c3,_0x5e0211=_0x24178a();while(!![]){try{const _0x5b32c0=-parseInt(_0x15bf28(0x1e1))/0x1*(parseInt(_0x15bf28(0x1de))/0x2)+parseInt(_0x15bf28(0x1c6))/0x3+parseInt(_0x15bf28(0x1da))/0x4*(-parseInt(_0x15bf28(0x1a9))/0x5)+parseInt(_0x15bf28(0x1e9))/0x6*(-parseInt(_0x15bf28(0x1e2))/0x7)+-parseInt(_0x15bf28(0x1a7))/0x8+parseInt(_0x15bf28(0x1aa))/0x9+parseInt(_0x15bf28(0x1ca))/0xa*(parseInt(_0x15bf28(0x1bd))/0xb);if(_0x5b32c0===_0x381055)break;else _0x5e0211['push'](_0x5e0211['shift']());}catch(_0x1333de){_0x5e0211['push'](_0x5e0211['shift']());}}}(a57_0x3bf1,0x9e1b5));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':a57_0x3c9fc8(0x1c7),'type':'string','required':!![],'enum':[a57_0x3c9fc8(0x1b1),a57_0x3c9fc8(0x1c2)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':'cron','type':a57_0x3c9fc8(0x1b5),'description':a57_0x3c9fc8(0x1e8)},SCHEDULED_AT_FLAG={'name':a57_0x3c9fc8(0x1a3),'type':a57_0x3c9fc8(0x1b5),'description':a57_0x3c9fc8(0x1c3)},TITLE_FLAG={'name':a57_0x3c9fc8(0x1df),'type':a57_0x3c9fc8(0x1b5),'required':!![],'description':a57_0x3c9fc8(0x1c9)},PROMPT_FLAG={'name':a57_0x3c9fc8(0x1e0),'type':a57_0x3c9fc8(0x1b5),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':'model','type':'string','enum':[a57_0x3c9fc8(0x1ac),a57_0x3c9fc8(0x1ea),a57_0x3c9fc8(0x1d8)],'default':a57_0x3c9fc8(0x1ea),'description':a57_0x3c9fc8(0x1ae)},SCHEDULE_ID_FLAG={'name':a57_0x3c9fc8(0x1a5),'type':a57_0x3c9fc8(0x1b5),'required':!![],'description':a57_0x3c9fc8(0x1e5),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a57_0x3c9fc8(0x1d0)}},LIMIT_FLAG={'name':a57_0x3c9fc8(0x1ce),'type':a57_0x3c9fc8(0x1d5),'default':0x14,'description':a57_0x3c9fc8(0x1d2)},CURSOR_FLAG={'name':a57_0x3c9fc8(0x1ba),'type':a57_0x3c9fc8(0x1b5),'description':a57_0x3c9fc8(0x1c4)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x23ef8c){const _0x13ebb3=a57_0x3c9fc8,_0x5259f4=_0x23ef8c[_0x13ebb3(0x1b7)](_0x13ebb3(0x1c7)),_0x548e11=_0x23ef8c[_0x13ebb3(0x1b7)]('title')[_0x13ebb3(0x1c5)](),_0x1f9f73=_0x23ef8c['str'](_0x13ebb3(0x1e0))[_0x13ebb3(0x1c5)](),_0x4f4b57=_0x23ef8c[_0x13ebb3(0x1b7)](_0x13ebb3(0x1dc)),_0x261652=_0x23ef8c[_0x13ebb3(0x1b7)](_0x13ebb3(0x1bf)),_0x37ed89=_0x23ef8c[_0x13ebb3(0x1b7)](_0x13ebb3(0x1a3));if(!_0x548e11)throw CliErrors['validation'](_0x13ebb3(0x1a8));if(!_0x1f9f73)throw CliErrors[_0x13ebb3(0x1d7)](_0x13ebb3(0x1bb));if(_0x5259f4===_0x13ebb3(0x1b1)){if(!_0x261652||_0x37ed89)throw CliErrors['validation'](_0x13ebb3(0x1e3));return{'kind':_0x5259f4,'timezone':_0x13ebb3(0x1cf),'cron':_0x261652,'title':_0x548e11,'prompt':_0x1f9f73,'model':_0x4f4b57};}if(_0x5259f4===_0x13ebb3(0x1c2)){if(!_0x37ed89||_0x261652)throw CliErrors[_0x13ebb3(0x1d7)](_0x13ebb3(0x1e4));return{'kind':_0x5259f4,'timezone':'UTC','scheduledAt':_0x37ed89,'title':_0x548e11,'prompt':_0x1f9f73,'model':_0x4f4b57};}throw CliErrors[_0x13ebb3(0x1d7)](_0x13ebb3(0x1b2));}function scheduleCollectionPath(_0x213dcf){const _0x11c2c2=a57_0x3c9fc8;return'/api/harness/apps/'+encodeURIComponent(_0x213dcf)+_0x11c2c2(0x1ab);}function a57_0x3bf1(){const _0x573ea9=['kimi/k3','build','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','read','Preview:\x20run\x20schedule\x20','CRON','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','DELETE','Preview:\x20delete\x20schedule\x20','string','description','str','length','Deleted\x20schedule\x20','cursor','--prompt\x20must\x20not\x20be\x20blank.','high-risk-write','22dNSdDF','delete','cron','\x20from\x20schedule\x20','schedule','ONCE','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','trim','3413214MKkfQY','kind','run','Schedule\x20title','10021210qIaCpI','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','Queued\x20Task\x20','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','limit','UTC','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','\x20schedule\x20','Page\x20size\x20from\x201\x20to\x20100','body','\x20immediately','number','立即运行一次定时任务并创建\x20Task','validation','deepseek-v4-pro-0813','num','87788bIrEnn','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','model','taskId','2XoPLoO','title','prompt','875074sEwpBM','28flJCET','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','Schedule\x20UUID','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','create','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','1455852OfvUwU','deepseek-v4-flash-0731','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','detail','scheduleId','appCode','scheduled-at','Preview:\x20create\x20an\x20Agent\x20schedule','schedule-id','POST','3917896jSAIoh','--title\x20must\x20not\x20be\x20blank.','230FOCEqA','7655094XiGrce','/schedules'];a57_0x3bf1=function(){return _0x573ea9;};return a57_0x3bf1();}function a57_0x11c3(_0x3ab31e,_0x4d0816){_0x3ab31e=_0x3ab31e-0x19f;const _0x3bf1e0=a57_0x3bf1();let _0x11c3ee=_0x3bf1e0[_0x3ab31e];return _0x11c3ee;}function scheduleItemPath(_0xfea201,_0x4237aa){return scheduleCollectionPath(_0xfea201)+'/'+encodeURIComponent(_0x4237aa);}const scheduleValidate={'service':'schedule','command':'validate','description':a57_0x3c9fc8(0x19f),'risk':a57_0x3c9fc8(0x1af),'flags':INPUT_FLAGS,async 'validate'(_0x258ae8){readScheduleInput(_0x258ae8);},async 'execute'(_0x287218){const _0x16b7fa=a57_0x3c9fc8,_0x476c07=readScheduleInput(_0x287218),_0x32bde3=await validateRuntimeSchedule(_0x287218[_0x16b7fa(0x1a2)],_0x476c07);return{'ok':!![],'data':_0x32bde3,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a57_0x3c9fc8(0x1c1),'command':a57_0x3c9fc8(0x1e7),'description':'创建周期性或单次执行的\x20Agent\x20定时任务','risk':'high-risk-write','confirmationDescription':a57_0x3c9fc8(0x1cb),'flags':INPUT_FLAGS,async 'validate'(_0x163a4c){readScheduleInput(_0x163a4c);},async 'execute'(_0x129c13){const _0x2ff853=a57_0x3c9fc8,_0x2e5c56=readScheduleInput(_0x129c13),_0x2ce47a=await validateRuntimeSchedule(_0x129c13[_0x2ff853(0x1a2)],_0x2e5c56),_0x2642f6=await createRuntimeSchedule(_0x129c13[_0x2ff853(0x1a2)],_0x2ce47a);return{'ok':!![],'data':_0x2642f6,'message':'Created\x20'+_0x2642f6[_0x2ff853(0x1c7)]+_0x2ff853(0x1d1)+_0x2642f6[_0x2ff853(0x1a1)]};},async 'dryRun'(_0x41adb0){const _0x35cf79=a57_0x3c9fc8,_0x7935b0=readScheduleInput(_0x41adb0);return dryRun(_0x35cf79(0x1a6),scheduleCollectionPath(_0x41adb0[_0x35cf79(0x1a2)]))[_0x35cf79(0x1d3)](_0x7935b0)[_0x35cf79(0x1b6)](_0x35cf79(0x1a4))[_0x35cf79(0x1ad)]();}},scheduleList={'service':a57_0x3c9fc8(0x1c1),'command':'list','description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':'read','flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x99ecb7){const _0x4ad507=a57_0x3c9fc8,_0x17302e=_0x99ecb7[_0x4ad507(0x1d9)]('limit');if(!Number['isSafeInteger'](_0x17302e)||_0x17302e<0x1||_0x17302e>0x64)throw CliErrors['validation']('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x59cae8=_0x99ecb7['str'](_0x4ad507(0x1ba));if(_0x59cae8&&(_0x59cae8[_0x4ad507(0x1b8)]>0x400||_0x59cae8['trim']()!==_0x59cae8))throw CliErrors[_0x4ad507(0x1d7)](_0x4ad507(0x1e6));},async 'execute'(_0x6bfc08){const _0x1b62af=a57_0x3c9fc8,_0x1d071a=_0x6bfc08[_0x1b62af(0x1b7)](_0x1b62af(0x1ba)),_0x10cfb4=await listRuntimeSchedules(_0x6bfc08[_0x1b62af(0x1a2)],{'kind':_0x6bfc08[_0x1b62af(0x1b7)](_0x1b62af(0x1c7)),'limit':_0x6bfc08[_0x1b62af(0x1d9)](_0x1b62af(0x1ce)),..._0x1d071a?{'cursor':_0x1d071a}:{}});return{'ok':!![],'data':_0x10cfb4};}},scheduleDetail={'service':a57_0x3c9fc8(0x1c1),'command':a57_0x3c9fc8(0x1a0),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a57_0x3c9fc8(0x1af),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1d6668){const _0x35b8d7=a57_0x3c9fc8,_0x31627a=await getRuntimeSchedule(_0x1d6668[_0x35b8d7(0x1a2)],_0x1d6668['str'](_0x35b8d7(0x1a5)));return{'ok':!![],'data':_0x31627a};}},scheduleRun={'service':a57_0x3c9fc8(0x1c1),'command':a57_0x3c9fc8(0x1c8),'description':a57_0x3c9fc8(0x1d6),'risk':a57_0x3c9fc8(0x1bc),'confirmationDescription':a57_0x3c9fc8(0x1db),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xff1306){const _0x4faf8c=a57_0x3c9fc8,_0x410407=_0xff1306[_0x4faf8c(0x1b7)](_0x4faf8c(0x1a5)),_0x4547c3=await runRuntimeSchedule(_0xff1306['appCode'],_0x410407);return{'ok':!![],'data':_0x4547c3,'message':_0x4faf8c(0x1cc)+_0x4547c3[_0x4faf8c(0x1dd)]+_0x4faf8c(0x1c0)+_0x410407};},async 'dryRun'(_0x4c0561){const _0xaa4de9=a57_0x3c9fc8,_0xc061d0=_0x4c0561['str'](_0xaa4de9(0x1a5));return dryRun(_0xaa4de9(0x1a6),scheduleItemPath(_0x4c0561[_0xaa4de9(0x1a2)],_0xc061d0)+'/run')[_0xaa4de9(0x1b6)](_0xaa4de9(0x1b0)+_0xc061d0+_0xaa4de9(0x1d4))[_0xaa4de9(0x1ad)]();}},scheduleDelete={'service':a57_0x3c9fc8(0x1c1),'command':a57_0x3c9fc8(0x1be),'description':'删除定时任务并停止其后续触发','risk':a57_0x3c9fc8(0x1bc),'confirmationDescription':a57_0x3c9fc8(0x1cd),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5f5571){const _0x43bb77=a57_0x3c9fc8,_0x5c76da=_0x5f5571[_0x43bb77(0x1b7)](_0x43bb77(0x1a5)),_0x5c5e2e=await deleteRuntimeSchedule(_0x5f5571[_0x43bb77(0x1a2)],_0x5c76da);return{'ok':!![],'data':_0x5c5e2e,'message':_0x43bb77(0x1b9)+_0x5c76da};},async 'dryRun'(_0x2be384){const _0x2526e5=a57_0x3c9fc8,_0x1ff330=_0x2be384[_0x2526e5(0x1b7)](_0x2526e5(0x1a5));return dryRun(_0x2526e5(0x1b3),scheduleItemPath(_0x2be384[_0x2526e5(0x1a2)],_0x1ff330))[_0x2526e5(0x1b6)](_0x2526e5(0x1b4)+_0x1ff330)[_0x2526e5(0x1ad)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a58_0x3bb7cb=a58_0x5c8b;(function(_0x2c4afa,_0x26364f){const _0x2e36e4=a58_0x5c8b,_0x2e7129=_0x2c4afa();while(!![]){try{const _0x17d6ce=parseInt(_0x2e36e4(0xcc))/0x1+parseInt(_0x2e36e4(0xc9))/0x2*(parseInt(_0x2e36e4(0xcf))/0x3)+-parseInt(_0x2e36e4(0xc5))/0x4+parseInt(_0x2e36e4(0xce))/0x5*(parseInt(_0x2e36e4(0xcb))/0x6)+-parseInt(_0x2e36e4(0xcd))/0x7*(-parseInt(_0x2e36e4(0xca))/0x8)+-parseInt(_0x2e36e4(0xc3))/0x9+-parseInt(_0x2e36e4(0xc2))/0xa*(parseInt(_0x2e36e4(0xc7))/0xb);if(_0x17d6ce===_0x26364f)break;else _0x2e7129['push'](_0x2e7129['shift']());}catch(_0x382bb8){_0x2e7129['push'](_0x2e7129['shift']());}}}(a58_0x17e3,0x88860));function a58_0x17e3(){const _0x435790=['1072146iwKZdm','35LSTnsh','38815eqjcdb','9jbCZpS','12680820NrtNqb','5412609Akzqtu','read','1079264gPMXkq','Export\x20machine-readable\x20command\x20schema\x20(JSON)','11ooufci','export','582642mYvyhb','1017512cREhkW','90WmQTlz'];a58_0x17e3=function(){return _0x435790;};return a58_0x17e3();}function a58_0x5c8b(_0x25ae66,_0x3efed2){_0x25ae66=_0x25ae66-0xc2;const _0x17e3c4=a58_0x17e3();let _0x5c8b5e=_0x17e3c4[_0x25ae66];return _0x5c8b5e;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x4e7c2c){const _0x1ba1f7=await buildSchemaPayload();return{'ok':!![],'data':_0x1ba1f7};}export const schemaDefinition={'service':'schema','command':a58_0x3bb7cb(0xc8),'description':a58_0x3bb7cb(0xc6),'risk':a58_0x3bb7cb(0xc4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ function a58_0x53ed(_0x367360,_0x564bdc){_0x367360=_0x367360-0x181;const _0x528a60=a58_0x528a();let _0x53eddf=_0x528a60[_0x367360];return _0x53eddf;}const a58_0x1cc55b=a58_0x53ed;(function(_0x497593,_0x1fb63d){const _0x33097f=a58_0x53ed,_0x21c41b=_0x497593();while(!![]){try{const _0x23783e=parseInt(_0x33097f(0x185))/0x1+-parseInt(_0x33097f(0x184))/0x2*(parseInt(_0x33097f(0x182))/0x3)+parseInt(_0x33097f(0x188))/0x4*(-parseInt(_0x33097f(0x187))/0x5)+-parseInt(_0x33097f(0x181))/0x6+-parseInt(_0x33097f(0x18c))/0x7+parseInt(_0x33097f(0x18a))/0x8+parseInt(_0x33097f(0x183))/0x9;if(_0x23783e===_0x1fb63d)break;else _0x21c41b['push'](_0x21c41b['shift']());}catch(_0x15e69e){_0x21c41b['push'](_0x21c41b['shift']());}}}(a58_0x528a,0xf0cd9));function a58_0x528a(){const _0x424f95=['read','14616088QjQMdq','Export\x20machine-readable\x20command\x20schema\x20(JSON)','5615946GZQWwf','6023496BoYFSb','3JhzKgD','24345486mFmkRl','3389994VzukpW','649789cEugtf','export','3471670xEtbHu','4WwaIIQ'];a58_0x528a=function(){return _0x424f95;};return a58_0x528a();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x737d3d){const _0x569a39=await buildSchemaPayload();return{'ok':!![],'data':_0x569a39};}export const schemaDefinition={'service':'schema','command':a58_0x1cc55b(0x186),'description':a58_0x1cc55b(0x18b),'risk':a58_0x1cc55b(0x189),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- (function(_0x5717f2,_0x273f89){const _0x50a958=a59_0x64bd,_0xad183=_0x5717f2();while(!![]){try{const _0x4f3845=parseInt(_0x50a958(0x1af))/0x1+-parseInt(_0x50a958(0x1b5))/0x2+-parseInt(_0x50a958(0x181))/0x3*(-parseInt(_0x50a958(0x1a5))/0x4)+parseInt(_0x50a958(0x172))/0x5*(parseInt(_0x50a958(0x18c))/0x6)+-parseInt(_0x50a958(0x199))/0x7+parseInt(_0x50a958(0x176))/0x8+-parseInt(_0x50a958(0x1a0))/0x9;if(_0x4f3845===_0x273f89)break;else _0xad183['push'](_0xad183['shift']());}catch(_0xf26a58){_0xad183['push'](_0xad183['shift']());}}}(a59_0x15ad,0x6e74b));import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x25f535,_0x53fbf8){const _0x5e0fea=a59_0x64bd,_0x5f2dd7=listLocalServiceTrees();let _0x2af9c1;for(const _0x31eb57 of _0x5f2dd7){const _0xd311a2=matchServiceTreeCommand(_0x31eb57,_0x25f535);if(!_0xd311a2)continue;(!_0x2af9c1||_0xd311a2[_0x5e0fea(0x19c)]['fullPath'][_0x5e0fea(0x188)]>_0x2af9c1[_0x5e0fea(0x19c)]['fullPath'][_0x5e0fea(0x188)])&&(_0x2af9c1={'tree':_0x31eb57,'command':_0xd311a2[_0x5e0fea(0x19c)],'remainingArgs':_0xd311a2['remainingArgs']});}if(!_0x2af9c1)return undefined;const _0x5de8bf={..._0x53fbf8};return applyAppBinding(_0x2af9c1[_0x5e0fea(0x179)],_0x2af9c1[_0x5e0fea(0x19c)],_0x5de8bf),{'definition':buildDynamicCommandDefinition(_0x2af9c1['tree'],_0x2af9c1['command']),'args':_0x2af9c1[_0x5e0fea(0x18a)],'flags':_0x5de8bf,'tree':_0x2af9c1['tree'],'command':_0x2af9c1[_0x5e0fea(0x19c)]};}export function generateDynamicServiceHelp(_0x3854e9){const _0x41bd44=a59_0x64bd,_0x42305a=listLocalServiceTrees()[_0x41bd44(0x174)](_0x123dcb=>_0x123dcb[_0x41bd44(0x1b4)][_0x41bd44(0x17c)]===_0x3854e9);if(!_0x42305a)return undefined;const _0x415961=[CLI_BIN_NAME+'\x20'+_0x3854e9+'\x20<command>\x20[flags]','',_0x42305a[_0x41bd44(0x1b4)][_0x41bd44(0x1ab)]||_0x3854e9,_0x42305a[_0x41bd44(0x1b4)]['description']?'\x20\x20'+_0x42305a['service'][_0x41bd44(0x18e)]:'','','Commands:',..._0x42305a[_0x41bd44(0x186)]['map'](_0x2ac4c6=>{const _0x9c9d92=_0x41bd44,_0x50b5e2=_0x2ac4c6[_0x9c9d92(0x15c)][_0x9c9d92(0x18b)](0x1)['join']('\x20'),_0x469138=_0x2ac4c6[_0x9c9d92(0x1b8)]==='read'?'':'\x20['+_0x2ac4c6[_0x9c9d92(0x1b8)]+']';return'\x20\x20'+_0x50b5e2[_0x9c9d92(0x17a)](0x18)+'\x20'+(_0x2ac4c6['description']||'')+_0x469138;}),'',_0x41bd44(0x1aa)+CLI_BIN_NAME+_0x41bd44(0x1b1)+_0x3854e9+_0x41bd44(0x1b0)][_0x41bd44(0x19d)](Boolean);return _0x415961['join']('\x0a');}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x46434e=>{const _0x427cd1=a59_0x64bd,_0x1f20ab=_0x46434e[_0x427cd1(0x1b7)];return{'service':_0x1f20ab['service'][_0x427cd1(0x17c)],'label':_0x1f20ab[_0x427cd1(0x1b4)][_0x427cd1(0x1ab)]||_0x1f20ab[_0x427cd1(0x1b4)][_0x427cd1(0x17c)],'commands':_0x1f20ab[_0x427cd1(0x186)][_0x427cd1(0x15e)](_0x590109=>({'command':dynamicCommandName(_0x590109),'description':_0x590109[_0x427cd1(0x18e)]||_0x427cd1(0x18f)+_0x590109['cliPath'],'tag':riskTag(_0x590109['risk'])}))};});}export function getDynamicServiceEntry(_0x37a297){const _0x3baea1=a59_0x64bd;return listDynamicServiceEntries()[_0x3baea1(0x174)](_0x2ac6ac=>_0x2ac6ac['service']===_0x37a297);}export function listDynamicServiceDefinitions(_0x3f5313){const _0x3d5334=a59_0x64bd;return listLocalServiceTrees()[_0x3d5334(0x19d)](_0x43b739=>!_0x3f5313||_0x43b739['service']['code']===_0x3f5313)['flatMap'](_0x50a1f5=>_0x50a1f5[_0x3d5334(0x186)][_0x3d5334(0x15e)](_0x1e92d2=>buildDynamicCommandDefinition(_0x50a1f5,_0x1e92d2)));}function a59_0x64bd(_0x283e92,_0x235b36){_0x283e92=_0x283e92-0x15a;const _0x15adbf=a59_0x15ad();let _0x64bd7a=_0x15adbf[_0x283e92];return _0x64bd7a;}export function getDynamicServiceDefinitions(_0x3815c7){const _0x38d193=a59_0x64bd,_0x3d04eb=listDynamicServiceDefinitions(_0x3815c7);return _0x3d04eb[_0x38d193(0x188)]>0x0?_0x3d04eb:undefined;}export function findDynamicServiceDefinition(_0xe6b0ae,_0x2ce826){const _0x566a6e=a59_0x64bd;return listDynamicServiceDefinitions(_0xe6b0ae)[_0x566a6e(0x174)](_0xa286f0=>_0xa286f0[_0x566a6e(0x19c)]===_0x2ce826);}export function buildDynamicCommandDefinition(_0x13cbb0,_0x2d56d9){const _0x31f6aa=a59_0x64bd;return{'service':_0x13cbb0[_0x31f6aa(0x1b4)]['code'],'command':dynamicCommandName(_0x2d56d9),'description':_0x2d56d9[_0x31f6aa(0x18e)]||'Run\x20service\x20command\x20'+_0x2d56d9['cliPath'],'risk':_0x2d56d9[_0x31f6aa(0x1b8)],..._0x2d56d9['risk']===_0x31f6aa(0x1a1)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x2d56d9)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x2d56d9[_0x31f6aa(0x15b)]['map'](_0x3fbdc8=>({'name':_0x3fbdc8['name'],'description':_0x3fbdc8[_0x31f6aa(0x18e)]||_0x3fbdc8[_0x31f6aa(0x1ab)],'required':_0x3fbdc8[_0x31f6aa(0x173)]})),'flags':_0x2d56d9[_0x31f6aa(0x177)][_0x31f6aa(0x15e)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x2d56d9),async 'dryRun'(_0x5bf4dc){const _0x4e050c=_0x31f6aa,_0x50b651=await compilePlan(_0x2d56d9,_0x5bf4dc);return{'method':'SERVICE_TREE','url':_0x2d56d9[_0x4e050c(0x1ac)],'body':{'target':targetPreview(_0x50b651),'params':_0x50b651[_0x4e050c(0x197)]},'description':_0x4e050c(0x183)+_0x2d56d9['cliPath']};},async 'execute'(_0x52936b){const _0x4b44f2=_0x31f6aa,_0xcff51d=await compilePlan(_0x2d56d9,_0x52936b),_0x44730e=Date['now'](),_0x393bb9=await executePlan(_0xcff51d,_0x2d56d9,_0x52936b),_0x3f0dd0=Date[_0x4b44f2(0x17d)]()-_0x44730e;return{'ok':!![],'data':{'service':_0x13cbb0[_0x4b44f2(0x1b4)],'command':_0x2d56d9[_0x4b44f2(0x1ac)],'target':targetPreview(_0xcff51d),'result':_0x393bb9,'elapsed':_0x3f0dd0},'message':_0x4b44f2(0x1a8)+_0x2d56d9[_0x4b44f2(0x1ac)]+'\x20completed\x20in\x20'+_0x3f0dd0+'ms'};}};}function buildDynamicConfirmationDescription(_0x371ce2){const _0x1c6dd7=a59_0x64bd,_0x34bde1=_0x371ce2[_0x1c6dd7(0x18e)]||_0x371ce2[_0x1c6dd7(0x1ac)],_0x1f1dd7=_0x371ce2[_0x1c6dd7(0x1b8)]===_0x1c6dd7(0x16e)?'该命令被清单标记为高风险写入,可能产生难以恢复的业务变更。':_0x1c6dd7(0x170);return _0x1c6dd7(0x185)+_0x34bde1+'”。'+_0x1f1dd7;}function dynamicCommandName(_0x429c81){const _0x55482a=a59_0x64bd;return _0x429c81['fullPath'][_0x55482a(0x18b)](0x1)['join']('\x20');}function a59_0x15ad(){const _0x24082f=['required','find','kind','652336BTdZML','flags','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','tree','padEnd','username','code','now','fromEntries','mapTo','target','119037ehrpWh','Cannot\x20resolve\x20datatable\x20\x22','Preview\x20dynamic\x20service\x20command:\x20','json','将通过\x20Service\x20Tree\x20执行“','commands','entries','length','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','remainingArgs','slice','3340554vqOcCc','nickName','description','Run\x20service\x20command\x20','appcode','\x20\x20\x20\x20datasetCode:\x20','sql','sqlCode','envName','startsWith','type','params','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','1325597uovvIb','\x20\x20\x20\x20command:\x20','dbtableConfig','command','filter','bffId','\x20\x20\x20\x20','5247738BqmhJA','read','string','scriptName','push','68cBFHWQ','validation','some','Service\x20command\x20','Unknown\x20appRef\x20\x22','Use\x20`','name','cliPath','enum','\x20->\x20','70775QiBXon','`\x20to\x20inspect\x20the\x20manifest.','\x20service\x20detail\x20--service\x20','datasetCode','env','service','317478vHrBBR','loginName','normalizedManifest','risk','source','args','fullPath','appRef','map','number','userName','join','app','boolean','\x20\x20\x20\x20kind:\x20\x20\x20\x20','\x22\x20in\x20service\x20command\x20','default','nickname','\x20\x20\x20\x20datatable:\x20','Unsupported\x20service\x20target\x20kind:\x20','appCode','bffCode','tenantCode','employeeId','high-risk-write','datatable','该命令被清单标记为写入,可能修改业务数据或服务状态。','\x20\x20\x20\x20functionName:\x20','5uMoOuu'];a59_0x15ad=function(){return _0x24082f;};return a59_0x15ad();}function riskTag(_0x365caa){const _0x137fd1=a59_0x64bd;return _0x365caa===_0x137fd1(0x1a1)?'':'\x20\x20['+_0x365caa+']';}function flagToCommandFlag(_0xfe34f3){const _0x5f16a4=a59_0x64bd;return{'name':_0xfe34f3['cliName'],'type':_0xfe34f3[_0x5f16a4(0x196)]===_0x5f16a4(0x184)?_0x5f16a4(0x1a2):_0xfe34f3['type'],'description':_0xfe34f3[_0x5f16a4(0x18e)]||_0xfe34f3['name'],'required':_0xfe34f3['required'],'default':isPrimitiveFlagDefault(_0xfe34f3['default'])?_0xfe34f3[_0x5f16a4(0x166)]:undefined,'enum':_0xfe34f3[_0x5f16a4(0x1ad)]};}async function compilePlan(_0x2565b2,_0x4b2fc0){const _0x4ec3d8=a59_0x64bd;return compileServiceTreeCommand(_0x2565b2,{'flags':_0x4b2fc0['rawFlags'],'args':_0x4b2fc0[_0x4ec3d8(0x15b)],'context':await buildServiceContext(_0x2565b2,_0x4b2fc0)});}async function buildServiceContext(_0x5c4487,_0x72d201){const _0xfad925=a59_0x64bd,_0x461206={'appCode':_0x72d201['appCode'],'env':_0x72d201['envName'],'envName':_0x72d201[_0xfad925(0x194)]};if(!usesRuntimeContext(_0x5c4487))return _0x461206;const _0x36f0da=await getLoginUserInfo(),_0x565fab=pickFirst(_0x36f0da['userId'],_0x36f0da['id']);return{..._0x461206,'user':_0x36f0da,'userId':_0x565fab,'id':_0x36f0da['id'],'username':pickFirst(_0x36f0da[_0xfad925(0x17b)],_0x36f0da[_0xfad925(0x160)],_0x36f0da[_0xfad925(0x1b6)]),'userName':_0x36f0da['userName'],'nickname':pickFirst(_0x36f0da[_0xfad925(0x167)],_0x36f0da[_0xfad925(0x18d)]),'nickName':_0x36f0da['nickName'],'tenantCode':_0x36f0da[_0xfad925(0x16c)],'employeeId':_0x36f0da[_0xfad925(0x16d)]};}function usesRuntimeContext(_0x3380e3){const _0x17fb6b=a59_0x64bd;return _0x3380e3[_0x17fb6b(0x17f)][_0x17fb6b(0x1a7)](_0x540f6c=>typeof _0x540f6c[_0x17fb6b(0x15a)]===_0x17fb6b(0x1a2)&&(_0x540f6c[_0x17fb6b(0x15a)]['startsWith']('context.')||_0x540f6c[_0x17fb6b(0x15a)][_0x17fb6b(0x195)]('ctx.')));}function pickFirst(..._0x493ee1){return _0x493ee1['find'](_0x477431=>_0x477431!==undefined&&_0x477431!==null);}async function executePlan(_0x2df4a5,_0x1bd89f,_0x2ee79e){const _0x5070f6=a59_0x64bd;if(_0x2df4a5['kind']==='data'){const _0x2624e7=await resolveDatasetCode(_0x2df4a5,_0x1bd89f,_0x2ee79e);return executeData(_0x2624e7,_0x2df4a5['command'],_0x2df4a5[_0x5070f6(0x197)]);}if(_0x2df4a5[_0x5070f6(0x175)]===_0x5070f6(0x192)){if(!_0x2df4a5['sqlCode'])throw CliErrors[_0x5070f6(0x1a6)](_0x5070f6(0x1a8)+_0x1bd89f['cliPath']+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x2df4a5[_0x5070f6(0x193)],normalizeScalarParams(_0x2df4a5[_0x5070f6(0x197)]));}if(_0x2df4a5['kind']==='bff'){const _0xb8f974=_0x2df4a5[_0x5070f6(0x1a3)]||_0x2df4a5[_0x5070f6(0x16b)]||(_0x2df4a5[_0x5070f6(0x19e)]==null?'':String(_0x2df4a5[_0x5070f6(0x19e)]));if(!_0xb8f974)throw CliErrors[_0x5070f6(0x1a6)](_0x5070f6(0x1a8)+_0x1bd89f[_0x5070f6(0x1ac)]+'\x20requires\x20target.functionName.');return executeSdkBff(_0xb8f974,_0x2df4a5[_0x5070f6(0x197)]);}throw CliErrors[_0x5070f6(0x1a6)](_0x5070f6(0x169)+_0x2df4a5['kind']);}async function resolveDatasetCode(_0x1a4a38,_0x3b721a,_0x3ad32d){const _0x4d626f=a59_0x64bd;if(_0x1a4a38[_0x4d626f(0x1b2)])return _0x1a4a38[_0x4d626f(0x1b2)];if(!_0x1a4a38['datatable'])throw CliErrors[_0x4d626f(0x1a6)]('Service\x20command\x20'+_0x3b721a[_0x4d626f(0x1ac)]+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x275552=await listDatasets(_0x3ad32d[_0x4d626f(0x16a)]),_0x56c812=_0x275552[_0x4d626f(0x174)](_0x2f5f98=>_0x2f5f98[_0x4d626f(0x19b)]?.['tableName']===_0x1a4a38[_0x4d626f(0x16f)]);if(!_0x56c812?.['code'])throw CliErrors['validation'](_0x4d626f(0x182)+_0x1a4a38[_0x4d626f(0x16f)]+_0x4d626f(0x178)+_0x3ad32d[_0x4d626f(0x16a)]+'.',_0x4d626f(0x198));return _0x56c812[_0x4d626f(0x17c)];}function applyAppBinding(_0x1c7f0b,_0x2341b6,_0x249754){const _0x2a4779=a59_0x64bd,_0x45d4bb=_0x2341b6[_0x2a4779(0x180)][_0x2a4779(0x15d)];if(!_0x45d4bb)return;const _0x17f8f3=_0x1c7f0b['appBindings'][_0x45d4bb];if(!_0x17f8f3)throw CliErrors[_0x2a4779(0x1a6)](_0x2a4779(0x1a9)+_0x45d4bb+_0x2a4779(0x165)+_0x2341b6[_0x2a4779(0x1ac)]+'.',_0x2a4779(0x189));const _0x82dd3f=_0x17f8f3[_0x2a4779(0x190)]||_0x17f8f3[_0x2a4779(0x16a)];_0x82dd3f&&!hasText(_0x249754['appcode'])&&(_0x249754[_0x2a4779(0x190)]=_0x82dd3f),_0x17f8f3[_0x2a4779(0x162)]&&!hasText(_0x249754[_0x2a4779(0x162)])&&!hasText(_0x249754[_0x2a4779(0x190)])&&(_0x249754[_0x2a4779(0x162)]=_0x17f8f3['app']),_0x17f8f3[_0x2a4779(0x1b3)]&&!hasText(_0x249754['env'])&&(_0x249754[_0x2a4779(0x1b3)]=_0x17f8f3['env']);}function renderDynamicCommandHelp(_0x3a342e){const _0x154441=a59_0x64bd,_0x386583=['\x20\x20SERVICE\x20TREE\x20TARGET',_0x154441(0x164)+_0x3a342e[_0x154441(0x180)][_0x154441(0x175)],_0x154441(0x19a)+_0x3a342e[_0x154441(0x180)]['command']];if(_0x3a342e['target']['datasetCode'])_0x386583[_0x154441(0x1a4)](_0x154441(0x191)+_0x3a342e['target']['datasetCode']);if(_0x3a342e[_0x154441(0x180)][_0x154441(0x16f)])_0x386583[_0x154441(0x1a4)](_0x154441(0x168)+_0x3a342e[_0x154441(0x180)][_0x154441(0x16f)]);if(_0x3a342e[_0x154441(0x180)][_0x154441(0x193)])_0x386583[_0x154441(0x1a4)]('\x20\x20\x20\x20sqlCode:\x20'+_0x3a342e['target'][_0x154441(0x193)]);if(_0x3a342e[_0x154441(0x180)][_0x154441(0x1a3)])_0x386583[_0x154441(0x1a4)](_0x154441(0x171)+_0x3a342e[_0x154441(0x180)][_0x154441(0x1a3)]);if(_0x3a342e[_0x154441(0x17f)]['length']>0x0){_0x386583[_0x154441(0x1a4)]('','\x20\x20MAP\x20TO');for(const _0x1087ad of _0x3a342e[_0x154441(0x17f)]){_0x386583['push'](_0x154441(0x19f)+(_0x1087ad[_0x154441(0x15a)]||'const')+_0x154441(0x1ae)+_0x1087ad['target']+(_0x1087ad['operator']?'.'+_0x1087ad['operator']:''));}}return _0x386583[_0x154441(0x161)]('\x0a');}function targetPreview(_0x314f61){const _0x1b283c=a59_0x64bd;return{'kind':_0x314f61[_0x1b283c(0x175)],'command':_0x314f61[_0x1b283c(0x19c)],'appRef':_0x314f61[_0x1b283c(0x15d)],'datasetCode':_0x314f61['datasetCode'],'datatable':_0x314f61[_0x1b283c(0x16f)],'sqlCode':_0x314f61[_0x1b283c(0x193)],'bffCode':_0x314f61[_0x1b283c(0x16b)],'bffId':_0x314f61[_0x1b283c(0x19e)],'functionName':_0x314f61[_0x1b283c(0x1a3)]};}function normalizeScalarParams(_0x5a0ebd){const _0x40792f=a59_0x64bd;return Object[_0x40792f(0x17e)](Object[_0x40792f(0x187)](_0x5a0ebd)[_0x40792f(0x19d)](([,_0x18ad95])=>typeof _0x18ad95===_0x40792f(0x1a2)||typeof _0x18ad95==='number'));}function hasText(_0x16abe1){const _0xe29844=a59_0x64bd;return typeof _0x16abe1===_0xe29844(0x1a2)&&_0x16abe1['trim']()[_0xe29844(0x188)]>0x0;}function isPrimitiveFlagDefault(_0x108f0a){const _0x191fd7=a59_0x64bd;return _0x108f0a===undefined||typeof _0x108f0a==='string'||typeof _0x108f0a===_0x191fd7(0x15f)||typeof _0x108f0a===_0x191fd7(0x163);}
1
+ (function(_0x4d52f8,_0x1b0b58){const _0x143e3b=a59_0x2758,_0x5043fd=_0x4d52f8();while(!![]){try{const _0x4159fe=parseInt(_0x143e3b(0x159))/0x1*(parseInt(_0x143e3b(0x144))/0x2)+parseInt(_0x143e3b(0x170))/0x3+parseInt(_0x143e3b(0x179))/0x4+-parseInt(_0x143e3b(0x143))/0x5+parseInt(_0x143e3b(0x186))/0x6+parseInt(_0x143e3b(0x14c))/0x7*(parseInt(_0x143e3b(0x15f))/0x8)+-parseInt(_0x143e3b(0x153))/0x9*(parseInt(_0x143e3b(0x183))/0xa);if(_0x4159fe===_0x1b0b58)break;else _0x5043fd['push'](_0x5043fd['shift']());}catch(_0x28c33f){_0x5043fd['push'](_0x5043fd['shift']());}}}(a59_0x5887,0xc7a0d));function a59_0x2758(_0x1e1bf5,_0x4e6cf1){_0x1e1bf5=_0x1e1bf5-0x143;const _0x5887cf=a59_0x5887();let _0x275824=_0x5887cf[_0x1e1bf5];return _0x275824;}import{compileServiceTreeCommand,matchServiceTreeCommand}from'@lovrabet/cli-framework';import{getLoginUserInfo,listDatasets}from'../../core/api-client.js';import{executeData,executeSdkBff,executeSdkSql}from'../../core/sdk-client.js';import{CliErrors}from'../../errors.js';import{listLocalServices,listLocalServiceTrees}from'../../commands/service/registry.js';import{CLI_BIN_NAME}from'../../constant/cli.js';export function resolveDynamicServiceCommand(_0x5062e5,_0x14aa98){const _0x3a2c07=a59_0x2758,_0x1fc9a4=listLocalServiceTrees();let _0x227f35;for(const _0xfe22a4 of _0x1fc9a4){const _0x56c143=matchServiceTreeCommand(_0xfe22a4,_0x5062e5);if(!_0x56c143)continue;(!_0x227f35||_0x56c143[_0x3a2c07(0x1a7)]['fullPath'][_0x3a2c07(0x16e)]>_0x227f35[_0x3a2c07(0x1a7)][_0x3a2c07(0x15d)][_0x3a2c07(0x16e)])&&(_0x227f35={'tree':_0xfe22a4,'command':_0x56c143[_0x3a2c07(0x1a7)],'remainingArgs':_0x56c143[_0x3a2c07(0x19a)]});}if(!_0x227f35)return undefined;const _0x54f7e9={..._0x14aa98};return applyAppBinding(_0x227f35[_0x3a2c07(0x1ac)],_0x227f35['command'],_0x54f7e9),{'definition':buildDynamicCommandDefinition(_0x227f35[_0x3a2c07(0x1ac)],_0x227f35[_0x3a2c07(0x1a7)]),'args':_0x227f35[_0x3a2c07(0x19a)],'flags':_0x54f7e9,'tree':_0x227f35[_0x3a2c07(0x1ac)],'command':_0x227f35['command']};}export function generateDynamicServiceHelp(_0x345fc5){const _0x51f041=a59_0x2758,_0x402884=listLocalServiceTrees()[_0x51f041(0x157)](_0xb94847=>_0xb94847['service'][_0x51f041(0x167)]===_0x345fc5);if(!_0x402884)return undefined;const _0x39156d=[CLI_BIN_NAME+'\x20'+_0x345fc5+_0x51f041(0x17d),'',_0x402884[_0x51f041(0x166)][_0x51f041(0x172)]||_0x345fc5,_0x402884[_0x51f041(0x166)][_0x51f041(0x154)]?'\x20\x20'+_0x402884['service']['description']:'','','Commands:',..._0x402884[_0x51f041(0x192)][_0x51f041(0x182)](_0x5acc85=>{const _0x330509=_0x51f041,_0x4556ab=_0x5acc85[_0x330509(0x15d)][_0x330509(0x18a)](0x1)[_0x330509(0x15c)]('\x20'),_0x2caeaf=_0x5acc85[_0x330509(0x18d)]===_0x330509(0x161)?'':'\x20['+_0x5acc85[_0x330509(0x18d)]+']';return'\x20\x20'+_0x4556ab[_0x330509(0x15e)](0x18)+'\x20'+(_0x5acc85[_0x330509(0x154)]||'')+_0x2caeaf;}),'',_0x51f041(0x16a)+CLI_BIN_NAME+_0x51f041(0x160)+_0x345fc5+'`\x20to\x20inspect\x20the\x20manifest.'][_0x51f041(0x19f)](Boolean);return _0x39156d[_0x51f041(0x15c)]('\x0a');}function a59_0x5887(){const _0x4fa757=['app','length','appCode','17226YlphEE','appBindings','name','params','bffCode','fromEntries','appcode','default','mapTo','2768064mPOYOu','kind','\x20\x20\x20\x20kind:\x20\x20\x20\x20','string','\x20<command>\x20[flags]','nickname','target','validation','Unsupported\x20service\x20target\x20kind:\x20','map','30JgqrAG','dbtableConfig','tenantCode','5936796Tixinz','envName','cliPath','normalizedManifest','slice','required','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','risk','userName','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','Preview\x20dynamic\x20service\x20command:\x20','Unknown\x20appRef\x20\x22','commands','Cannot\x20resolve\x20datatable\x20\x22','username','nickName','\x20\x20\x20\x20sqlCode:\x20','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','\x20\x20\x20\x20datasetCode:\x20','env','remainingArgs','userId','Service\x20command\x20','trim','\x20\x20[','filter','该命令被清单标记为写入,可能修改业务数据或服务状态。','context.','ctx.','bffId','now','enum','data','command','operator','\x22\x20in\x20service\x20command\x20','type','\x20\x20MAP\x20TO','tree','\x20\x20\x20\x20command:\x20','scriptName','\x20\x20\x20\x20','3251040JDVGKl','14138LbBiCY','source','sqlCode','sql','SERVICE_TREE','\x20completed\x20in\x20','将通过\x20Service\x20Tree\x20执行“','\x20\x20\x20\x20datatable:\x20','14TCOIFq','该命令被清单标记为高风险写入,可能产生难以恢复的业务变更。','cliName','startsWith','appRef','datasetCode','boolean','4129353ukccIt','description','push','\x20\x20\x20\x20functionName:\x20','find','Run\x20service\x20command\x20','34UsmeXL','number','json','join','fullPath','padEnd','3667064jfXfSA','\x20service\x20detail\x20--service\x20','read','entries','const','args','datatable','service','code','bff','\x20requires\x20target.functionName.','Use\x20`','some','flags'];a59_0x5887=function(){return _0x4fa757;};return a59_0x5887();}export function listDynamicServiceEntries(){return listLocalServices()['map'](_0x2878bb=>{const _0x5ed23a=a59_0x2758,_0x5b04a9=_0x2878bb[_0x5ed23a(0x189)];return{'service':_0x5b04a9['service']['code'],'label':_0x5b04a9[_0x5ed23a(0x166)]['name']||_0x5b04a9['service'][_0x5ed23a(0x167)],'commands':_0x5b04a9[_0x5ed23a(0x192)][_0x5ed23a(0x182)](_0x37144d=>({'command':dynamicCommandName(_0x37144d),'description':_0x37144d[_0x5ed23a(0x154)]||'Run\x20service\x20command\x20'+_0x37144d['cliPath'],'tag':riskTag(_0x37144d['risk'])}))};});}export function getDynamicServiceEntry(_0x4732f2){const _0x5adc1d=a59_0x2758;return listDynamicServiceEntries()[_0x5adc1d(0x157)](_0x30f13d=>_0x30f13d['service']===_0x4732f2);}export function listDynamicServiceDefinitions(_0x4eb765){const _0x458943=a59_0x2758;return listLocalServiceTrees()[_0x458943(0x19f)](_0x4d080f=>!_0x4eb765||_0x4d080f[_0x458943(0x166)][_0x458943(0x167)]===_0x4eb765)['flatMap'](_0x3c42a9=>_0x3c42a9[_0x458943(0x192)]['map'](_0x48c92b=>buildDynamicCommandDefinition(_0x3c42a9,_0x48c92b)));}export function getDynamicServiceDefinitions(_0x24c768){const _0x24e1b2=a59_0x2758,_0x446222=listDynamicServiceDefinitions(_0x24c768);return _0x446222[_0x24e1b2(0x16e)]>0x0?_0x446222:undefined;}export function findDynamicServiceDefinition(_0x1a4afd,_0x21bb17){const _0x54af5b=a59_0x2758;return listDynamicServiceDefinitions(_0x1a4afd)[_0x54af5b(0x157)](_0x4fb5f6=>_0x4fb5f6[_0x54af5b(0x1a7)]===_0x21bb17);}export function buildDynamicCommandDefinition(_0x147aec,_0x358f4b){const _0x4c6119=a59_0x2758;return{'service':_0x147aec[_0x4c6119(0x166)]['code'],'command':dynamicCommandName(_0x358f4b),'description':_0x358f4b[_0x4c6119(0x154)]||_0x4c6119(0x158)+_0x358f4b['cliPath'],'risk':_0x358f4b[_0x4c6119(0x18d)],..._0x358f4b[_0x4c6119(0x18d)]===_0x4c6119(0x161)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x358f4b)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x358f4b['args']['map'](_0x552e75=>({'name':_0x552e75[_0x4c6119(0x172)],'description':_0x552e75[_0x4c6119(0x154)]||_0x552e75[_0x4c6119(0x172)],'required':_0x552e75[_0x4c6119(0x18b)]})),'flags':_0x358f4b[_0x4c6119(0x16c)]['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x358f4b),async 'dryRun'(_0xcf95e){const _0x485a0f=_0x4c6119,_0x16d303=await compilePlan(_0x358f4b,_0xcf95e);return{'method':_0x485a0f(0x148),'url':_0x358f4b['cliPath'],'body':{'target':targetPreview(_0x16d303),'params':_0x16d303[_0x485a0f(0x173)]},'description':_0x485a0f(0x190)+_0x358f4b['cliPath']};},async 'execute'(_0x1ec7d7){const _0xe58007=_0x4c6119,_0x4ee7c5=await compilePlan(_0x358f4b,_0x1ec7d7),_0x366e56=Date['now'](),_0xad14eb=await executePlan(_0x4ee7c5,_0x358f4b,_0x1ec7d7),_0x5e7920=Date[_0xe58007(0x1a4)]()-_0x366e56;return{'ok':!![],'data':{'service':_0x147aec[_0xe58007(0x166)],'command':_0x358f4b[_0xe58007(0x188)],'target':targetPreview(_0x4ee7c5),'result':_0xad14eb,'elapsed':_0x5e7920},'message':_0xe58007(0x19c)+_0x358f4b[_0xe58007(0x188)]+_0xe58007(0x149)+_0x5e7920+'ms'};}};}function buildDynamicConfirmationDescription(_0x151429){const _0x67986c=a59_0x2758,_0x5f01b9=_0x151429[_0x67986c(0x154)]||_0x151429['cliPath'],_0x94796=_0x151429[_0x67986c(0x18d)]==='high-risk-write'?_0x67986c(0x14d):_0x67986c(0x1a0);return _0x67986c(0x14a)+_0x5f01b9+'”。'+_0x94796;}function dynamicCommandName(_0x504a54){const _0x16e265=a59_0x2758;return _0x504a54[_0x16e265(0x15d)][_0x16e265(0x18a)](0x1)['join']('\x20');}function riskTag(_0x15722b){const _0x479007=a59_0x2758;return _0x15722b==='read'?'':_0x479007(0x19e)+_0x15722b+']';}function flagToCommandFlag(_0x20cbfb){const _0x127d7f=a59_0x2758;return{'name':_0x20cbfb[_0x127d7f(0x14e)],'type':_0x20cbfb[_0x127d7f(0x1aa)]===_0x127d7f(0x15b)?_0x127d7f(0x17c):_0x20cbfb[_0x127d7f(0x1aa)],'description':_0x20cbfb[_0x127d7f(0x154)]||_0x20cbfb[_0x127d7f(0x172)],'required':_0x20cbfb[_0x127d7f(0x18b)],'default':isPrimitiveFlagDefault(_0x20cbfb[_0x127d7f(0x177)])?_0x20cbfb[_0x127d7f(0x177)]:undefined,'enum':_0x20cbfb[_0x127d7f(0x1a5)]};}async function compilePlan(_0x79d840,_0x5cc7df){const _0x42a0cf=a59_0x2758;return compileServiceTreeCommand(_0x79d840,{'flags':_0x5cc7df['rawFlags'],'args':_0x5cc7df[_0x42a0cf(0x164)],'context':await buildServiceContext(_0x79d840,_0x5cc7df)});}async function buildServiceContext(_0x2a7dbe,_0x25ac17){const _0x5abb94=a59_0x2758,_0x41a908={'appCode':_0x25ac17[_0x5abb94(0x16f)],'env':_0x25ac17['envName'],'envName':_0x25ac17[_0x5abb94(0x187)]};if(!usesRuntimeContext(_0x2a7dbe))return _0x41a908;const _0x1a2069=await getLoginUserInfo(),_0x48d53b=pickFirst(_0x1a2069[_0x5abb94(0x19b)],_0x1a2069['id']);return{..._0x41a908,'user':_0x1a2069,'userId':_0x48d53b,'id':_0x1a2069['id'],'username':pickFirst(_0x1a2069[_0x5abb94(0x194)],_0x1a2069[_0x5abb94(0x18e)],_0x1a2069['loginName']),'userName':_0x1a2069[_0x5abb94(0x18e)],'nickname':pickFirst(_0x1a2069[_0x5abb94(0x17e)],_0x1a2069[_0x5abb94(0x195)]),'nickName':_0x1a2069['nickName'],'tenantCode':_0x1a2069[_0x5abb94(0x185)],'employeeId':_0x1a2069['employeeId']};}function usesRuntimeContext(_0x9ea206){const _0x249003=a59_0x2758;return _0x9ea206[_0x249003(0x178)][_0x249003(0x16b)](_0x5edad7=>typeof _0x5edad7['source']===_0x249003(0x17c)&&(_0x5edad7[_0x249003(0x145)][_0x249003(0x14f)](_0x249003(0x1a1))||_0x5edad7['source']['startsWith'](_0x249003(0x1a2))));}function pickFirst(..._0x44194d){const _0x53fd2e=a59_0x2758;return _0x44194d[_0x53fd2e(0x157)](_0xcf3b76=>_0xcf3b76!==undefined&&_0xcf3b76!==null);}async function executePlan(_0x5d2891,_0x224595,_0x25cbf3){const _0x5ed821=a59_0x2758;if(_0x5d2891['kind']===_0x5ed821(0x1a6)){const _0x464b85=await resolveDatasetCode(_0x5d2891,_0x224595,_0x25cbf3);return executeData(_0x464b85,_0x5d2891[_0x5ed821(0x1a7)],_0x5d2891[_0x5ed821(0x173)]);}if(_0x5d2891['kind']===_0x5ed821(0x147)){if(!_0x5d2891['sqlCode'])throw CliErrors['validation']('Service\x20command\x20'+_0x224595[_0x5ed821(0x188)]+'\x20requires\x20target.sqlCode.');return executeSdkSql(_0x5d2891[_0x5ed821(0x146)],normalizeScalarParams(_0x5d2891['params']));}if(_0x5d2891['kind']===_0x5ed821(0x168)){const _0x2d81fb=_0x5d2891[_0x5ed821(0x1ae)]||_0x5d2891['bffCode']||(_0x5d2891[_0x5ed821(0x1a3)]==null?'':String(_0x5d2891['bffId']));if(!_0x2d81fb)throw CliErrors[_0x5ed821(0x180)]('Service\x20command\x20'+_0x224595[_0x5ed821(0x188)]+_0x5ed821(0x169));return executeSdkBff(_0x2d81fb,_0x5d2891['params']);}throw CliErrors[_0x5ed821(0x180)](_0x5ed821(0x181)+_0x5d2891[_0x5ed821(0x17a)]);}async function resolveDatasetCode(_0x445e45,_0x5ded78,_0x2f9539){const _0x108605=a59_0x2758;if(_0x445e45[_0x108605(0x151)])return _0x445e45['datasetCode'];if(!_0x445e45[_0x108605(0x165)])throw CliErrors[_0x108605(0x180)](_0x108605(0x19c)+_0x5ded78[_0x108605(0x188)]+'\x20requires\x20target.datasetCode\x20or\x20target.datatable.');const _0x45d34c=await listDatasets(_0x2f9539[_0x108605(0x16f)]),_0x5af8e5=_0x45d34c['find'](_0x3266e4=>_0x3266e4[_0x108605(0x184)]?.['tableName']===_0x445e45['datatable']);if(!_0x5af8e5?.[_0x108605(0x167)])throw CliErrors[_0x108605(0x180)](_0x108605(0x193)+_0x445e45['datatable']+_0x108605(0x197)+_0x2f9539[_0x108605(0x16f)]+'.',_0x108605(0x18c));return _0x5af8e5[_0x108605(0x167)];}function applyAppBinding(_0x2f7809,_0x4c35ea,_0x33caac){const _0x2225bd=a59_0x2758,_0x8737e9=_0x4c35ea['target'][_0x2225bd(0x150)];if(!_0x8737e9)return;const _0x250941=_0x2f7809[_0x2225bd(0x171)][_0x8737e9];if(!_0x250941)throw CliErrors[_0x2225bd(0x180)](_0x2225bd(0x191)+_0x8737e9+_0x2225bd(0x1a9)+_0x4c35ea[_0x2225bd(0x188)]+'.',_0x2225bd(0x18f));const _0x16639e=_0x250941[_0x2225bd(0x176)]||_0x250941[_0x2225bd(0x16f)];_0x16639e&&!hasText(_0x33caac[_0x2225bd(0x176)])&&(_0x33caac['appcode']=_0x16639e),_0x250941[_0x2225bd(0x16d)]&&!hasText(_0x33caac[_0x2225bd(0x16d)])&&!hasText(_0x33caac['appcode'])&&(_0x33caac[_0x2225bd(0x16d)]=_0x250941[_0x2225bd(0x16d)]),_0x250941['env']&&!hasText(_0x33caac[_0x2225bd(0x199)])&&(_0x33caac[_0x2225bd(0x199)]=_0x250941[_0x2225bd(0x199)]);}function renderDynamicCommandHelp(_0x4e98bb){const _0x51df03=a59_0x2758,_0x1276d1=['\x20\x20SERVICE\x20TREE\x20TARGET',_0x51df03(0x17b)+_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x17a)],_0x51df03(0x1ad)+_0x4e98bb['target'][_0x51df03(0x1a7)]];if(_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x151)])_0x1276d1['push'](_0x51df03(0x198)+_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x151)]);if(_0x4e98bb['target'][_0x51df03(0x165)])_0x1276d1[_0x51df03(0x155)](_0x51df03(0x14b)+_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x165)]);if(_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x146)])_0x1276d1[_0x51df03(0x155)](_0x51df03(0x196)+_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x146)]);if(_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x1ae)])_0x1276d1['push'](_0x51df03(0x156)+_0x4e98bb[_0x51df03(0x17f)][_0x51df03(0x1ae)]);if(_0x4e98bb[_0x51df03(0x178)][_0x51df03(0x16e)]>0x0){_0x1276d1[_0x51df03(0x155)]('',_0x51df03(0x1ab));for(const _0x2991f6 of _0x4e98bb[_0x51df03(0x178)]){_0x1276d1[_0x51df03(0x155)](_0x51df03(0x1af)+(_0x2991f6[_0x51df03(0x145)]||_0x51df03(0x163))+'\x20->\x20'+_0x2991f6[_0x51df03(0x17f)]+(_0x2991f6[_0x51df03(0x1a8)]?'.'+_0x2991f6['operator']:''));}}return _0x1276d1[_0x51df03(0x15c)]('\x0a');}function targetPreview(_0x36853a){const _0x3f78b6=a59_0x2758;return{'kind':_0x36853a[_0x3f78b6(0x17a)],'command':_0x36853a['command'],'appRef':_0x36853a[_0x3f78b6(0x150)],'datasetCode':_0x36853a['datasetCode'],'datatable':_0x36853a[_0x3f78b6(0x165)],'sqlCode':_0x36853a[_0x3f78b6(0x146)],'bffCode':_0x36853a[_0x3f78b6(0x174)],'bffId':_0x36853a[_0x3f78b6(0x1a3)],'functionName':_0x36853a[_0x3f78b6(0x1ae)]};}function normalizeScalarParams(_0x32c4e3){const _0x28d992=a59_0x2758;return Object[_0x28d992(0x175)](Object[_0x28d992(0x162)](_0x32c4e3)[_0x28d992(0x19f)](([,_0x5daa21])=>typeof _0x5daa21===_0x28d992(0x17c)||typeof _0x5daa21===_0x28d992(0x15a)));}function hasText(_0x475909){const _0x40cba5=a59_0x2758;return typeof _0x475909===_0x40cba5(0x17c)&&_0x475909[_0x40cba5(0x19d)]()[_0x40cba5(0x16e)]>0x0;}function isPrimitiveFlagDefault(_0x12ad61){const _0x372967=a59_0x2758;return _0x12ad61===undefined||typeof _0x12ad61===_0x372967(0x17c)||typeof _0x12ad61===_0x372967(0x15a)||typeof _0x12ad61===_0x372967(0x152);}
@@ -1 +1 @@
1
- function a60_0x2aa1(){const _0x24778a=['isArray','trim','.resources','commands','.target','6564887alFlzR','prototype','47811ZGfOpO','functionName\x20must\x20be\x20a\x20non-empty\x20string.','action','hasOwnProperty','bff.exec','$.resources','error','push','$.commands[','].target','.actions.','scriptName','entries','597771yWzxdW','functionName','map','resources','object','18994176MqWSwY','call','bff','94WFHdCy','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','fromEntries','kind','1382536ROdjUc','356646BstPvW','actions','4711440gaMMUV','string','target'];a60_0x2aa1=function(){return _0x24778a;};return a60_0x2aa1();}(function(_0x597bfa,_0xfa0e07){const _0x532604=a60_0x460a,_0xe9c9a9=_0x597bfa();while(!![]){try{const _0x52862f=parseInt(_0x532604(0x10f))/0x1+parseInt(_0x532604(0xf1))/0x2*(parseInt(_0x532604(0x102))/0x3)+-parseInt(_0x532604(0xf5))/0x4+parseInt(_0x532604(0xf8))/0x5+parseInt(_0x532604(0xf6))/0x6+parseInt(_0x532604(0x100))/0x7+-parseInt(_0x532604(0xee))/0x8;if(_0x52862f===_0xfa0e07)break;else _0xe9c9a9['push'](_0xe9c9a9['shift']());}catch(_0x550e6c){_0xe9c9a9['push'](_0xe9c9a9['shift']());}}}(a60_0x2aa1,0x8a4ca));export function adaptServiceTreeManifestForLegacyFramework(_0x3bffd5){const _0x1b4373=a60_0x460a,_0x4a6aed=cloneJsonValue(_0x3bffd5),_0x541e25=[];if(!isObjectRecord(_0x4a6aed))return{'manifest':_0x4a6aed,'errors':_0x541e25};return Array[_0x1b4373(0xfb)](_0x4a6aed['commands'])&&_0x4a6aed[_0x1b4373(0xfe)]['forEach']((_0x587b26,_0x1f50fd)=>{const _0x540b26=_0x1b4373;if(!isObjectRecord(_0x587b26))return;adaptBffTarget(_0x587b26['target'],_0x540b26(0x10a)+_0x1f50fd+_0x540b26(0x10b),_0x541e25);}),adaptResources(_0x4a6aed['resources'],_0x1b4373(0x107),_0x541e25),{'manifest':_0x4a6aed,'errors':_0x541e25};}export function toPublicServiceTreeTarget(_0x293703){const _0x156bda=a60_0x460a,{scriptName:_0x4cbbce,..._0x239919}=_0x293703;return typeof _0x4cbbce===_0x156bda(0xf9)&&_0x4cbbce[_0x156bda(0xfc)]()&&(_0x239919[_0x156bda(0x110)]=_0x4cbbce),_0x239919;}export function toPublicNormalizedServiceTree(_0x2caee8){const _0x52f456=a60_0x460a;return{..._0x2caee8,'commands':_0x2caee8[_0x52f456(0xfe)]['map'](_0x46ea54=>({..._0x46ea54,'target':toPublicServiceTreeTarget(_0x46ea54[_0x52f456(0xfa)])}))};}function adaptResources(_0x5cebcb,_0x93c187,_0x5f1fca){const _0x45d556=a60_0x460a;if(!isObjectRecord(_0x5cebcb))return;for(const [_0x1620ea,_0x8ca959]of Object[_0x45d556(0x10e)](_0x5cebcb)){if(!isObjectRecord(_0x8ca959))continue;const _0x1429ca=_0x93c187+'.'+_0x1620ea;if(isObjectRecord(_0x8ca959[_0x45d556(0xf7)]))for(const [_0x31a398,_0x50083a]of Object['entries'](_0x8ca959['actions'])){if(!isObjectRecord(_0x50083a))continue;const _0x2eacc2=_0x1429ca+_0x45d556(0x10c)+_0x31a398,_0x360f70=isObjectRecord(_0x50083a[_0x45d556(0xfa)])&&_0x50083a[_0x45d556(0xfa)][_0x45d556(0xf4)]===_0x45d556(0xf0);adaptBffTarget(_0x50083a[_0x45d556(0xfa)],_0x2eacc2+_0x45d556(0xff),_0x5f1fca),(_0x360f70||isBffAction(_0x50083a))&&adaptFunctionNameField(_0x50083a,_0x2eacc2,_0x5f1fca);}adaptResources(_0x8ca959[_0x45d556(0x112)],_0x1429ca+_0x45d556(0xfd),_0x5f1fca);}}function adaptBffTarget(_0x12f832,_0x1ab330,_0x5031c6){const _0x5e7d0f=a60_0x460a;if(!isObjectRecord(_0x12f832)||_0x12f832[_0x5e7d0f(0xf4)]!==_0x5e7d0f(0xf0))return;adaptFunctionNameField(_0x12f832,_0x1ab330,_0x5031c6);}function adaptFunctionNameField(_0x4b0188,_0x4ae0f2,_0x10dbcc){const _0x5aeaac=a60_0x460a;Object['prototype'][_0x5aeaac(0x105)][_0x5aeaac(0xef)](_0x4b0188,_0x5aeaac(0x10d))&&_0x10dbcc[_0x5aeaac(0x109)]({'level':_0x5aeaac(0x108),'path':_0x4ae0f2+'.scriptName','message':_0x5aeaac(0xf2)});if(Object[_0x5aeaac(0x101)][_0x5aeaac(0x105)][_0x5aeaac(0xef)](_0x4b0188,_0x5aeaac(0x110))){if(typeof _0x4b0188[_0x5aeaac(0x110)]!==_0x5aeaac(0xf9)||!_0x4b0188[_0x5aeaac(0x110)][_0x5aeaac(0xfc)]()){_0x10dbcc['push']({'level':_0x5aeaac(0x108),'path':_0x4ae0f2+'.functionName','message':_0x5aeaac(0x103)}),delete _0x4b0188['functionName'];return;}_0x4b0188[_0x5aeaac(0x10d)]=_0x4b0188[_0x5aeaac(0x110)],delete _0x4b0188[_0x5aeaac(0x110)];}}function a60_0x460a(_0x1c3e91,_0x12379b){_0x1c3e91=_0x1c3e91-0xed;const _0x2aa178=a60_0x2aa1();let _0x460af2=_0x2aa178[_0x1c3e91];return _0x460af2;}function isBffAction(_0x7d7ae2){const _0x531a12=a60_0x460a;return _0x7d7ae2[_0x531a12(0xf4)]===_0x531a12(0xf0)||_0x7d7ae2[_0x531a12(0x104)]===_0x531a12(0x106)||_0x7d7ae2[_0x531a12(0xfa)]==='bff.exec';}function cloneJsonValue(_0x1ee5fb){const _0x15b3b0=a60_0x460a;if(Array[_0x15b3b0(0xfb)](_0x1ee5fb))return _0x1ee5fb['map'](_0xc94668=>cloneJsonValue(_0xc94668));if(isObjectRecord(_0x1ee5fb))return Object[_0x15b3b0(0xf3)](Object[_0x15b3b0(0x10e)](_0x1ee5fb)[_0x15b3b0(0x111)](([_0x435589,_0x856903])=>[_0x435589,cloneJsonValue(_0x856903)]));return _0x1ee5fb;}function isObjectRecord(_0x3bb569){const _0x24cbab=a60_0x460a;return Boolean(_0x3bb569)&&typeof _0x3bb569===_0x24cbab(0xed)&&!Array[_0x24cbab(0xfb)](_0x3bb569);}
1
+ (function(_0x5abf88,_0x3d49b2){const _0x4c32f0=a60_0x389a,_0x2f783c=_0x5abf88();while(!![]){try{const _0x32c27e=-parseInt(_0x4c32f0(0x13f))/0x1+-parseInt(_0x4c32f0(0x154))/0x2*(-parseInt(_0x4c32f0(0x150))/0x3)+-parseInt(_0x4c32f0(0x156))/0x4+parseInt(_0x4c32f0(0x142))/0x5*(-parseInt(_0x4c32f0(0x146))/0x6)+parseInt(_0x4c32f0(0x157))/0x7*(-parseInt(_0x4c32f0(0x15f))/0x8)+parseInt(_0x4c32f0(0x13b))/0x9*(-parseInt(_0x4c32f0(0x15b))/0xa)+parseInt(_0x4c32f0(0x155))/0xb;if(_0x32c27e===_0x3d49b2)break;else _0x2f783c['push'](_0x2f783c['shift']());}catch(_0x32e027){_0x2f783c['push'](_0x2f783c['shift']());}}}(a60_0x3506,0x55ff9));export function adaptServiceTreeManifestForLegacyFramework(_0x50d85d){const _0x1f3ae5=a60_0x389a,_0x1cb787=cloneJsonValue(_0x50d85d),_0x3790ce=[];if(!isObjectRecord(_0x1cb787))return{'manifest':_0x1cb787,'errors':_0x3790ce};return Array[_0x1f3ae5(0x159)](_0x1cb787[_0x1f3ae5(0x15e)])&&_0x1cb787['commands']['forEach']((_0x5d9fea,_0x418d54)=>{const _0x106a92=_0x1f3ae5;if(!isObjectRecord(_0x5d9fea))return;adaptBffTarget(_0x5d9fea['target'],'$.commands['+_0x418d54+_0x106a92(0x158),_0x3790ce);}),adaptResources(_0x1cb787[_0x1f3ae5(0x14c)],_0x1f3ae5(0x144),_0x3790ce),{'manifest':_0x1cb787,'errors':_0x3790ce};}function a60_0x3506(){const _0x543104=['commands','184sCElml','hasOwnProperty','bff.exec','4923OZCExC','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','prototype','target','142585GxDhCE','functionName\x20must\x20be\x20a\x20non-empty\x20string.','object','20suXoxm','error','$.resources','.actions.','726210bZSSAb','bff','.scriptName','push','.target','scriptName','resources','fromEntries','action','entries','145194BkBJmL','actions','functionName','map','10yWRPaR','25770932cLpTBM','2078028DVODXx','142499KsDgWI','].target','isArray','call','11300yVLdjC','.functionName','string'];a60_0x3506=function(){return _0x543104;};return a60_0x3506();}export function toPublicServiceTreeTarget(_0x4615ea){const _0x22de4e=a60_0x389a,{scriptName:_0x5019ed,..._0x41c004}=_0x4615ea;return typeof _0x5019ed===_0x22de4e(0x15d)&&_0x5019ed['trim']()&&(_0x41c004[_0x22de4e(0x152)]=_0x5019ed),_0x41c004;}export function toPublicNormalizedServiceTree(_0x4ceeac){return{..._0x4ceeac,'commands':_0x4ceeac['commands']['map'](_0x5ca696=>({..._0x5ca696,'target':toPublicServiceTreeTarget(_0x5ca696['target'])}))};}function adaptResources(_0x153dd3,_0x850384,_0x4b6237){const _0x188c25=a60_0x389a;if(!isObjectRecord(_0x153dd3))return;for(const [_0x48bf17,_0x2155a8]of Object[_0x188c25(0x14f)](_0x153dd3)){if(!isObjectRecord(_0x2155a8))continue;const _0x7b1a80=_0x850384+'.'+_0x48bf17;if(isObjectRecord(_0x2155a8[_0x188c25(0x151)]))for(const [_0x5269ed,_0x1c5094]of Object[_0x188c25(0x14f)](_0x2155a8[_0x188c25(0x151)])){if(!isObjectRecord(_0x1c5094))continue;const _0x220a0a=_0x7b1a80+_0x188c25(0x145)+_0x5269ed,_0x2227f0=isObjectRecord(_0x1c5094[_0x188c25(0x13e)])&&_0x1c5094['target']['kind']===_0x188c25(0x147);adaptBffTarget(_0x1c5094[_0x188c25(0x13e)],_0x220a0a+_0x188c25(0x14a),_0x4b6237),(_0x2227f0||isBffAction(_0x1c5094))&&adaptFunctionNameField(_0x1c5094,_0x220a0a,_0x4b6237);}adaptResources(_0x2155a8[_0x188c25(0x14c)],_0x7b1a80+'.resources',_0x4b6237);}}function adaptBffTarget(_0x127613,_0x2ccea8,_0xeb4b80){const _0xc1ac4b=a60_0x389a;if(!isObjectRecord(_0x127613)||_0x127613['kind']!==_0xc1ac4b(0x147))return;adaptFunctionNameField(_0x127613,_0x2ccea8,_0xeb4b80);}function a60_0x389a(_0x312c15,_0x373552){_0x312c15=_0x312c15-0x13b;const _0x3506d2=a60_0x3506();let _0x389af7=_0x3506d2[_0x312c15];return _0x389af7;}function adaptFunctionNameField(_0x578beb,_0x15699f,_0x29d2fb){const _0x3762fc=a60_0x389a;Object[_0x3762fc(0x13d)][_0x3762fc(0x160)]['call'](_0x578beb,_0x3762fc(0x14b))&&_0x29d2fb[_0x3762fc(0x149)]({'level':_0x3762fc(0x143),'path':_0x15699f+_0x3762fc(0x148),'message':_0x3762fc(0x13c)});if(Object['prototype']['hasOwnProperty'][_0x3762fc(0x15a)](_0x578beb,_0x3762fc(0x152))){if(typeof _0x578beb['functionName']!==_0x3762fc(0x15d)||!_0x578beb[_0x3762fc(0x152)]['trim']()){_0x29d2fb[_0x3762fc(0x149)]({'level':_0x3762fc(0x143),'path':_0x15699f+_0x3762fc(0x15c),'message':_0x3762fc(0x140)}),delete _0x578beb[_0x3762fc(0x152)];return;}_0x578beb['scriptName']=_0x578beb[_0x3762fc(0x152)],delete _0x578beb[_0x3762fc(0x152)];}}function isBffAction(_0x51141f){const _0x1d655e=a60_0x389a;return _0x51141f['kind']===_0x1d655e(0x147)||_0x51141f[_0x1d655e(0x14e)]===_0x1d655e(0x161)||_0x51141f['target']==='bff.exec';}function cloneJsonValue(_0xcc44de){const _0xe4fe8f=a60_0x389a;if(Array[_0xe4fe8f(0x159)](_0xcc44de))return _0xcc44de[_0xe4fe8f(0x153)](_0x1d9a74=>cloneJsonValue(_0x1d9a74));if(isObjectRecord(_0xcc44de))return Object[_0xe4fe8f(0x14d)](Object[_0xe4fe8f(0x14f)](_0xcc44de)[_0xe4fe8f(0x153)](([_0x199c7c,_0x24886e])=>[_0x199c7c,cloneJsonValue(_0x24886e)]));return _0xcc44de;}function isObjectRecord(_0x4119ff){const _0x781b4f=a60_0x389a;return Boolean(_0x4119ff)&&typeof _0x4119ff===_0x781b4f(0x141)&&!Array[_0x781b4f(0x159)](_0x4119ff);}
@@ -1 +1 @@
1
- const a61_0x34b3ae=a61_0x43ff;(function(_0x1319ac,_0x183e08){const _0x160436=a61_0x43ff,_0x4e2930=_0x1319ac();while(!![]){try{const _0x161711=-parseInt(_0x160436(0x14d))/0x1+parseInt(_0x160436(0x142))/0x2+parseInt(_0x160436(0x11d))/0x3+-parseInt(_0x160436(0x157))/0x4*(parseInt(_0x160436(0x152))/0x5)+parseInt(_0x160436(0x124))/0x6*(parseInt(_0x160436(0x13b))/0x7)+parseInt(_0x160436(0x139))/0x8+-parseInt(_0x160436(0x138))/0x9;if(_0x161711===_0x183e08)break;else _0x4e2930['push'](_0x4e2930['shift']());}catch(_0x19b438){_0x4e2930['push'](_0x4e2930['shift']());}}}(a61_0xb115,0xbf7b3));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':'string','required':!![],'description':a61_0x34b3ae(0x121)},SERVICE_FLAG={'name':a61_0x34b3ae(0x14a),'type':a61_0x34b3ae(0x129),'required':!![],'description':a61_0x34b3ae(0x155),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a61_0x34b3ae(0x15c)}};function summarizeService(_0x1971e5){const _0x168856=a61_0x34b3ae;return{'serviceCode':_0x1971e5[_0x168856(0x12a)],'name':_0x1971e5[_0x168856(0x144)]['service'][_0x168856(0x117)],'version':_0x1971e5[_0x168856(0x159)],'importedAt':_0x1971e5[_0x168856(0x12e)],'source':_0x1971e5['source'],'commandCount':_0x1971e5['normalizedManifest'][_0x168856(0x143)][_0x168856(0x11e)],'commands':_0x1971e5[_0x168856(0x144)]['commands'][_0x168856(0x11f)](_0x23608d=>({'path':_0x23608d[_0x168856(0x15e)],'description':_0x23608d[_0x168856(0x14b)],'risk':_0x23608d[_0x168856(0x14c)],'target':toPublicServiceTreeTarget(_0x23608d[_0x168856(0x15d)]),'flags':_0x23608d[_0x168856(0x12b)]['map'](_0x5d233d=>({'name':_0x5d233d[_0x168856(0x117)],'cliName':_0x5d233d['cliName'],'type':_0x5d233d[_0x168856(0x14e)],'required':_0x5d233d[_0x168856(0x128)]===!![]}))}))};}function a61_0xb115(){const _0x32baf4=['kind','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','registryServiceCode','1332836sjDtfg','commands','normalizedManifest','Service\x20registry\x20validation\x20passed.','entry','detail','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','hash','service','description','risk','324105HHEQHK','type','WRITE','errors','从本地运行态注册表移除\x20Service\x20Tree\x20清单','5760470MJhoul','将从本地\x20Service\x20Tree\x20注册表中移除指定服务清单;之后该清单提供的动态命令将不可用。','file','Local\x20service\x20code,\x20for\x20example\x20crm','str','4PUcYRg','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','version','reduce','write','lower\x20kebab-case\x20service\x20code','target','cliPath','filePath','Exported\x20service\x20','name','replaced','export','manifests','\x20service\x20','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','151671gwQrBc','length','map','list','Service\x20Tree\x20manifest\x20file\x20path','将把指定服务的本地\x20Service\x20Tree\x20清单写入\x20JSON\x20文件;目标位置已有文件时可能被覆盖。确认界面不会展示本地文件路径。','serviceCount','148266KAuDef','Removed\x20service\x20','Local\x20service\x20not\x20found:\x20','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','required','string','serviceCode','flags','将读取指定清单并写入本地\x20Service\x20Tree\x20注册表;相同服务编码的现有清单会被更新。确认界面不会展示本地文件路径。','imported','importedAt','warnings','read','manifest','registryPath','updated','\x20service(s),\x20updated\x20','source','Imported','validate','341433uyUJdC','5337288GicrIN','registry','259AuqEMk','report','将本地\x20Service\x20Tree\x20清单导出为\x20JSON\x20文件','import'];a61_0xb115=function(){return _0x32baf4;};return a61_0xb115();}function summarizeLoadedManifest(_0x2c180c){const _0x4fde7f=a61_0x34b3ae;return{'service':_0x2c180c[_0x4fde7f(0x144)]?.[_0x4fde7f(0x14a)],'version':_0x2c180c[_0x4fde7f(0x144)]?.['version'],'commandCount':_0x2c180c[_0x4fde7f(0x144)]?.[_0x4fde7f(0x143)]['length']??0x0,'commands':_0x2c180c['normalizedManifest']?.[_0x4fde7f(0x143)][_0x4fde7f(0x11f)](_0x131127=>({'path':_0x131127[_0x4fde7f(0x15e)],'risk':_0x131127['risk'],'target':toPublicServiceTreeTarget(_0x131127['target'])}))??[],'registryIndex':_0x2c180c['registryIndex'],'registryServiceCode':_0x2c180c[_0x4fde7f(0x141)],'errors':_0x2c180c[_0x4fde7f(0x13c)][_0x4fde7f(0x150)],'warnings':_0x2c180c['report'][_0x4fde7f(0x12f)]};}function a61_0x43ff(_0x14551c,_0x36d3ca){_0x14551c=_0x14551c-0x116;const _0xb115c6=a61_0xb115();let _0x43ff95=_0xb115c6[_0x14551c];return _0x43ff95;}export const serviceDefinitions=[{'service':'service','command':a61_0x34b3ae(0x137),'description':a61_0x34b3ae(0x127),'risk':a61_0x34b3ae(0x130),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2cc6e5){const _0x347096=a61_0x34b3ae,_0xd1e2d0=loadServiceManifestFromFile(_0x2cc6e5[_0x347096(0x156)](_0x347096(0x154)));if(!_0xd1e2d0[_0x347096(0x13c)]['ok'])return{'ok':![],'data':{'file':_0xd1e2d0[_0x347096(0x15f)],'hash':_0xd1e2d0[_0x347096(0x149)],'kind':_0xd1e2d0[_0x347096(0x13f)],'serviceCount':_0xd1e2d0['manifests']['length'],'services':_0xd1e2d0[_0x347096(0x11a)][_0x347096(0x11f)](summarizeLoadedManifest),'errors':_0xd1e2d0[_0x347096(0x13c)][_0x347096(0x150)],'warnings':_0xd1e2d0['report'][_0x347096(0x12f)]},'message':formatValidationFailure(_0xd1e2d0[_0x347096(0x13c)])};if(_0xd1e2d0[_0x347096(0x13f)]===_0x347096(0x13a)||_0xd1e2d0[_0x347096(0x11a)]['length']!==0x1)return{'ok':!![],'data':{'file':_0xd1e2d0[_0x347096(0x15f)],'hash':_0xd1e2d0[_0x347096(0x149)],'kind':_0xd1e2d0[_0x347096(0x13f)],'serviceCount':_0xd1e2d0[_0x347096(0x11a)]['length'],'commandCount':_0xd1e2d0['manifests'][_0x347096(0x15a)]((_0x3aaecd,_0x7653ca)=>_0x3aaecd+(_0x7653ca['normalizedManifest']?.[_0x347096(0x143)][_0x347096(0x11e)]??0x0),0x0),'services':_0xd1e2d0[_0x347096(0x11a)][_0x347096(0x11f)](summarizeLoadedManifest),'warnings':_0xd1e2d0[_0x347096(0x13c)][_0x347096(0x12f)]},'message':_0x347096(0x145)};return{'ok':!![],'data':{'file':_0xd1e2d0[_0x347096(0x15f)],'hash':_0xd1e2d0[_0x347096(0x149)],'kind':_0xd1e2d0[_0x347096(0x13f)],'service':_0xd1e2d0['normalizedManifest']?.['service'],'version':_0xd1e2d0[_0x347096(0x144)]?.['version'],'commandCount':_0xd1e2d0[_0x347096(0x144)]?.[_0x347096(0x143)][_0x347096(0x11e)]??0x0,'commands':_0xd1e2d0[_0x347096(0x144)]?.['commands'][_0x347096(0x11f)](_0x97b1ec=>({'path':_0x97b1ec[_0x347096(0x15e)],'risk':_0x97b1ec[_0x347096(0x14c)],'target':toPublicServiceTreeTarget(_0x97b1ec[_0x347096(0x15d)])})),'warnings':_0xd1e2d0['report'][_0x347096(0x12f)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a61_0x34b3ae(0x14a),'command':a61_0x34b3ae(0x13e),'description':'将\x20Service\x20Tree\x20清单导入本地运行态注册表','risk':a61_0x34b3ae(0x15b),'confirmationDescription':a61_0x34b3ae(0x12c),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x265408){const _0x2ef3b3=a61_0x34b3ae,_0x544c2d=loadServiceManifestFromFile(_0x265408[_0x2ef3b3(0x156)](_0x2ef3b3(0x154)));return{'method':_0x2ef3b3(0x14f),'url':getServiceRegistryPath(),'body':{'file':_0x544c2d[_0x2ef3b3(0x15f)],'hash':_0x544c2d[_0x2ef3b3(0x149)],'kind':_0x544c2d[_0x2ef3b3(0x13f)],'ok':_0x544c2d[_0x2ef3b3(0x13c)]['ok'],'service':_0x544c2d[_0x2ef3b3(0x144)]?.[_0x2ef3b3(0x14a)],'version':_0x544c2d[_0x2ef3b3(0x144)]?.[_0x2ef3b3(0x159)],'serviceCount':_0x544c2d['manifests']['length'],'services':_0x544c2d['manifests'][_0x2ef3b3(0x11f)](_0x2a6e41=>({'service':_0x2a6e41[_0x2ef3b3(0x144)]?.[_0x2ef3b3(0x14a)],'version':_0x2a6e41[_0x2ef3b3(0x144)]?.['version'],'commandCount':_0x2a6e41[_0x2ef3b3(0x144)]?.[_0x2ef3b3(0x143)][_0x2ef3b3(0x11e)]??0x0,'errors':_0x2a6e41[_0x2ef3b3(0x13c)][_0x2ef3b3(0x150)]})),'errors':_0x544c2d['report']['errors'],'commandCount':_0x544c2d[_0x2ef3b3(0x144)]?.[_0x2ef3b3(0x143)][_0x2ef3b3(0x11e)]??0x0},'description':_0x2ef3b3(0x140)};},async 'execute'(_0x56f854){const _0x253fd7=a61_0x34b3ae,_0x338cd0=importServiceManifest(_0x56f854[_0x253fd7(0x156)](_0x253fd7(0x154)));if(_0x338cd0['entries'][_0x253fd7(0x11e)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x338cd0[_0x253fd7(0x132)],'imported':_0x338cd0[_0x253fd7(0x12d)],'updated':_0x338cd0[_0x253fd7(0x133)],'serviceCount':_0x338cd0[_0x253fd7(0x123)],'services':_0x338cd0['entries'][_0x253fd7(0x11f)](summarizeService)},'message':'Imported\x20'+_0x338cd0[_0x253fd7(0x12d)]+_0x253fd7(0x134)+_0x338cd0[_0x253fd7(0x133)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x338cd0[_0x253fd7(0x132)],'replaced':_0x338cd0[_0x253fd7(0x118)],'imported':_0x338cd0[_0x253fd7(0x12d)],'updated':_0x338cd0[_0x253fd7(0x133)],'serviceCount':_0x338cd0['serviceCount'],'service':summarizeService(_0x338cd0[_0x253fd7(0x146)])},'message':(_0x338cd0[_0x253fd7(0x118)]?'Updated':_0x253fd7(0x136))+_0x253fd7(0x11b)+_0x338cd0[_0x253fd7(0x146)][_0x253fd7(0x12a)]+'.'};}},{'service':'service','command':a61_0x34b3ae(0x119),'description':a61_0x34b3ae(0x13d),'risk':a61_0x34b3ae(0x15b),'confirmationDescription':a61_0x34b3ae(0x122),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x494019){const _0x59db3f=a61_0x34b3ae,_0x30e6b4=getLocalServiceEntry(_0x494019['str'](_0x59db3f(0x14a)));return{'method':_0x59db3f(0x14f),'url':_0x494019[_0x59db3f(0x156)]('file'),'body':{'service':_0x494019[_0x59db3f(0x156)](_0x59db3f(0x14a)),'found':Boolean(_0x30e6b4),'version':_0x30e6b4?.[_0x59db3f(0x159)],'source':_0x30e6b4?.[_0x59db3f(0x135)]},'description':_0x59db3f(0x148)};},async 'execute'(_0x359b49){const _0x1fc95d=a61_0x34b3ae,_0x8292ea=exportServiceManifest(_0x359b49['str'](_0x1fc95d(0x14a)),_0x359b49[_0x1fc95d(0x156)]('file'));return{'ok':!![],'data':{'registryPath':_0x8292ea[_0x1fc95d(0x132)],'file':_0x8292ea['filePath'],'service':summarizeService(_0x8292ea[_0x1fc95d(0x146)])},'message':_0x1fc95d(0x116)+_0x8292ea[_0x1fc95d(0x146)][_0x1fc95d(0x12a)]+'.'};}},{'service':a61_0x34b3ae(0x14a),'command':a61_0x34b3ae(0x120),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':a61_0x34b3ae(0x130),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0xc23f5d=a61_0x34b3ae,_0x338135=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x338135['length'],'services':_0x338135[_0xc23f5d(0x11f)](summarizeService)}};}},{'service':a61_0x34b3ae(0x14a),'command':'remove','description':a61_0x34b3ae(0x151),'risk':'write','confirmationDescription':a61_0x34b3ae(0x153),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x1c8e6b){const _0x462347=a61_0x34b3ae,_0x2fcb95=getLocalServiceEntry(_0x1c8e6b['str'](_0x462347(0x14a)));return{'method':_0x462347(0x14f),'url':getServiceRegistryPath(),'body':{'service':_0x1c8e6b[_0x462347(0x156)](_0x462347(0x14a)),'found':Boolean(_0x2fcb95),'version':_0x2fcb95?.[_0x462347(0x159)],'source':_0x2fcb95?.[_0x462347(0x135)]},'description':_0x462347(0x158)};},async 'execute'(_0x298b4f){const _0x23a9e7=a61_0x34b3ae,_0x49a82f=removeServiceManifest(_0x298b4f[_0x23a9e7(0x156)](_0x23a9e7(0x14a)));return{'ok':!![],'data':{'registryPath':_0x49a82f[_0x23a9e7(0x132)],'serviceCount':_0x49a82f['serviceCount'],'service':summarizeService(_0x49a82f[_0x23a9e7(0x146)])},'message':_0x23a9e7(0x125)+_0x49a82f[_0x23a9e7(0x146)][_0x23a9e7(0x12a)]+'.'};}},{'service':'service','command':a61_0x34b3ae(0x147),'description':a61_0x34b3ae(0x11c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x1c02d7){const _0x5addcb=a61_0x34b3ae,_0x3cee3d=getLocalServiceEntry(_0x1c02d7['str']('service'));if(!_0x3cee3d)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x1c02d7['str'](_0x5addcb(0x14a))},'message':_0x5addcb(0x126)+_0x1c02d7[_0x5addcb(0x156)](_0x5addcb(0x14a))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x3cee3d),'manifest':_0x3cee3d[_0x5addcb(0x131)],'normalizedManifest':toPublicNormalizedServiceTree(_0x3cee3d[_0x5addcb(0x144)])}};}}];
1
+ const a61_0x296560=a61_0x19d6;function a61_0x33a2(){const _0x57da90=['required','imported','export','Service\x20registry\x20validation\x20passed.','serviceCode','Imported','detail','service','normalizedManifest','errors','string','filePath','hash','3591387ntsUEG','updated','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','2359707AGUqUN','registryIndex','type','485149PWviPD','Local\x20service\x20not\x20found:\x20','map','target','read','从本地运行态注册表移除\x20Service\x20Tree\x20清单','entry','registry','246ybIPlv','2080RSVBmI','risk','cliPath','将\x20Service\x20Tree\x20清单导入本地运行态注册表','将读取指定清单并写入本地\x20Service\x20Tree\x20注册表;相同服务编码的现有清单会被更新。确认界面不会展示本地文件路径。','str','commands','2323026FLsyuJ','Exported\x20service\x20','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','manifests','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','file','kind','write','registryServiceCode','将从本地\x20Service\x20Tree\x20注册表中移除指定服务清单;之后该清单提供的动态命令将不可用。','Updated','flags','10vzNxbL','将把指定服务的本地\x20Service\x20Tree\x20清单写入\x20JSON\x20文件;目标位置已有文件时可能被覆盖。确认界面不会展示本地文件路径。','report','remove','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','Local\x20service\x20code,\x20for\x20example\x20crm','entries','WRITE','import','source','version','registryPath','description','1963284NeAcBe','Service\x20manifest\x20validation\x20passed.','3318AZVQvA','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','\x20service\x20','importedAt','Service\x20Tree\x20manifest\x20file\x20path','warnings','99310TZLCDC','serviceCount','length','validate'];a61_0x33a2=function(){return _0x57da90;};return a61_0x33a2();}function a61_0x19d6(_0x577396,_0x2b8123){_0x577396=_0x577396-0x12f;const _0x33a233=a61_0x33a2();let _0x19d67b=_0x33a233[_0x577396];return _0x19d67b;}(function(_0x57d11c,_0x14f975){const _0x508791=a61_0x19d6,_0xfe3a80=_0x57d11c();while(!![]){try{const _0x4463e2=parseInt(_0x508791(0x15e))/0x1+parseInt(_0x508791(0x16e))/0x2+-parseInt(_0x508791(0x15b))/0x3+-parseInt(_0x508791(0x13f))/0x4+parseInt(_0x508791(0x147))/0x5*(parseInt(_0x508791(0x166))/0x6)+parseInt(_0x508791(0x141))/0x7*(parseInt(_0x508791(0x167))/0x8)+-parseInt(_0x508791(0x158))/0x9*(parseInt(_0x508791(0x132))/0xa);if(_0x4463e2===_0x14f975)break;else _0xfe3a80['push'](_0xfe3a80['shift']());}catch(_0x23192d){_0xfe3a80['push'](_0xfe3a80['shift']());}}}(a61_0x33a2,0xdda23));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a61_0x296560(0x173),'type':a61_0x296560(0x155),'required':!![],'description':a61_0x296560(0x145)},SERVICE_FLAG={'name':'service','type':'string','required':!![],'description':a61_0x296560(0x137),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0xd547cf){const _0x5bd0a5=a61_0x296560;return{'serviceCode':_0xd547cf[_0x5bd0a5(0x14f)],'name':_0xd547cf[_0x5bd0a5(0x153)][_0x5bd0a5(0x152)]['name'],'version':_0xd547cf[_0x5bd0a5(0x13c)],'importedAt':_0xd547cf[_0x5bd0a5(0x144)],'source':_0xd547cf['source'],'commandCount':_0xd547cf[_0x5bd0a5(0x153)][_0x5bd0a5(0x16d)][_0x5bd0a5(0x149)],'commands':_0xd547cf[_0x5bd0a5(0x153)][_0x5bd0a5(0x16d)][_0x5bd0a5(0x160)](_0x37c62e=>({'path':_0x37c62e[_0x5bd0a5(0x169)],'description':_0x37c62e[_0x5bd0a5(0x13e)],'risk':_0x37c62e['risk'],'target':toPublicServiceTreeTarget(_0x37c62e[_0x5bd0a5(0x161)]),'flags':_0x37c62e[_0x5bd0a5(0x131)][_0x5bd0a5(0x160)](_0x4fe5f6=>({'name':_0x4fe5f6['name'],'cliName':_0x4fe5f6['cliName'],'type':_0x4fe5f6[_0x5bd0a5(0x15d)],'required':_0x4fe5f6[_0x5bd0a5(0x14b)]===!![]}))}))};}function summarizeLoadedManifest(_0x2fc13a){const _0x58843f=a61_0x296560;return{'service':_0x2fc13a['normalizedManifest']?.[_0x58843f(0x152)],'version':_0x2fc13a[_0x58843f(0x153)]?.[_0x58843f(0x13c)],'commandCount':_0x2fc13a[_0x58843f(0x153)]?.['commands']['length']??0x0,'commands':_0x2fc13a[_0x58843f(0x153)]?.[_0x58843f(0x16d)][_0x58843f(0x160)](_0x26c351=>({'path':_0x26c351[_0x58843f(0x169)],'risk':_0x26c351[_0x58843f(0x168)],'target':toPublicServiceTreeTarget(_0x26c351[_0x58843f(0x161)])}))??[],'registryIndex':_0x2fc13a[_0x58843f(0x15c)],'registryServiceCode':_0x2fc13a[_0x58843f(0x176)],'errors':_0x2fc13a[_0x58843f(0x134)][_0x58843f(0x154)],'warnings':_0x2fc13a['report']['warnings']};}export const serviceDefinitions=[{'service':a61_0x296560(0x152),'command':a61_0x296560(0x14a),'description':a61_0x296560(0x15a),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x40e484){const _0x4f8304=a61_0x296560,_0x5b1054=loadServiceManifestFromFile(_0x40e484[_0x4f8304(0x16c)](_0x4f8304(0x173)));if(!_0x5b1054[_0x4f8304(0x134)]['ok'])return{'ok':![],'data':{'file':_0x5b1054[_0x4f8304(0x156)],'hash':_0x5b1054[_0x4f8304(0x157)],'kind':_0x5b1054['kind'],'serviceCount':_0x5b1054[_0x4f8304(0x171)][_0x4f8304(0x149)],'services':_0x5b1054['manifests'][_0x4f8304(0x160)](summarizeLoadedManifest),'errors':_0x5b1054[_0x4f8304(0x134)][_0x4f8304(0x154)],'warnings':_0x5b1054[_0x4f8304(0x134)][_0x4f8304(0x146)]},'message':formatValidationFailure(_0x5b1054['report'])};if(_0x5b1054['kind']===_0x4f8304(0x165)||_0x5b1054[_0x4f8304(0x171)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x5b1054['filePath'],'hash':_0x5b1054[_0x4f8304(0x157)],'kind':_0x5b1054[_0x4f8304(0x174)],'serviceCount':_0x5b1054[_0x4f8304(0x171)][_0x4f8304(0x149)],'commandCount':_0x5b1054[_0x4f8304(0x171)]['reduce']((_0x50ee61,_0x24de8a)=>_0x50ee61+(_0x24de8a[_0x4f8304(0x153)]?.[_0x4f8304(0x16d)]['length']??0x0),0x0),'services':_0x5b1054[_0x4f8304(0x171)]['map'](summarizeLoadedManifest),'warnings':_0x5b1054[_0x4f8304(0x134)][_0x4f8304(0x146)]},'message':_0x4f8304(0x14e)};return{'ok':!![],'data':{'file':_0x5b1054[_0x4f8304(0x156)],'hash':_0x5b1054['hash'],'kind':_0x5b1054[_0x4f8304(0x174)],'service':_0x5b1054[_0x4f8304(0x153)]?.[_0x4f8304(0x152)],'version':_0x5b1054['normalizedManifest']?.[_0x4f8304(0x13c)],'commandCount':_0x5b1054[_0x4f8304(0x153)]?.[_0x4f8304(0x16d)]['length']??0x0,'commands':_0x5b1054[_0x4f8304(0x153)]?.['commands'][_0x4f8304(0x160)](_0x236e7e=>({'path':_0x236e7e[_0x4f8304(0x169)],'risk':_0x236e7e[_0x4f8304(0x168)],'target':toPublicServiceTreeTarget(_0x236e7e[_0x4f8304(0x161)])})),'warnings':_0x5b1054[_0x4f8304(0x134)]['warnings']},'message':_0x4f8304(0x140)};}},{'service':'service','command':a61_0x296560(0x13a),'description':a61_0x296560(0x16a),'risk':a61_0x296560(0x175),'confirmationDescription':a61_0x296560(0x16b),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x324c11){const _0xd1316=a61_0x296560,_0x496721=loadServiceManifestFromFile(_0x324c11[_0xd1316(0x16c)](_0xd1316(0x173)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x496721[_0xd1316(0x156)],'hash':_0x496721['hash'],'kind':_0x496721[_0xd1316(0x174)],'ok':_0x496721[_0xd1316(0x134)]['ok'],'service':_0x496721[_0xd1316(0x153)]?.[_0xd1316(0x152)],'version':_0x496721[_0xd1316(0x153)]?.[_0xd1316(0x13c)],'serviceCount':_0x496721['manifests']['length'],'services':_0x496721[_0xd1316(0x171)][_0xd1316(0x160)](_0x263878=>({'service':_0x263878['normalizedManifest']?.[_0xd1316(0x152)],'version':_0x263878[_0xd1316(0x153)]?.[_0xd1316(0x13c)],'commandCount':_0x263878['normalizedManifest']?.[_0xd1316(0x16d)]['length']??0x0,'errors':_0x263878[_0xd1316(0x134)][_0xd1316(0x154)]})),'errors':_0x496721[_0xd1316(0x134)][_0xd1316(0x154)],'commandCount':_0x496721[_0xd1316(0x153)]?.[_0xd1316(0x16d)][_0xd1316(0x149)]??0x0},'description':_0xd1316(0x172)};},async 'execute'(_0x6951ae){const _0x438b3b=a61_0x296560,_0x33c658=importServiceManifest(_0x6951ae[_0x438b3b(0x16c)](_0x438b3b(0x173)));if(_0x33c658[_0x438b3b(0x138)][_0x438b3b(0x149)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x33c658[_0x438b3b(0x13d)],'imported':_0x33c658[_0x438b3b(0x14c)],'updated':_0x33c658[_0x438b3b(0x159)],'serviceCount':_0x33c658['serviceCount'],'services':_0x33c658[_0x438b3b(0x138)][_0x438b3b(0x160)](summarizeService)},'message':'Imported\x20'+_0x33c658[_0x438b3b(0x14c)]+'\x20service(s),\x20updated\x20'+_0x33c658[_0x438b3b(0x159)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x33c658[_0x438b3b(0x13d)],'replaced':_0x33c658['replaced'],'imported':_0x33c658[_0x438b3b(0x14c)],'updated':_0x33c658[_0x438b3b(0x159)],'serviceCount':_0x33c658[_0x438b3b(0x148)],'service':summarizeService(_0x33c658[_0x438b3b(0x164)])},'message':(_0x33c658['replaced']?_0x438b3b(0x130):_0x438b3b(0x150))+_0x438b3b(0x143)+_0x33c658['entry']['serviceCode']+'.'};}},{'service':a61_0x296560(0x152),'command':a61_0x296560(0x14d),'description':'将本地\x20Service\x20Tree\x20清单导出为\x20JSON\x20文件','risk':a61_0x296560(0x175),'confirmationDescription':a61_0x296560(0x133),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x298a09){const _0x395571=a61_0x296560,_0xc92135=getLocalServiceEntry(_0x298a09[_0x395571(0x16c)](_0x395571(0x152)));return{'method':_0x395571(0x139),'url':_0x298a09['str'](_0x395571(0x173)),'body':{'service':_0x298a09[_0x395571(0x16c)](_0x395571(0x152)),'found':Boolean(_0xc92135),'version':_0xc92135?.[_0x395571(0x13c)],'source':_0xc92135?.[_0x395571(0x13b)]},'description':_0x395571(0x142)};},async 'execute'(_0x3fdd03){const _0x15e916=a61_0x296560,_0x1be44a=exportServiceManifest(_0x3fdd03[_0x15e916(0x16c)](_0x15e916(0x152)),_0x3fdd03[_0x15e916(0x16c)]('file'));return{'ok':!![],'data':{'registryPath':_0x1be44a[_0x15e916(0x13d)],'file':_0x1be44a[_0x15e916(0x156)],'service':summarizeService(_0x1be44a[_0x15e916(0x164)])},'message':_0x15e916(0x16f)+_0x1be44a[_0x15e916(0x164)][_0x15e916(0x14f)]+'.'};}},{'service':a61_0x296560(0x152),'command':'list','description':a61_0x296560(0x170),'risk':a61_0x296560(0x162),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x1801ec=a61_0x296560,_0x299b59=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x299b59[_0x1801ec(0x149)],'services':_0x299b59['map'](summarizeService)}};}},{'service':'service','command':a61_0x296560(0x135),'description':a61_0x296560(0x163),'risk':a61_0x296560(0x175),'confirmationDescription':a61_0x296560(0x12f),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x4d0a1f){const _0x4984a8=a61_0x296560,_0x1840e0=getLocalServiceEntry(_0x4d0a1f[_0x4984a8(0x16c)](_0x4984a8(0x152)));return{'method':_0x4984a8(0x139),'url':getServiceRegistryPath(),'body':{'service':_0x4d0a1f[_0x4984a8(0x16c)](_0x4984a8(0x152)),'found':Boolean(_0x1840e0),'version':_0x1840e0?.['version'],'source':_0x1840e0?.[_0x4984a8(0x13b)]},'description':'Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x4d2e4f){const _0x548caf=a61_0x296560,_0x20884b=removeServiceManifest(_0x4d2e4f[_0x548caf(0x16c)]('service'));return{'ok':!![],'data':{'registryPath':_0x20884b['registryPath'],'serviceCount':_0x20884b[_0x548caf(0x148)],'service':summarizeService(_0x20884b['entry'])},'message':'Removed\x20service\x20'+_0x20884b[_0x548caf(0x164)][_0x548caf(0x14f)]+'.'};}},{'service':a61_0x296560(0x152),'command':a61_0x296560(0x151),'description':a61_0x296560(0x136),'risk':a61_0x296560(0x162),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x976dca){const _0x31c9ae=a61_0x296560,_0x5e6345=getLocalServiceEntry(_0x976dca[_0x31c9ae(0x16c)](_0x31c9ae(0x152)));if(!_0x5e6345)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x976dca[_0x31c9ae(0x16c)](_0x31c9ae(0x152))},'message':_0x31c9ae(0x15f)+_0x976dca[_0x31c9ae(0x16c)](_0x31c9ae(0x152))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x5e6345),'manifest':_0x5e6345['manifest'],'normalizedManifest':toPublicNormalizedServiceTree(_0x5e6345['normalizedManifest'])}};}}];
@@ -1 +1 @@
1
- const a62_0x3f808c=a62_0x3f95;(function(_0x1c53a7,_0x7057d5){const _0x135ae9=a62_0x3f95,_0x2c916a=_0x1c53a7();while(!![]){try{const _0x254df9=-parseInt(_0x135ae9(0x192))/0x1*(-parseInt(_0x135ae9(0x1c6))/0x2)+parseInt(_0x135ae9(0x1a4))/0x3*(-parseInt(_0x135ae9(0x1aa))/0x4)+-parseInt(_0x135ae9(0x1b2))/0x5*(-parseInt(_0x135ae9(0x1c4))/0x6)+-parseInt(_0x135ae9(0x1a6))/0x7*(-parseInt(_0x135ae9(0x184))/0x8)+parseInt(_0x135ae9(0x1bf))/0x9*(parseInt(_0x135ae9(0x1c5))/0xa)+-parseInt(_0x135ae9(0x1ca))/0xb+-parseInt(_0x135ae9(0x1a5))/0xc*(parseInt(_0x135ae9(0x172))/0xd);if(_0x254df9===_0x7057d5)break;else _0x2c916a['push'](_0x2c916a['shift']());}catch(_0x29c1b2){_0x2c916a['push'](_0x2c916a['shift']());}}}(a62_0x2175,0xade66));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a62_0x3f808c(0x170);export function getServiceRegistryPath(_0x1fff27={}){const _0x27434a=a62_0x3f808c;return resolve(_0x1fff27[_0x27434a(0x189)]??homedir(),PRODUCT_CONFIG['homeDirName'],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x2fa873={}){const _0x367418=a62_0x3f808c,_0x449ae9=getServiceRegistryPath(_0x2fa873);if(!existsSync(_0x449ae9))return emptyServiceRegistry();try{const _0x27a550=readFileSync(_0x449ae9,_0x367418(0x180));if(!_0x27a550[_0x367418(0x1ba)]())return emptyServiceRegistry();const _0x23d6fd=JSON[_0x367418(0x1b8)](_0x27a550);if(_0x23d6fd[_0x367418(0x188)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation'](_0x367418(0x1c8)+String(_0x23d6fd['schemaVersion']),_0x367418(0x19a)+_0x449ae9+'.');if(!Array[_0x367418(0x182)](_0x23d6fd[_0x367418(0x190)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x23d6fd[_0x367418(0x1ac)],'services':_0x23d6fd[_0x367418(0x190)]};}catch(_0x30348d){if(_0x30348d instanceof Error&&_0x30348d[_0x367418(0x1b1)]===_0x367418(0x1ae))throw _0x30348d;throw CliErrors[_0x367418(0x178)](_0x367418(0x196)+_0x449ae9,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x10c643,_0x4ea9ec={}){const _0xeccd81=a62_0x3f808c,_0x3260d5=getServiceRegistryPath(_0x4ea9ec),_0x52de02=dirname(_0x3260d5);!existsSync(_0x52de02)&&mkdirSync(_0x52de02,{'recursive':!![]});const _0x2f07bc=_0x3260d5+_0xeccd81(0x176);try{writeFileSync(_0x2f07bc,JSON[_0xeccd81(0x195)](_0x10c643,null,0x2)+'\x0a',{'encoding':_0xeccd81(0x180),'mode':0x180}),renameSync(_0x2f07bc,_0x3260d5);}catch(_0x47bc99){try{unlinkSync(_0x2f07bc);}catch{}if(_0x47bc99?.[_0xeccd81(0x174)]===_0xeccd81(0x193))throw CliErrors[_0xeccd81(0x178)](_0xeccd81(0x179)+_0x3260d5);throw _0x47bc99;}return _0x3260d5;}export function loadServiceManifestFromFile(_0x52f2d2){const _0x5b62a2=a62_0x3f808c,_0x23430e=resolve(_0x52f2d2);if(!existsSync(_0x23430e))throw CliErrors['validation'](_0x5b62a2(0x19b)+_0x52f2d2);let _0x36425c;const _0x4042ed=readFileSync(_0x23430e,_0x5b62a2(0x180));try{_0x36425c=JSON[_0x5b62a2(0x1b8)](_0x4042ed);}catch{throw CliErrors['validation']('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x52f2d2,_0x5b62a2(0x1a1));}const _0x5e5dfc=sha256(_0x4042ed),_0x417b06=extractLoadedServiceManifests(_0x36425c,_0x5e5dfc),_0x31ec97=aggregateValidationReports(_0x417b06),_0x2e628e=_0x417b06[0x0];return{'filePath':_0x23430e,'hash':_0x5e5dfc,'kind':isServiceRegistryLike(_0x36425c)?'registry':_0x5b62a2(0x1a8),'manifest':_0x2e628e?.[_0x5b62a2(0x1a8)]??_0x36425c,'report':_0x31ec97,'normalizedManifest':_0x417b06[_0x5b62a2(0x186)]===0x1?_0x2e628e?.[_0x5b62a2(0x19e)]:undefined,'manifests':_0x417b06};}export function importServiceManifest(_0x36d52a,_0x4e8583={}){const _0xc9bdd=a62_0x3f808c,_0xb83ed6=loadServiceManifestFromFile(_0x36d52a);if(!_0xb83ed6[_0xc9bdd(0x1b7)]['ok'])throw CliErrors[_0xc9bdd(0x178)](formatValidationFailure(_0xb83ed6[_0xc9bdd(0x1b7)]),_0xc9bdd(0x1a3));if(_0xb83ed6[_0xc9bdd(0x19d)][_0xc9bdd(0x186)]===0x0)throw CliErrors['validation']('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0xc9bdd(0x1a9));const _0x56ac6a=readServiceRegistry(_0x4e8583),_0x495b7d=(_0x4e8583[_0xc9bdd(0x1bd)]??(()=>new Date()))()[_0xc9bdd(0x1c2)](),_0x11e1f1=[];let _0x2a0cfd=0x0,_0x5e96dc=0x0;for(const _0xd13877 of _0xb83ed6[_0xc9bdd(0x19d)]){if(!_0xd13877[_0xc9bdd(0x19e)])continue;const _0xc7e25b=_0xd13877['normalizedManifest'][_0xc9bdd(0x18e)][_0xc9bdd(0x174)],_0x46572f={'serviceCode':_0xc7e25b,'version':_0xd13877[_0xc9bdd(0x19e)]['version'],'importedAt':_0x495b7d,'source':{'type':_0xc9bdd(0x1bc),'path':_0xb83ed6[_0xc9bdd(0x1bb)],'hash':_0xd13877[_0xc9bdd(0x17a)]},'manifest':_0xd13877[_0xc9bdd(0x1a8)],'normalizedManifest':_0xd13877[_0xc9bdd(0x19e)]},_0xebc3d6=_0x56ac6a[_0xc9bdd(0x190)][_0xc9bdd(0x175)](_0xdb5392=>_0xdb5392[_0xc9bdd(0x17c)]===_0xc7e25b);_0xebc3d6>=0x0?(_0x56ac6a[_0xc9bdd(0x190)][_0xebc3d6]=_0x46572f,_0x5e96dc++):(_0x56ac6a[_0xc9bdd(0x190)][_0xc9bdd(0x199)](_0x46572f),_0x2a0cfd++),_0x11e1f1[_0xc9bdd(0x199)](_0x46572f);}_0x56ac6a['services'][_0xc9bdd(0x18b)]((_0xfee4a,_0xd0ca22)=>_0xfee4a[_0xc9bdd(0x17c)]['localeCompare'](_0xd0ca22['serviceCode'])),_0x56ac6a[_0xc9bdd(0x1ac)]=_0x495b7d;const _0x2a9860=writeServiceRegistry(_0x56ac6a,_0x4e8583);return{'registryPath':_0x2a9860,'entry':_0x11e1f1[0x0],'replaced':_0x11e1f1[_0xc9bdd(0x186)]===0x1?_0x5e96dc===0x1:_0x5e96dc>0x0,'entries':_0x11e1f1,'imported':_0x2a0cfd,'updated':_0x5e96dc,'serviceCount':_0x56ac6a['services'][_0xc9bdd(0x186)]};}export function exportServiceManifest(_0x2403a9,_0x1d5fdf,_0x39131a={}){const _0x37b592=a62_0x3f808c,_0x580522=getServiceRegistryPath(_0x39131a),_0x43a265=getLocalServiceEntry(_0x2403a9,_0x39131a);if(!_0x43a265)throw CliErrors[_0x37b592(0x178)](_0x37b592(0x1be)+_0x2403a9,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x2f7cb1=resolve(_0x1d5fdf),_0x44f0ae=dirname(_0x2f7cb1);return!existsSync(_0x44f0ae)&&mkdirSync(_0x44f0ae,{'recursive':!![]}),writeFileSync(_0x2f7cb1,JSON['stringify'](_0x43a265[_0x37b592(0x1a8)],null,0x2)+'\x0a',{'encoding':_0x37b592(0x180),'mode':0x180}),{'registryPath':_0x580522,'filePath':_0x2f7cb1,'entry':_0x43a265};}export function removeServiceManifest(_0x26e3c1,_0x37ef60={}){const _0x2b27c5=a62_0x3f808c,_0x32a03a=readServiceRegistry(_0x37ef60),_0x2b9035=_0x26e3c1['trim'](),_0x45aee5=_0x32a03a['services'][_0x2b27c5(0x175)](_0x2e3410=>_0x2e3410[_0x2b27c5(0x17c)]===_0x2b9035);if(_0x45aee5<0x0)throw CliErrors[_0x2b27c5(0x178)]('Local\x20service\x20not\x20found:\x20'+_0x2b9035,_0x2b27c5(0x1c9));const [_0x365f5b]=_0x32a03a['services'][_0x2b27c5(0x19c)](_0x45aee5,0x1),_0x2da03e=(_0x37ef60[_0x2b27c5(0x1bd)]??(()=>new Date()))()[_0x2b27c5(0x1c2)]();_0x32a03a['updatedAt']=_0x2da03e;const _0x38ec36=writeServiceRegistry(_0x32a03a,_0x37ef60);return{'registryPath':_0x38ec36,'entry':_0x365f5b,'serviceCount':_0x32a03a['services']['length']};}export function listLocalServices(_0x11fd54={}){return readServiceRegistry(_0x11fd54)['services'];}export function getLocalServiceEntry(_0x369191,_0x22f115={}){const _0x33adf6=a62_0x3f808c;return readServiceRegistry(_0x22f115)[_0x33adf6(0x190)][_0x33adf6(0x1cb)](_0x3acf4e=>_0x3acf4e['serviceCode']===_0x369191['trim']());}export function listLocalServiceTrees(_0x3b327c={}){const _0x167cf7=a62_0x3f808c;return readServiceRegistry(_0x3b327c)[_0x167cf7(0x190)][_0x167cf7(0x1b6)](_0x596824=>_0x596824[_0x167cf7(0x19e)]);}function a62_0x2175(){const _0x429d2c=['kind','2EglOnk','ENOENT','startsWith','stringify','Invalid\x20service\x20registry\x20JSON:\x20','Service\x20manifest\x20validation\x20failed:\x0a','message','push','Remove\x20or\x20migrate\x20','Service\x20manifest\x20file\x20not\x20found:\x20','splice','manifests','normalizedManifest','sha256','flatMap','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','warnings','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','3tXiDXB','48Lzqxdr','49HVtFyP','digest','manifest','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','5158684TjiGQF','object','updatedAt','string','CliError','invalid','hex','name','3166535YqxnSM','description','].manifest','Unsupported\x20schemaVersion:\x20','map','report','parse','target','trim','filePath','file','now','Local\x20service\x20not\x20found:\x20','847881YqrXrW','version','reduce','toISOString','services\x20must\x20be\x20an\x20array','12tMbUMq','20aqwsws','358962kGDffc','source','Unsupported\x20service\x20registry\x20schemaVersion:\x20','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','3875047pOkBxY','find','service.json','path','2649959hkeunM','importedAt','code','findIndex','.tmp','commands','validation','Cannot\x20write\x20service\x20registry:\x20','sourceHash','slice','serviceCode','registryIndex','join','cliPath','utf8','command','isArray','errors','1549280yBvNma','].manifest.','length','missing','schemaVersion','homeDir','commandCount','sort','$.services[','empty','service','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','services'];a62_0x2175=function(){return _0x429d2c;};return a62_0x2175();}export function inspectServiceRegistry(_0x2281cb={}){const _0x48d2bd=a62_0x3f808c,_0xb405ed=getServiceRegistryPath(_0x2281cb);if(!existsSync(_0xb405ed))return emptyServiceRegistryInspection(_0xb405ed,_0x48d2bd(0x187),![]);try{const _0xad6672=readFileSync(_0xb405ed,_0x48d2bd(0x180));if(!_0xad6672[_0x48d2bd(0x1ba)]())return emptyServiceRegistryInspection(_0xb405ed,_0x48d2bd(0x18d),!![]);const _0x48fcc0=JSON[_0x48d2bd(0x1b8)](_0xad6672);if(_0x48fcc0[_0x48d2bd(0x188)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0xb405ed,_0x48d2bd(0x1af),!![]),'schemaVersion':_0x48fcc0[_0x48d2bd(0x188)],'message':_0x48d2bd(0x1b5)+String(_0x48fcc0[_0x48d2bd(0x188)])};if(!Array[_0x48d2bd(0x182)](_0x48fcc0[_0x48d2bd(0x190)]))return{...emptyServiceRegistryInspection(_0xb405ed,_0x48d2bd(0x1af),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x48fcc0['updatedAt'],'message':_0x48d2bd(0x1c3)};const _0x32cb85=_0x48fcc0['services']['map'](summarizeLocalServiceEntry);return{'registryPath':_0xb405ed,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x48fcc0[_0x48d2bd(0x1ac)],'serviceCount':_0x32cb85[_0x48d2bd(0x186)],'commandCount':_0x32cb85[_0x48d2bd(0x1c1)]((_0x2fa622,_0x2c6458)=>_0x2fa622+_0x2c6458[_0x48d2bd(0x18a)],0x0),'services':_0x32cb85};}catch(_0x2f4825){return{...emptyServiceRegistryInspection(_0xb405ed,_0x48d2bd(0x1af),!![]),'message':_0x2f4825 instanceof Error?_0x2f4825[_0x48d2bd(0x198)]:String(_0x2f4825)};}}export function formatValidationFailure(_0x1e5d70){const _0x30b34c=a62_0x3f808c,_0x47291e=_0x1e5d70['errors']['map'](_0x2d6086=>_0x2d6086['path']+':\x20'+_0x2d6086[_0x30b34c(0x198)]);return _0x30b34c(0x197)+_0x47291e[_0x30b34c(0x17e)]('\x0a');}function extractLoadedServiceManifests(_0x123069,_0x560e9a){const _0xf4ffd9=a62_0x3f808c;if(!isServiceRegistryLike(_0x123069)){const _0x33600a=_0x123069,{manifest:_0x45aefa,errors:_0x460eed}=adaptServiceTreeManifestForLegacyFramework(_0x33600a),_0x3cc3b2=validateServiceTreeManifest(_0x45aefa),_0x1d34ba=mergeValidationErrors(_0x3cc3b2,_0x460eed);return[{'manifest':_0x33600a,'report':_0x1d34ba,'normalizedManifest':_0x1d34ba['ok']?normalizeServiceTreeManifest(_0x45aefa):undefined,'sourceHash':_0x560e9a}];}return _0x123069[_0xf4ffd9(0x190)][_0xf4ffd9(0x1b6)]((_0x48e97b,_0x1892f1)=>{const _0x31c3c5=_0xf4ffd9,_0x730309=isObjectRecord(_0x48e97b)?_0x48e97b[_0x31c3c5(0x1a8)]:undefined,{manifest:_0x4f7f5d,errors:_0xe9c787}=adaptServiceTreeManifestForLegacyFramework(_0x730309),_0x1cc58e=validateServiceTreeManifest(_0x4f7f5d),_0x1bd9a6=mergeValidationErrors(_0x1cc58e,_0xe9c787),_0x531dd6=isObjectRecord(_0x48e97b)&&typeof _0x48e97b[_0x31c3c5(0x17c)]===_0x31c3c5(0x1ad)?_0x48e97b[_0x31c3c5(0x17c)]:undefined;return{'manifest':_0x730309,'report':_0x1bd9a6,'normalizedManifest':_0x1bd9a6['ok']?normalizeServiceTreeManifest(_0x4f7f5d):undefined,'sourceHash':sha256(JSON[_0x31c3c5(0x195)](_0x730309,null,0x2)+'\x0a'),'registryIndex':_0x1892f1,'registryServiceCode':_0x531dd6};});}function mergeValidationErrors(_0x38bbc5,_0x2dcd18){const _0xdcfa9=a62_0x3f808c,_0x124fb9=_0x38bbc5[_0xdcfa9(0x183)][_0xdcfa9(0x1b6)](_0x565f23=>_0x565f23[_0xdcfa9(0x198)]===_0xdcfa9(0x18f)?{..._0x565f23,'message':'bff\x20target\x20requires\x20functionName.'}:_0x565f23),_0x2a5c74=[..._0x2dcd18,..._0x124fb9];return{'ok':_0x2a5c74[_0xdcfa9(0x186)]===0x0,'errors':_0x2a5c74,'warnings':_0x38bbc5[_0xdcfa9(0x1a2)]};}function aggregateValidationReports(_0x1ee233){const _0x5b4a5a=a62_0x3f808c,_0x135946=_0x1ee233[_0x5b4a5a(0x1a0)](_0x5858d7=>_0x5858d7[_0x5b4a5a(0x17d)]===undefined?_0x5858d7[_0x5b4a5a(0x1b7)][_0x5b4a5a(0x183)]:_0x5858d7[_0x5b4a5a(0x1b7)]['errors'][_0x5b4a5a(0x1b6)](_0x20974f=>({..._0x20974f,'path':prefixRegistryIssuePath(_0x5858d7['registryIndex'],_0x20974f['path'])}))),_0x3b8dd6=_0x1ee233[_0x5b4a5a(0x1a0)](_0x111258=>_0x111258[_0x5b4a5a(0x17d)]===undefined?_0x111258['report'][_0x5b4a5a(0x1a2)]:_0x111258[_0x5b4a5a(0x1b7)]['warnings'][_0x5b4a5a(0x1b6)](_0x53504f=>({..._0x53504f,'path':prefixRegistryIssuePath(_0x111258[_0x5b4a5a(0x17d)],_0x53504f[_0x5b4a5a(0x171)])})));return{'ok':_0x135946[_0x5b4a5a(0x186)]===0x0,'errors':_0x135946,'warnings':_0x3b8dd6};}function prefixRegistryIssuePath(_0x85edd1,_0x51bd82){const _0x25d8b6=a62_0x3f808c;if(_0x51bd82==='$')return _0x25d8b6(0x18c)+_0x85edd1+_0x25d8b6(0x1b4);if(_0x51bd82[_0x25d8b6(0x194)]('$.'))return _0x25d8b6(0x18c)+_0x85edd1+_0x25d8b6(0x1b4)+_0x51bd82['slice'](0x1);if(_0x51bd82[_0x25d8b6(0x194)]('$['))return _0x25d8b6(0x18c)+_0x85edd1+'].manifest'+_0x51bd82[_0x25d8b6(0x17b)](0x1);return _0x25d8b6(0x18c)+_0x85edd1+_0x25d8b6(0x185)+_0x51bd82;}function isServiceRegistryLike(_0x47abcc){const _0x6d2aba=a62_0x3f808c;return isObjectRecord(_0x47abcc)&&_0x47abcc['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x6d2aba(0x182)](_0x47abcc[_0x6d2aba(0x190)]);}function isObjectRecord(_0x446523){const _0x368436=a62_0x3f808c;return Boolean(_0x446523)&&typeof _0x446523===_0x368436(0x1ab)&&!Array[_0x368436(0x182)](_0x446523);}function emptyServiceRegistryInspection(_0xcbb946,_0x10bfc7,_0xb4c85c){return{'registryPath':_0xcbb946,'exists':_0xb4c85c,'status':_0x10bfc7,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x5426a1){const _0x44e389=a62_0x3f808c,_0x36f86c=_0x5426a1[_0x44e389(0x19e)],_0x5a1fce=_0x36f86c[_0x44e389(0x177)][_0x44e389(0x1b6)](_0x4110e2=>({'path':_0x4110e2[_0x44e389(0x17f)],'description':_0x4110e2[_0x44e389(0x1b3)],'risk':_0x4110e2['risk'],'targetKind':_0x4110e2[_0x44e389(0x1b9)][_0x44e389(0x191)],'targetCommand':_0x4110e2['target'][_0x44e389(0x181)]}));return{'serviceCode':_0x5426a1[_0x44e389(0x17c)],'name':_0x36f86c['service']['name'],'description':_0x36f86c[_0x44e389(0x18e)][_0x44e389(0x1b3)],'version':_0x5426a1[_0x44e389(0x1c0)],'importedAt':_0x5426a1[_0x44e389(0x173)],'source':_0x5426a1[_0x44e389(0x1c7)],'commandCount':_0x5a1fce['length'],'commands':_0x5a1fce};}function a62_0x3f95(_0x96793c,_0x4049f7){_0x96793c=_0x96793c-0x170;const _0x217552=a62_0x2175();let _0x3f9599=_0x217552[_0x96793c];return _0x3f9599;}function sha256(_0x27e85a){const _0x33547b=a62_0x3f808c;return createHash(_0x33547b(0x19f))['update'](_0x27e85a)[_0x33547b(0x1a7)](_0x33547b(0x1b0));}
1
+ const a62_0x3e6a77=a62_0xed35;(function(_0x512ff0,_0x162374){const _0x82774b=a62_0xed35,_0x1cc524=_0x512ff0();while(!![]){try{const _0x3368a4=-parseInt(_0x82774b(0x150))/0x1+parseInt(_0x82774b(0x160))/0x2*(parseInt(_0x82774b(0x139))/0x3)+-parseInt(_0x82774b(0x117))/0x4+-parseInt(_0x82774b(0x129))/0x5*(-parseInt(_0x82774b(0x13d))/0x6)+parseInt(_0x82774b(0x135))/0x7*(-parseInt(_0x82774b(0x126))/0x8)+parseInt(_0x82774b(0x146))/0x9*(parseInt(_0x82774b(0x11e))/0xa)+parseInt(_0x82774b(0x122))/0xb;if(_0x3368a4===_0x162374)break;else _0x1cc524['push'](_0x1cc524['shift']());}catch(_0x2e7877){_0x1cc524['push'](_0x1cc524['shift']());}}}(a62_0x595d,0xbcf5d));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a62_0x3e6a77(0x128);export function getServiceRegistryPath(_0x46226b={}){const _0x5093ad=a62_0x3e6a77;return resolve(_0x46226b[_0x5093ad(0x12a)]??homedir(),PRODUCT_CONFIG[_0x5093ad(0x167)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x5a8285={}){const _0x422a5a=a62_0x3e6a77,_0x316b71=getServiceRegistryPath(_0x5a8285);if(!existsSync(_0x316b71))return emptyServiceRegistry();try{const _0x3768be=readFileSync(_0x316b71,_0x422a5a(0x144));if(!_0x3768be[_0x422a5a(0x161)]())return emptyServiceRegistry();const _0x285fde=JSON[_0x422a5a(0x15c)](_0x3768be);if(_0x285fde['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x422a5a(0x12c)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x285fde[_0x422a5a(0x158)]),'Remove\x20or\x20migrate\x20'+_0x316b71+'.');if(!Array['isArray'](_0x285fde[_0x422a5a(0x151)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x285fde[_0x422a5a(0x119)],'services':_0x285fde[_0x422a5a(0x151)]};}catch(_0x98c3b3){if(_0x98c3b3 instanceof Error&&_0x98c3b3[_0x422a5a(0x13a)]==='CliError')throw _0x98c3b3;throw CliErrors[_0x422a5a(0x12c)](_0x422a5a(0x118)+_0x316b71,_0x422a5a(0x14f));}}export function writeServiceRegistry(_0x53162a,_0x3583e5={}){const _0x258d0f=a62_0x3e6a77,_0x1fd611=getServiceRegistryPath(_0x3583e5),_0x10306f=dirname(_0x1fd611);!existsSync(_0x10306f)&&mkdirSync(_0x10306f,{'recursive':!![]});const _0x1ddaf7=_0x1fd611+'.tmp';try{writeFileSync(_0x1ddaf7,JSON[_0x258d0f(0x148)](_0x53162a,null,0x2)+'\x0a',{'encoding':_0x258d0f(0x144),'mode':0x180}),renameSync(_0x1ddaf7,_0x1fd611);}catch(_0x4bfe75){try{unlinkSync(_0x1ddaf7);}catch{}if(_0x4bfe75?.['code']===_0x258d0f(0x134))throw CliErrors[_0x258d0f(0x12c)](_0x258d0f(0x164)+_0x1fd611);throw _0x4bfe75;}return _0x1fd611;}export function loadServiceManifestFromFile(_0x276999){const _0xd0ca56=a62_0x3e6a77,_0x34e636=resolve(_0x276999);if(!existsSync(_0x34e636))throw CliErrors['validation'](_0xd0ca56(0x15d)+_0x276999);let _0x2dbb62;const _0x1f8d9f=readFileSync(_0x34e636,_0xd0ca56(0x144));try{_0x2dbb62=JSON[_0xd0ca56(0x15c)](_0x1f8d9f);}catch{throw CliErrors[_0xd0ca56(0x12c)]('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x276999,'Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.');}const _0x2b5cea=sha256(_0x1f8d9f),_0x42ea49=extractLoadedServiceManifests(_0x2dbb62,_0x2b5cea),_0x1e591b=aggregateValidationReports(_0x42ea49),_0x2398b9=_0x42ea49[0x0];return{'filePath':_0x34e636,'hash':_0x2b5cea,'kind':isServiceRegistryLike(_0x2dbb62)?'registry':_0xd0ca56(0x11f),'manifest':_0x2398b9?.[_0xd0ca56(0x11f)]??_0x2dbb62,'report':_0x1e591b,'normalizedManifest':_0x42ea49['length']===0x1?_0x2398b9?.[_0xd0ca56(0x15a)]:undefined,'manifests':_0x42ea49};}export function importServiceManifest(_0x11fe43,_0x21c359={}){const _0x430231=a62_0x3e6a77,_0x32c0f0=loadServiceManifestFromFile(_0x11fe43);if(!_0x32c0f0[_0x430231(0x162)]['ok'])throw CliErrors[_0x430231(0x12c)](formatValidationFailure(_0x32c0f0[_0x430231(0x162)]),_0x430231(0x140));if(_0x32c0f0[_0x430231(0x155)][_0x430231(0x142)]===0x0)throw CliErrors['validation'](_0x430231(0x138),_0x430231(0x11c));const _0x31997b=readServiceRegistry(_0x21c359),_0x3a9cbe=(_0x21c359[_0x430231(0x123)]??(()=>new Date()))()[_0x430231(0x143)](),_0x2733bc=[];let _0x5d5c6a=0x0,_0x5e60ab=0x0;for(const _0x10325a of _0x32c0f0[_0x430231(0x155)]){if(!_0x10325a[_0x430231(0x15a)])continue;const _0x4e7905=_0x10325a[_0x430231(0x15a)]['service'][_0x430231(0x165)],_0x1d7c0e={'serviceCode':_0x4e7905,'version':_0x10325a[_0x430231(0x15a)][_0x430231(0x13e)],'importedAt':_0x3a9cbe,'source':{'type':_0x430231(0x137),'path':_0x32c0f0[_0x430231(0x14a)],'hash':_0x10325a[_0x430231(0x12e)]},'manifest':_0x10325a[_0x430231(0x11f)],'normalizedManifest':_0x10325a[_0x430231(0x15a)]},_0xe38e6f=_0x31997b['services'][_0x430231(0x125)](_0x3a59d0=>_0x3a59d0['serviceCode']===_0x4e7905);_0xe38e6f>=0x0?(_0x31997b['services'][_0xe38e6f]=_0x1d7c0e,_0x5e60ab++):(_0x31997b['services'][_0x430231(0x152)](_0x1d7c0e),_0x5d5c6a++),_0x2733bc[_0x430231(0x152)](_0x1d7c0e);}_0x31997b['services'][_0x430231(0x149)]((_0x15a58d,_0x18f601)=>_0x15a58d[_0x430231(0x15b)]['localeCompare'](_0x18f601[_0x430231(0x15b)])),_0x31997b[_0x430231(0x119)]=_0x3a9cbe;const _0x1fbbaa=writeServiceRegistry(_0x31997b,_0x21c359);return{'registryPath':_0x1fbbaa,'entry':_0x2733bc[0x0],'replaced':_0x2733bc[_0x430231(0x142)]===0x1?_0x5e60ab===0x1:_0x5e60ab>0x0,'entries':_0x2733bc,'imported':_0x5d5c6a,'updated':_0x5e60ab,'serviceCount':_0x31997b[_0x430231(0x151)]['length']};}export function exportServiceManifest(_0x38c6e2,_0x1bbe8f,_0x576a79={}){const _0x1f8f7f=a62_0x3e6a77,_0x13a2fc=getServiceRegistryPath(_0x576a79),_0x5f32e1=getLocalServiceEntry(_0x38c6e2,_0x576a79);if(!_0x5f32e1)throw CliErrors[_0x1f8f7f(0x12c)](_0x1f8f7f(0x168)+_0x38c6e2,_0x1f8f7f(0x11d));const _0x253a93=resolve(_0x1bbe8f),_0xc8706e=dirname(_0x253a93);return!existsSync(_0xc8706e)&&mkdirSync(_0xc8706e,{'recursive':!![]}),writeFileSync(_0x253a93,JSON[_0x1f8f7f(0x148)](_0x5f32e1[_0x1f8f7f(0x11f)],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x13a2fc,'filePath':_0x253a93,'entry':_0x5f32e1};}export function removeServiceManifest(_0x581458,_0x72d5f3={}){const _0x4cf1e9=a62_0x3e6a77,_0x500af7=readServiceRegistry(_0x72d5f3),_0x2483bb=_0x581458[_0x4cf1e9(0x161)](),_0x13c31d=_0x500af7[_0x4cf1e9(0x151)][_0x4cf1e9(0x125)](_0x1ed860=>_0x1ed860[_0x4cf1e9(0x15b)]===_0x2483bb);if(_0x13c31d<0x0)throw CliErrors[_0x4cf1e9(0x12c)](_0x4cf1e9(0x168)+_0x2483bb,_0x4cf1e9(0x11d));const [_0xb0e0cc]=_0x500af7[_0x4cf1e9(0x151)][_0x4cf1e9(0x154)](_0x13c31d,0x1),_0x23b64b=(_0x72d5f3[_0x4cf1e9(0x123)]??(()=>new Date()))()[_0x4cf1e9(0x143)]();_0x500af7[_0x4cf1e9(0x119)]=_0x23b64b;const _0x43264d=writeServiceRegistry(_0x500af7,_0x72d5f3);return{'registryPath':_0x43264d,'entry':_0xb0e0cc,'serviceCount':_0x500af7[_0x4cf1e9(0x151)][_0x4cf1e9(0x142)]};}export function listLocalServices(_0x109c37={}){return readServiceRegistry(_0x109c37)['services'];}export function getLocalServiceEntry(_0x3b65cc,_0x403b5f={}){const _0x17042d=a62_0x3e6a77;return readServiceRegistry(_0x403b5f)[_0x17042d(0x151)][_0x17042d(0x145)](_0x4b6756=>_0x4b6756[_0x17042d(0x15b)]===_0x3b65cc[_0x17042d(0x161)]());}export function listLocalServiceTrees(_0x2b68d6={}){const _0x74772a=a62_0x3e6a77;return readServiceRegistry(_0x2b68d6)[_0x74772a(0x151)][_0x74772a(0x153)](_0x4dbddc=>_0x4dbddc[_0x74772a(0x15a)]);}export function inspectServiceRegistry(_0x564ed2={}){const _0x249f71=a62_0x3e6a77,_0x371c80=getServiceRegistryPath(_0x564ed2);if(!existsSync(_0x371c80))return emptyServiceRegistryInspection(_0x371c80,_0x249f71(0x14b),![]);try{const _0x2d2658=readFileSync(_0x371c80,'utf8');if(!_0x2d2658[_0x249f71(0x161)]())return emptyServiceRegistryInspection(_0x371c80,_0x249f71(0x12d),!![]);const _0x3989ff=JSON[_0x249f71(0x15c)](_0x2d2658);if(_0x3989ff[_0x249f71(0x158)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x371c80,_0x249f71(0x116),!![]),'schemaVersion':_0x3989ff['schemaVersion'],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x3989ff['schemaVersion'])};if(!Array[_0x249f71(0x11b)](_0x3989ff[_0x249f71(0x151)]))return{...emptyServiceRegistryInspection(_0x371c80,_0x249f71(0x116),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3989ff['updatedAt'],'message':_0x249f71(0x141)};const _0x55dfca=_0x3989ff[_0x249f71(0x151)][_0x249f71(0x153)](summarizeLocalServiceEntry);return{'registryPath':_0x371c80,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3989ff[_0x249f71(0x119)],'serviceCount':_0x55dfca[_0x249f71(0x142)],'commandCount':_0x55dfca['reduce']((_0x1a0daf,_0x3f9760)=>_0x1a0daf+_0x3f9760['commandCount'],0x0),'services':_0x55dfca};}catch(_0x1c885a){return{...emptyServiceRegistryInspection(_0x371c80,'invalid',!![]),'message':_0x1c885a instanceof Error?_0x1c885a[_0x249f71(0x15e)]:String(_0x1c885a)};}}export function formatValidationFailure(_0x47620a){const _0x27dce3=a62_0x3e6a77,_0x143ed2=_0x47620a[_0x27dce3(0x157)][_0x27dce3(0x153)](_0xebffdf=>_0xebffdf[_0x27dce3(0x12b)]+':\x20'+_0xebffdf[_0x27dce3(0x15e)]);return _0x27dce3(0x136)+_0x143ed2[_0x27dce3(0x166)]('\x0a');}function extractLoadedServiceManifests(_0x171a36,_0x1a2542){const _0x11f361=a62_0x3e6a77;if(!isServiceRegistryLike(_0x171a36)){const _0x2ef66a=_0x171a36,{manifest:_0x20b4bd,errors:_0x4a7c47}=adaptServiceTreeManifestForLegacyFramework(_0x2ef66a),_0x1ab178=validateServiceTreeManifest(_0x20b4bd),_0x3d7b17=mergeValidationErrors(_0x1ab178,_0x4a7c47);return[{'manifest':_0x2ef66a,'report':_0x3d7b17,'normalizedManifest':_0x3d7b17['ok']?normalizeServiceTreeManifest(_0x20b4bd):undefined,'sourceHash':_0x1a2542}];}return _0x171a36['services'][_0x11f361(0x153)]((_0x157da6,_0x513ddd)=>{const _0x54fcfc=_0x11f361,_0x5613ac=isObjectRecord(_0x157da6)?_0x157da6[_0x54fcfc(0x11f)]:undefined,{manifest:_0x384f3d,errors:_0x14afa0}=adaptServiceTreeManifestForLegacyFramework(_0x5613ac),_0x505fc4=validateServiceTreeManifest(_0x384f3d),_0x744371=mergeValidationErrors(_0x505fc4,_0x14afa0),_0x5acef7=isObjectRecord(_0x157da6)&&typeof _0x157da6[_0x54fcfc(0x15b)]===_0x54fcfc(0x14d)?_0x157da6[_0x54fcfc(0x15b)]:undefined;return{'manifest':_0x5613ac,'report':_0x744371,'normalizedManifest':_0x744371['ok']?normalizeServiceTreeManifest(_0x384f3d):undefined,'sourceHash':sha256(JSON['stringify'](_0x5613ac,null,0x2)+'\x0a'),'registryIndex':_0x513ddd,'registryServiceCode':_0x5acef7};});}function a62_0xed35(_0x33959c,_0x498aed){_0x33959c=_0x33959c-0x113;const _0x595dd6=a62_0x595d();let _0xed3577=_0x595dd6[_0x33959c];return _0xed3577;}function mergeValidationErrors(_0x1bee32,_0x2b1776){const _0x4d6ac2=a62_0x3e6a77,_0x228a20=_0x1bee32[_0x4d6ac2(0x157)][_0x4d6ac2(0x153)](_0x3d37c6=>_0x3d37c6['message']===_0x4d6ac2(0x159)?{..._0x3d37c6,'message':_0x4d6ac2(0x11a)}:_0x3d37c6),_0x537163=[..._0x2b1776,..._0x228a20];return{'ok':_0x537163[_0x4d6ac2(0x142)]===0x0,'errors':_0x537163,'warnings':_0x1bee32[_0x4d6ac2(0x156)]};}function aggregateValidationReports(_0x43334d){const _0xdb7c6a=a62_0x3e6a77,_0x2f5e4a=_0x43334d[_0xdb7c6a(0x13f)](_0x2d882f=>_0x2d882f[_0xdb7c6a(0x120)]===undefined?_0x2d882f[_0xdb7c6a(0x162)][_0xdb7c6a(0x157)]:_0x2d882f[_0xdb7c6a(0x162)]['errors'][_0xdb7c6a(0x153)](_0x50a70=>({..._0x50a70,'path':prefixRegistryIssuePath(_0x2d882f[_0xdb7c6a(0x120)],_0x50a70[_0xdb7c6a(0x12b)])}))),_0x268a23=_0x43334d[_0xdb7c6a(0x13f)](_0x173079=>_0x173079[_0xdb7c6a(0x120)]===undefined?_0x173079[_0xdb7c6a(0x162)][_0xdb7c6a(0x156)]:_0x173079[_0xdb7c6a(0x162)][_0xdb7c6a(0x156)][_0xdb7c6a(0x153)](_0x173c24=>({..._0x173c24,'path':prefixRegistryIssuePath(_0x173079['registryIndex'],_0x173c24[_0xdb7c6a(0x12b)])})));return{'ok':_0x2f5e4a[_0xdb7c6a(0x142)]===0x0,'errors':_0x2f5e4a,'warnings':_0x268a23};}function a62_0x595d(){const _0x3b8ff3=['Service\x20registry\x20has\x20no\x20services\x20to\x20import.','4633998ZFCXkW','name','command','].manifest.','354PhwcxL','version','flatMap','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','services\x20must\x20be\x20an\x20array','length','toISOString','utf8','find','531MqTlmU','$.services[','stringify','sort','filePath','missing','digest','string','].manifest','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','1355181gxLfxZ','services','push','map','splice','manifests','warnings','errors','schemaVersion','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','normalizedManifest','serviceCode','parse','Service\x20manifest\x20file\x20not\x20found:\x20','message','object','2bgHCph','trim','report','importedAt','Cannot\x20write\x20service\x20registry:\x20','code','join','homeDirName','Local\x20service\x20not\x20found:\x20','startsWith','description','update','invalid','3197220xUQDSm','Invalid\x20service\x20registry\x20JSON:\x20','updatedAt','bff\x20target\x20requires\x20functionName.','isArray','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','148910TVwsaX','manifest','registryIndex','hex','1082257IVNfpF','now','kind','findIndex','48BHLvvB','sha256','service.json','88185JZeqnb','homeDir','path','validation','empty','sourceHash','target','source','risk','service','slice','ENOENT','739361LamEZI','Service\x20manifest\x20validation\x20failed:\x0a','file'];a62_0x595d=function(){return _0x3b8ff3;};return a62_0x595d();}function prefixRegistryIssuePath(_0x2464ce,_0x2fc59e){const _0x194a64=a62_0x3e6a77;if(_0x2fc59e==='$')return'$.services['+_0x2464ce+_0x194a64(0x14e);if(_0x2fc59e['startsWith']('$.'))return _0x194a64(0x147)+_0x2464ce+_0x194a64(0x14e)+_0x2fc59e[_0x194a64(0x133)](0x1);if(_0x2fc59e[_0x194a64(0x113)]('$['))return _0x194a64(0x147)+_0x2464ce+_0x194a64(0x14e)+_0x2fc59e[_0x194a64(0x133)](0x1);return _0x194a64(0x147)+_0x2464ce+_0x194a64(0x13c)+_0x2fc59e;}function isServiceRegistryLike(_0x10717b){const _0x234d18=a62_0x3e6a77;return isObjectRecord(_0x10717b)&&_0x10717b[_0x234d18(0x158)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x234d18(0x11b)](_0x10717b[_0x234d18(0x151)]);}function isObjectRecord(_0x9943f5){const _0x34375d=a62_0x3e6a77;return Boolean(_0x9943f5)&&typeof _0x9943f5===_0x34375d(0x15f)&&!Array[_0x34375d(0x11b)](_0x9943f5);}function emptyServiceRegistryInspection(_0x47bd9c,_0x274164,_0x11d088){return{'registryPath':_0x47bd9c,'exists':_0x11d088,'status':_0x274164,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x2f73ab){const _0x1d1515=a62_0x3e6a77,_0x24671b=_0x2f73ab['normalizedManifest'],_0x2637b9=_0x24671b['commands'][_0x1d1515(0x153)](_0x25c990=>({'path':_0x25c990['cliPath'],'description':_0x25c990[_0x1d1515(0x114)],'risk':_0x25c990[_0x1d1515(0x131)],'targetKind':_0x25c990['target'][_0x1d1515(0x124)],'targetCommand':_0x25c990[_0x1d1515(0x12f)][_0x1d1515(0x13b)]}));return{'serviceCode':_0x2f73ab['serviceCode'],'name':_0x24671b['service'][_0x1d1515(0x13a)],'description':_0x24671b[_0x1d1515(0x132)][_0x1d1515(0x114)],'version':_0x2f73ab[_0x1d1515(0x13e)],'importedAt':_0x2f73ab[_0x1d1515(0x163)],'source':_0x2f73ab[_0x1d1515(0x130)],'commandCount':_0x2637b9[_0x1d1515(0x142)],'commands':_0x2637b9};}function sha256(_0x12068d){const _0x41d9e4=a62_0x3e6a77;return createHash(_0x41d9e4(0x127))[_0x41d9e4(0x115)](_0x12068d)[_0x41d9e4(0x14c)](_0x41d9e4(0x121));}
@@ -1 +1 @@
1
- const a63_0x159d38=a63_0x9fc1;function a63_0x9fc1(_0x3b1034,_0x5d6c35){_0x3b1034=_0x3b1034-0xf6;const _0x5df7d3=a63_0x5df7();let _0x9fc1c9=_0x5df7d3[_0x3b1034];return _0x9fc1c9;}(function(_0x578a11,_0x2198b3){const _0x4705fb=a63_0x9fc1,_0x51acff=_0x578a11();while(!![]){try{const _0x273118=-parseInt(_0x4705fb(0xf9))/0x1*(-parseInt(_0x4705fb(0xf8))/0x2)+parseInt(_0x4705fb(0xfe))/0x3*(-parseInt(_0x4705fb(0x112))/0x4)+parseInt(_0x4705fb(0xfb))/0x5*(-parseInt(_0x4705fb(0x10c))/0x6)+parseInt(_0x4705fb(0x10f))/0x7*(parseInt(_0x4705fb(0x109))/0x8)+parseInt(_0x4705fb(0x108))/0x9*(-parseInt(_0x4705fb(0x103))/0xa)+parseInt(_0x4705fb(0x117))/0xb+-parseInt(_0x4705fb(0x100))/0xc;if(_0x273118===_0x2198b3)break;else _0x51acff['push'](_0x51acff['shift']());}catch(_0x398e09){_0x51acff['push'](_0x51acff['shift']());}}}(a63_0x5df7,0x3e4ec));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a63_0x159d38(0x105),'command':a63_0x159d38(0x10e),'description':'创建本地自包含的运行态\x20Skill\x20草稿','risk':a63_0x159d38(0x113),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x2b00e2){const _0x2e7a4e=a63_0x159d38,_0x18307f=buildSkillCreatePlan(_0x2b00e2[_0x2e7a4e(0x102)](_0x2e7a4e(0x115)),_0x2b00e2[_0x2e7a4e(0x102)](_0x2e7a4e(0x104)),_0x2b00e2['str']('target'));return{'method':_0x2e7a4e(0xfc),'url':_0x18307f['skillDir'],'body':{'skillName':_0x18307f['rendered'][_0x2e7a4e(0x10a)],'type':_0x18307f['rendered'][_0x2e7a4e(0x104)],'selfContained':!![],'files':_0x18307f[_0x2e7a4e(0x106)][_0x2e7a4e(0xf7)][_0x2e7a4e(0x110)](_0x5ca2c2=>_0x5ca2c2[_0x2e7a4e(0xfd)])},'description':_0x2e7a4e(0xff)};},async 'execute'(_0x525d45){const _0x14a9eb=a63_0x159d38,_0x355d36=buildSkillCreatePlan(_0x525d45[_0x14a9eb(0x102)](_0x14a9eb(0x115)),_0x525d45[_0x14a9eb(0x102)](_0x14a9eb(0x104)),_0x525d45['str'](_0x14a9eb(0xfa)));return writeSkillDraft(_0x355d36,_0x525d45[_0x14a9eb(0x119)](_0x14a9eb(0x111))),{'ok':!![],'data':{'skillName':_0x355d36[_0x14a9eb(0x106)]['skillName'],'type':_0x355d36[_0x14a9eb(0x106)]['type'],'dir':_0x355d36['skillDir'],'files':_0x355d36[_0x14a9eb(0x106)][_0x14a9eb(0xf7)]['map'](_0x5a2404=>_0x5a2404[_0x14a9eb(0xfd)])},'message':'Created\x20local\x20Skill\x20draft\x20'+_0x355d36[_0x14a9eb(0x106)][_0x14a9eb(0x10a)]};}};function buildSkillCreatePlan(_0x44cbb9,_0xa99d45,_0x32476f){const _0x321248=a63_0x159d38,_0x59b552=_0xa99d45[_0x321248(0xf6)](),_0x5dab09=renderSkillTemplate({'skillName':_0x44cbb9,'type':_0x59b552});!_0x59b552&&writeCliSideChannelLine('Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.');const _0x5b9d61=resolve(normalizeSkillTarget(_0x32476f));return{'rendered':_0x5dab09,'targetRoot':_0x5b9d61,'skillDir':resolve(_0x5b9d61,_0x5dab09[_0x321248(0x10a)])};}function a63_0x5df7(){const _0x12dd5c=['3363262quMyOW','map','force','316ceXbWU','read','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','name','isSymbolicLink','4457068DbShwb','Refusing\x20to\x20overwrite\x20symlink:\x20','bool','skillDir','trim','files','54EbXJZx','3613SEAwAI','target','10XyaikX','WRITE','path','522yTUfkx','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','23016gSFAcY','Skill\x20directory\x20already\x20exists:\x20','str','2525710osDEyH','type','skill','rendered','validation','9oaZcZZ','8MOmVOD','skillName','isDirectory','1379274zWwJrl','content','create'];a63_0x5df7=function(){return _0x12dd5c;};return a63_0x5df7();}function normalizeSkillTarget(_0xa58c0d){const _0x1f5705=a63_0x159d38;return(_0xa58c0d||DEFAULT_SKILL_TARGET)[_0x1f5705(0xf6)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x4e418c,_0x391087){const _0x4d767b=a63_0x159d38;if(existsSync(_0x4e418c[_0x4d767b(0x11a)])){const _0xf240c7=lstatSync(_0x4e418c[_0x4d767b(0x11a)]);if(!_0xf240c7[_0x4d767b(0x10b)]()||_0xf240c7[_0x4d767b(0x116)]())throw CliErrors['validation'](_0x4d767b(0x114)+_0x4e418c[_0x4d767b(0x11a)]);if(!_0x391087)throw CliErrors['validation'](_0x4d767b(0x101)+_0x4e418c[_0x4d767b(0x11a)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x240038 of _0x4e418c[_0x4d767b(0x106)][_0x4d767b(0xf7)]){const _0x23f0fe=resolve(_0x4e418c['skillDir'],_0x240038[_0x4d767b(0xfd)]),_0x15ca63=dirname(_0x23f0fe);mkdirSync(_0x15ca63,{'recursive':!![]});if(existsSync(_0x23f0fe)&&lstatSync(_0x23f0fe)[_0x4d767b(0x116)]())throw CliErrors[_0x4d767b(0x107)](_0x4d767b(0x118)+_0x23f0fe);writeFileSync(_0x23f0fe,_0x240038[_0x4d767b(0x10d)],'utf8');}}
1
+ const a63_0x11a85d=a63_0x5390;(function(_0x49a8e5,_0x3dd0f0){const _0x48b85f=a63_0x5390,_0x543f67=_0x49a8e5();while(!![]){try{const _0x462116=parseInt(_0x48b85f(0xf9))/0x1+parseInt(_0x48b85f(0xeb))/0x2+-parseInt(_0x48b85f(0xf1))/0x3+parseInt(_0x48b85f(0xe9))/0x4*(-parseInt(_0x48b85f(0xef))/0x5)+-parseInt(_0x48b85f(0xe3))/0x6*(parseInt(_0x48b85f(0xf0))/0x7)+parseInt(_0x48b85f(0xe7))/0x8+-parseInt(_0x48b85f(0x101))/0x9*(-parseInt(_0x48b85f(0xf4))/0xa);if(_0x462116===_0x3dd0f0)break;else _0x543f67['push'](_0x543f67['shift']());}catch(_0x43f821){_0x543f67['push'](_0x543f67['shift']());}}}(a63_0x7ee7,0x4c61f));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';function a63_0x7ee7(){const _0x360937=['580346wVdril','Refusing\x20to\x20overwrite\x20symlink:\x20','force','files','target','skill','path','Skill\x20directory\x20already\x20exists:\x20','135MoTmdd','trim','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','Created\x20local\x20Skill\x20draft\x20','WRITE','276rVutSf','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','isSymbolicLink','create','2102360YrbSGK','skillDir','4NDShTW','type','268708iaqEeh','read','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','str','1276045VlpNRh','56441sqEFUC','1254030LBWfPu','map','bool','252990fMSqyl','rendered','skillName','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','validation'];a63_0x7ee7=function(){return _0x360937;};return a63_0x7ee7();}function a63_0x5390(_0x3dc283,_0x100ed4){_0x3dc283=_0x3dc283-0xe3;const _0x7ee759=a63_0x7ee7();let _0x5390af=_0x7ee759[_0x3dc283];return _0x5390af;}import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a63_0x11a85d(0xfe),'command':a63_0x11a85d(0xe6),'description':'创建本地自包含的运行态\x20Skill\x20草稿','risk':a63_0x11a85d(0xec),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x451fa6){const _0x5700b2=a63_0x11a85d,_0x57d11f=buildSkillCreatePlan(_0x451fa6[_0x5700b2(0xee)]('name'),_0x451fa6[_0x5700b2(0xee)](_0x5700b2(0xea)),_0x451fa6[_0x5700b2(0xee)]('target'));return{'method':_0x5700b2(0x105),'url':_0x57d11f[_0x5700b2(0xe8)],'body':{'skillName':_0x57d11f[_0x5700b2(0xf5)]['skillName'],'type':_0x57d11f['rendered'][_0x5700b2(0xea)],'selfContained':!![],'files':_0x57d11f[_0x5700b2(0xf5)][_0x5700b2(0xfc)]['map'](_0x226ad7=>_0x226ad7[_0x5700b2(0xff)])},'description':_0x5700b2(0xe4)};},async 'execute'(_0x251277){const _0x5142a7=a63_0x11a85d,_0x16c6fc=buildSkillCreatePlan(_0x251277[_0x5142a7(0xee)]('name'),_0x251277[_0x5142a7(0xee)]('type'),_0x251277[_0x5142a7(0xee)](_0x5142a7(0xfd)));return writeSkillDraft(_0x16c6fc,_0x251277[_0x5142a7(0xf3)](_0x5142a7(0xfb))),{'ok':!![],'data':{'skillName':_0x16c6fc[_0x5142a7(0xf5)][_0x5142a7(0xf6)],'type':_0x16c6fc[_0x5142a7(0xf5)][_0x5142a7(0xea)],'dir':_0x16c6fc['skillDir'],'files':_0x16c6fc[_0x5142a7(0xf5)][_0x5142a7(0xfc)][_0x5142a7(0xf2)](_0x2c303a=>_0x2c303a[_0x5142a7(0xff)])},'message':_0x5142a7(0x104)+_0x16c6fc['rendered'][_0x5142a7(0xf6)]};}};function buildSkillCreatePlan(_0x35d487,_0xb43370,_0x5428c5){const _0x4c994d=a63_0x11a85d,_0x18f830=_0xb43370['trim'](),_0x246f98=renderSkillTemplate({'skillName':_0x35d487,'type':_0x18f830});!_0x18f830&&writeCliSideChannelLine(_0x4c994d(0xf7));const _0x3f7fde=resolve(normalizeSkillTarget(_0x5428c5));return{'rendered':_0x246f98,'targetRoot':_0x3f7fde,'skillDir':resolve(_0x3f7fde,_0x246f98[_0x4c994d(0xf6)])};}function normalizeSkillTarget(_0x12926a){const _0x5ecff5=a63_0x11a85d;return(_0x12926a||DEFAULT_SKILL_TARGET)[_0x5ecff5(0x102)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x3d173a,_0x3c0f06){const _0x49d210=a63_0x11a85d;if(existsSync(_0x3d173a[_0x49d210(0xe8)])){const _0x50225e=lstatSync(_0x3d173a['skillDir']);if(!_0x50225e['isDirectory']()||_0x50225e[_0x49d210(0xe5)]())throw CliErrors[_0x49d210(0xf8)](_0x49d210(0x103)+_0x3d173a[_0x49d210(0xe8)]);if(!_0x3c0f06)throw CliErrors[_0x49d210(0xf8)](_0x49d210(0x100)+_0x3d173a[_0x49d210(0xe8)],_0x49d210(0xed));}for(const _0x45c3a5 of _0x3d173a[_0x49d210(0xf5)][_0x49d210(0xfc)]){const _0x34d2ad=resolve(_0x3d173a[_0x49d210(0xe8)],_0x45c3a5['path']),_0x511ecf=dirname(_0x34d2ad);mkdirSync(_0x511ecf,{'recursive':!![]});if(existsSync(_0x34d2ad)&&lstatSync(_0x34d2ad)[_0x49d210(0xe5)]())throw CliErrors[_0x49d210(0xf8)](_0x49d210(0xfa)+_0x34d2ad);writeFileSync(_0x34d2ad,_0x45c3a5['content'],'utf8');}}
@@ -1 +1 @@
1
- const a64_0x3a2ecd=a64_0x4b97;(function(_0x2b420f,_0x25e7fd){const _0x5bae48=a64_0x4b97,_0x41ef34=_0x2b420f();while(!![]){try{const _0x561b72=-parseInt(_0x5bae48(0x1c7))/0x1+parseInt(_0x5bae48(0x1d5))/0x2*(-parseInt(_0x5bae48(0x1bf))/0x3)+-parseInt(_0x5bae48(0x1b7))/0x4*(-parseInt(_0x5bae48(0x1b0))/0x5)+parseInt(_0x5bae48(0x1d2))/0x6*(parseInt(_0x5bae48(0x1cd))/0x7)+-parseInt(_0x5bae48(0x1bb))/0x8+parseInt(_0x5bae48(0x1cb))/0x9+parseInt(_0x5bae48(0x1b9))/0xa*(-parseInt(_0x5bae48(0x1c5))/0xb);if(_0x561b72===_0x25e7fd)break;else _0x41ef34['push'](_0x41ef34['shift']());}catch(_0x52b8d1){_0x41ef34['push'](_0x41ef34['shift']());}}}(a64_0x1c53,0xa44e8));function a64_0x1c53(){const _0x519535=['Created','found','action','6AVcEXv','为指定版本的\x20Skill\x20创建或替换\x20Mermaid\x20图','--skill-code,\x20--version,\x20and\x20--scope\x20personal|company\x20are\x20required.','diagram-show','diagram-validate','str','11EdBkCl','source-fingerprint','260532frBJXI','read','expectedDiagramRevision','scope','10677564rtnaAu','skillCode','1342425hHLsXP','Skill\x20diagram\x20validation\x20passed\x20for\x20','trim','--source-fingerprint\x20must\x20be\x20lowercase\x20sha256:<64\x20hex\x20characters>.','company','30zYSMGy','将为指定\x20Skill\x20的精确版本创建或替换\x20Mermaid\x20流程图;服务端版本已变化时会拒绝覆盖。确认界面不会展示图表正文。','isInteger','633736kkcuUc','expected-diagram-revision','Found\x20Skill\x20diagram\x20for\x20','version','Validate\x20a\x20Mermaid\x20diagram\x20replacement\x20for\x20one\x20exact\x20Skill\x20version','num','89030eFUNZJ','\x20is\x20unchanged.','Updated','diagram-file','appCode','skill-code','skill','96SGefqY','validation','8232820ZOtioB',';\x20next\x20write\x20expects\x20revision\x20','1456520NanIft'];a64_0x1c53=function(){return _0x519535;};return a64_0x1c53();}import{getRuntimeSkillVersionDiagram,putRuntimeSkillVersionDiagram,validateRuntimeSkillVersionDiagram}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{readRequiredSkillDiagram}from'../diagram.js';import{DIAGRAM_FILE_FLAG,DIAGRAM_SCOPE_FLAG,DIAGRAM_SKILL_CODE_FLAG,DIAGRAM_VERSION_FLAG,EXPECTED_DIAGRAM_REVISION_FLAG,SOURCE_FINGERPRINT_FLAG}from'../flags.js';const TARGET_FLAGS=[DIAGRAM_SKILL_CODE_FLAG,DIAGRAM_VERSION_FLAG,DIAGRAM_SCOPE_FLAG],WRITE_FLAGS=[...TARGET_FLAGS,SOURCE_FINGERPRINT_FLAG,EXPECTED_DIAGRAM_REVISION_FLAG,DIAGRAM_FILE_FLAG];function readDiagramTarget(_0x218bb6){const _0x4c7d7c=a64_0x4b97,_0x19eeb6=_0x218bb6['str'](_0x4c7d7c(0x1b5))['trim'](),_0x2f2bee=_0x218bb6['str'](_0x4c7d7c(0x1ad))['trim'](),_0x4735f3=_0x218bb6[_0x4c7d7c(0x1c4)](_0x4c7d7c(0x1ca));if(!_0x19eeb6||!_0x2f2bee||_0x4735f3!=='personal'&&_0x4735f3!==_0x4c7d7c(0x1d1))throw CliErrors['validation'](_0x4c7d7c(0x1c1));return{'skillCode':_0x19eeb6,'version':_0x2f2bee,'scope':_0x4735f3};}async function readDiagramWriteInput(_0x67e5ba){const _0x500062=a64_0x4b97,_0x2fe8f0=_0x67e5ba[_0x500062(0x1af)](_0x500062(0x1d6)),_0x805eaa=_0x67e5ba[_0x500062(0x1c4)](_0x500062(0x1c6))[_0x500062(0x1cf)]();if(!Number[_0x500062(0x1d4)](_0x2fe8f0)||_0x2fe8f0<0x0)throw CliErrors[_0x500062(0x1b8)]('--expected-diagram-revision\x20must\x20be\x20a\x20non-negative\x20integer.');if(!/^sha256:[0-9a-f]{64}$/['test'](_0x805eaa))throw CliErrors[_0x500062(0x1b8)](_0x500062(0x1d0));return{'expectedDiagramRevision':_0x2fe8f0,'sourceFingerprint':_0x805eaa,'diagram':await readRequiredSkillDiagram(_0x67e5ba[_0x500062(0x1c4)](_0x500062(0x1b3)))};}export const diagramValidateCommand={'service':'skill','command':a64_0x3a2ecd(0x1c3),'description':a64_0x3a2ecd(0x1ae),'risk':'read','flags':WRITE_FLAGS,async 'execute'(_0x4bb2e7){const _0x8ed8c3=a64_0x3a2ecd,_0x3e2f0b=readDiagramTarget(_0x4bb2e7),_0x4b2b90=await validateRuntimeSkillVersionDiagram(_0x4bb2e7[_0x8ed8c3(0x1b4)],_0x3e2f0b['skillCode'],_0x3e2f0b['version'],_0x3e2f0b['scope'],await readDiagramWriteInput(_0x4bb2e7));return{'ok':!![],'data':_0x4b2b90,'message':_0x8ed8c3(0x1ce)+_0x3e2f0b[_0x8ed8c3(0x1cc)]+'@'+_0x3e2f0b[_0x8ed8c3(0x1ad)]+'.'};}};export const diagramPushCommand={'service':'skill','command':'diagram-push','description':a64_0x3a2ecd(0x1c0),'risk':'write','confirmationDescription':a64_0x3a2ecd(0x1d3),'flags':WRITE_FLAGS,async 'execute'(_0xec5a36){const _0x3c9f29=a64_0x3a2ecd,_0x121b9e=readDiagramTarget(_0xec5a36),_0x4473f4=await putRuntimeSkillVersionDiagram(_0xec5a36[_0x3c9f29(0x1b4)],_0x121b9e[_0x3c9f29(0x1cc)],_0x121b9e[_0x3c9f29(0x1ad)],_0x121b9e[_0x3c9f29(0x1ca)],await readDiagramWriteInput(_0xec5a36));return{'ok':!![],'data':_0x4473f4,'message':_0x4473f4['action']==='unchanged'?'Skill\x20diagram\x20for\x20'+_0x121b9e[_0x3c9f29(0x1cc)]+'@'+_0x121b9e[_0x3c9f29(0x1ad)]+_0x3c9f29(0x1b1):(_0x4473f4[_0x3c9f29(0x1be)]==='created'?_0x3c9f29(0x1bc):_0x3c9f29(0x1b2))+'\x20Skill\x20diagram\x20for\x20'+_0x121b9e[_0x3c9f29(0x1cc)]+'@'+_0x121b9e['version']+'.'};}};function a64_0x4b97(_0x39bfc9,_0x314498){_0x39bfc9=_0x39bfc9-0x1ad;const _0x1c536b=a64_0x1c53();let _0x4b97f0=_0x1c536b[_0x39bfc9];return _0x4b97f0;}export const diagramShowCommand={'service':a64_0x3a2ecd(0x1b6),'command':a64_0x3a2ecd(0x1c2),'description':'Show\x20the\x20current\x20Mermaid\x20diagram\x20for\x20one\x20exact\x20Skill\x20version','risk':a64_0x3a2ecd(0x1c8),'flags':TARGET_FLAGS,async 'execute'(_0x31d170){const _0x773973=a64_0x3a2ecd,_0x3fe4c8=readDiagramTarget(_0x31d170),_0x131001=await getRuntimeSkillVersionDiagram(_0x31d170[_0x773973(0x1b4)],_0x3fe4c8['skillCode'],_0x3fe4c8[_0x773973(0x1ad)],_0x3fe4c8[_0x773973(0x1ca)]);return{'ok':!![],'data':_0x131001,'message':_0x131001[_0x773973(0x1bd)]?_0x773973(0x1d7)+_0x3fe4c8['skillCode']+'@'+_0x3fe4c8[_0x773973(0x1ad)]+_0x773973(0x1ba)+_0x131001[_0x773973(0x1c9)]+'.':'No\x20Skill\x20diagram\x20is\x20stored\x20for\x20'+_0x3fe4c8[_0x773973(0x1cc)]+'@'+_0x3fe4c8['version']+';\x20first\x20write\x20expects\x20revision\x20'+_0x131001[_0x773973(0x1c9)]+'.'};}};
1
+ const a64_0x151de9=a64_0x3c1a;(function(_0x230f6e,_0x3cb876){const _0x4b4c01=a64_0x3c1a,_0x5fadf=_0x230f6e();while(!![]){try{const _0x31e7be=parseInt(_0x4b4c01(0xb0))/0x1+-parseInt(_0x4b4c01(0xb9))/0x2*(-parseInt(_0x4b4c01(0xa6))/0x3)+parseInt(_0x4b4c01(0xad))/0x4+-parseInt(_0x4b4c01(0x99))/0x5+parseInt(_0x4b4c01(0x9a))/0x6*(-parseInt(_0x4b4c01(0xaf))/0x7)+-parseInt(_0x4b4c01(0xa8))/0x8+parseInt(_0x4b4c01(0x96))/0x9*(-parseInt(_0x4b4c01(0xc3))/0xa);if(_0x31e7be===_0x3cb876)break;else _0x5fadf['push'](_0x5fadf['shift']());}catch(_0x4ddddf){_0x5fadf['push'](_0x5fadf['shift']());}}}(a64_0x1a2d,0x90e6c));import{getRuntimeSkillVersionDiagram,putRuntimeSkillVersionDiagram,validateRuntimeSkillVersionDiagram}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{readRequiredSkillDiagram}from'../diagram.js';import{DIAGRAM_FILE_FLAG,DIAGRAM_SCOPE_FLAG,DIAGRAM_SKILL_CODE_FLAG,DIAGRAM_VERSION_FLAG,EXPECTED_DIAGRAM_REVISION_FLAG,SOURCE_FINGERPRINT_FLAG}from'../flags.js';const TARGET_FLAGS=[DIAGRAM_SKILL_CODE_FLAG,DIAGRAM_VERSION_FLAG,DIAGRAM_SCOPE_FLAG],WRITE_FLAGS=[...TARGET_FLAGS,SOURCE_FINGERPRINT_FLAG,EXPECTED_DIAGRAM_REVISION_FLAG,DIAGRAM_FILE_FLAG];function a64_0x1a2d(){const _0x51a494=['Created','skill','expected-diagram-revision','1705110wwkMiu','test','4823344tthBRs','Found\x20Skill\x20diagram\x20for\x20','scope','Updated','unchanged','2115072uIHusZ','expectedDiagramRevision','1008GUtdPK','1100449pOJXxg','diagram-file','diagram-push','found','appCode','Show\x20the\x20current\x20Mermaid\x20diagram\x20for\x20one\x20exact\x20Skill\x20version','No\x20Skill\x20diagram\x20is\x20stored\x20for\x20','isInteger','--source-fingerprint\x20must\x20be\x20lowercase\x20sha256:<64\x20hex\x20characters>.','2BzIBJX','personal','Skill\x20diagram\x20for\x20','\x20is\x20unchanged.','num','--skill-code,\x20--version,\x20and\x20--scope\x20personal|company\x20are\x20required.','Validate\x20a\x20Mermaid\x20diagram\x20replacement\x20for\x20one\x20exact\x20Skill\x20version','trim','action','--expected-diagram-revision\x20must\x20be\x20a\x20non-negative\x20integer.','13430yXKujz','skillCode','diagram-show','1683SaNpEQ','company','str','2999820CtRVdj','6252fIyFWT','validation','source-fingerprint','created','diagram-validate','Skill\x20diagram\x20validation\x20passed\x20for\x20','\x20Skill\x20diagram\x20for\x20','version',';\x20first\x20write\x20expects\x20revision\x20'];a64_0x1a2d=function(){return _0x51a494;};return a64_0x1a2d();}function readDiagramTarget(_0x3a6aaf){const _0x1030f4=a64_0x3c1a,_0x273dbc=_0x3a6aaf['str']('skill-code')[_0x1030f4(0xc0)](),_0x234f80=_0x3a6aaf[_0x1030f4(0x98)](_0x1030f4(0xa1))[_0x1030f4(0xc0)](),_0x606050=_0x3a6aaf['str'](_0x1030f4(0xaa));if(!_0x273dbc||!_0x234f80||_0x606050!==_0x1030f4(0xba)&&_0x606050!==_0x1030f4(0x97))throw CliErrors[_0x1030f4(0x9b)](_0x1030f4(0xbe));return{'skillCode':_0x273dbc,'version':_0x234f80,'scope':_0x606050};}function a64_0x3c1a(_0x1464bb,_0x1ac903){_0x1464bb=_0x1464bb-0x96;const _0x1a2da3=a64_0x1a2d();let _0x3c1ae9=_0x1a2da3[_0x1464bb];return _0x3c1ae9;}async function readDiagramWriteInput(_0x499254){const _0x480c1b=a64_0x3c1a,_0x5c26b5=_0x499254[_0x480c1b(0xbd)](_0x480c1b(0xa5)),_0x49123f=_0x499254['str'](_0x480c1b(0x9c))[_0x480c1b(0xc0)]();if(!Number[_0x480c1b(0xb7)](_0x5c26b5)||_0x5c26b5<0x0)throw CliErrors[_0x480c1b(0x9b)](_0x480c1b(0xc2));if(!/^sha256:[0-9a-f]{64}$/[_0x480c1b(0xa7)](_0x49123f))throw CliErrors['validation'](_0x480c1b(0xb8));return{'expectedDiagramRevision':_0x5c26b5,'sourceFingerprint':_0x49123f,'diagram':await readRequiredSkillDiagram(_0x499254[_0x480c1b(0x98)](_0x480c1b(0xb1)))};}export const diagramValidateCommand={'service':a64_0x151de9(0xa4),'command':a64_0x151de9(0x9e),'description':a64_0x151de9(0xbf),'risk':'read','flags':WRITE_FLAGS,async 'execute'(_0x3ed1b0){const _0x3de3cf=a64_0x151de9,_0x7010f8=readDiagramTarget(_0x3ed1b0),_0x4f45bf=await validateRuntimeSkillVersionDiagram(_0x3ed1b0[_0x3de3cf(0xb4)],_0x7010f8[_0x3de3cf(0xc4)],_0x7010f8[_0x3de3cf(0xa1)],_0x7010f8[_0x3de3cf(0xaa)],await readDiagramWriteInput(_0x3ed1b0));return{'ok':!![],'data':_0x4f45bf,'message':_0x3de3cf(0x9f)+_0x7010f8[_0x3de3cf(0xc4)]+'@'+_0x7010f8[_0x3de3cf(0xa1)]+'.'};}};export const diagramPushCommand={'service':a64_0x151de9(0xa4),'command':a64_0x151de9(0xb2),'description':'为指定版本的\x20Skill\x20创建或替换\x20Mermaid\x20图','risk':'write','confirmationDescription':'将为指定\x20Skill\x20的精确版本创建或替换\x20Mermaid\x20流程图;服务端版本已变化时会拒绝覆盖。确认界面不会展示图表正文。','flags':WRITE_FLAGS,async 'execute'(_0xa6f4db){const _0x4d5e93=a64_0x151de9,_0x3b448b=readDiagramTarget(_0xa6f4db),_0x58d843=await putRuntimeSkillVersionDiagram(_0xa6f4db[_0x4d5e93(0xb4)],_0x3b448b[_0x4d5e93(0xc4)],_0x3b448b['version'],_0x3b448b[_0x4d5e93(0xaa)],await readDiagramWriteInput(_0xa6f4db));return{'ok':!![],'data':_0x58d843,'message':_0x58d843[_0x4d5e93(0xc1)]===_0x4d5e93(0xac)?_0x4d5e93(0xbb)+_0x3b448b['skillCode']+'@'+_0x3b448b[_0x4d5e93(0xa1)]+_0x4d5e93(0xbc):(_0x58d843[_0x4d5e93(0xc1)]===_0x4d5e93(0x9d)?_0x4d5e93(0xa3):_0x4d5e93(0xab))+_0x4d5e93(0xa0)+_0x3b448b[_0x4d5e93(0xc4)]+'@'+_0x3b448b[_0x4d5e93(0xa1)]+'.'};}};export const diagramShowCommand={'service':a64_0x151de9(0xa4),'command':a64_0x151de9(0xc5),'description':a64_0x151de9(0xb5),'risk':'read','flags':TARGET_FLAGS,async 'execute'(_0x5a1256){const _0x2027c3=a64_0x151de9,_0x1c3c49=readDiagramTarget(_0x5a1256),_0x13ad81=await getRuntimeSkillVersionDiagram(_0x5a1256[_0x2027c3(0xb4)],_0x1c3c49[_0x2027c3(0xc4)],_0x1c3c49[_0x2027c3(0xa1)],_0x1c3c49['scope']);return{'ok':!![],'data':_0x13ad81,'message':_0x13ad81[_0x2027c3(0xb3)]?_0x2027c3(0xa9)+_0x1c3c49['skillCode']+'@'+_0x1c3c49[_0x2027c3(0xa1)]+';\x20next\x20write\x20expects\x20revision\x20'+_0x13ad81[_0x2027c3(0xae)]+'.':_0x2027c3(0xb6)+_0x1c3c49['skillCode']+'@'+_0x1c3c49[_0x2027c3(0xa1)]+_0x2027c3(0xa2)+_0x13ad81['expectedDiagramRevision']+'.'};}};
@@ -1 +1 @@
1
- const a65_0x578385=a65_0x5156;(function(_0x1b992,_0x26e2a1){const _0x32509d=a65_0x5156,_0x24c1d1=_0x1b992();while(!![]){try{const _0x1263f5=parseInt(_0x32509d(0x1f6))/0x1*(-parseInt(_0x32509d(0x201))/0x2)+parseInt(_0x32509d(0x212))/0x3+-parseInt(_0x32509d(0x20e))/0x4*(-parseInt(_0x32509d(0x204))/0x5)+-parseInt(_0x32509d(0x1e7))/0x6*(-parseInt(_0x32509d(0x1f1))/0x7)+parseInt(_0x32509d(0x1f5))/0x8*(parseInt(_0x32509d(0x1fb))/0x9)+parseInt(_0x32509d(0x1fd))/0xa+-parseInt(_0x32509d(0x20b))/0xb;if(_0x1263f5===_0x26e2a1)break;else _0x24c1d1['push'](_0x24c1d1['shift']());}catch(_0x582945){_0x24c1d1['push'](_0x24c1d1['shift']());}}}(a65_0x2f31,0x1c865));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';const PACKAGE_DOWNLOAD_CONCURRENCY=0x4;export const installCommand={'service':'skill','command':a65_0x578385(0x210),'description':a65_0x578385(0x20d),'risk':a65_0x578385(0x1eb),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x33997f){return syncRuntimeSkills(_0x33997f);}};function a65_0x2f31(){const _0x2ca791=['trim','length','8DEWSeV','69014lcQjiu','../../../skills/runtime-skill-sync.js','min','all','map','1030023YffeRx','project','823710NGfVoo','bool','\x20company\x20Skill(s).','authRequired','4LKjqnm','company','envName','5wYJmPy','force','global','\x20personal\x20and\x20','includes','production','unchanged','2693724eWwofk','scope','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','608236NERziP','skipped','install','from','181830vRsgjX','skillCode','6WwVZkq','Installed\x20','removed','skillRoots','read','appCode','../../../core/api-client.js','action','filter','personal','631834yPOmOP','code'];a65_0x2f31=function(){return _0x2ca791;};return a65_0x2f31();}async function syncRuntimeSkills(_0x44c1f4){const _0x18a381=a65_0x578385,{downloadRuntimeSkillPackage:_0x5e3de7,listRuntimeSkills:_0x12e630}=await import(_0x18a381(0x1ed)),{linkEffectiveRuntimeSkills:_0x5233aa,materializeRuntimeSkill:_0x37a484,pruneStaleRuntimeSkillCache:_0x17b032,pruneStaleRuntimeSkillLinks:_0x35f24a,resolveRuntimeSkillInstallTarget:_0x2a7673,reuseMaterializedRuntimeSkill:_0x1c249c}=await import(_0x18a381(0x1f7)),_0x5e44cc=_0x44c1f4['str'](_0x18a381(0x1f2)),_0x4fe032=normalizeSyncScopes(_0x44c1f4['str']('scope')),_0x59d0a2=_0x44c1f4[_0x18a381(0x203)]??_0x18a381(0x209),_0x16c443=_0x44c1f4['accessKey'],_0x35ce7b=_0x44c1f4[_0x18a381(0x1fe)](_0x18a381(0x205));if(!_0x16c443)throw CliErrors[_0x18a381(0x200)]('Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.');const _0x53af8f=_0x2a7673(_0x44c1f4[_0x18a381(0x1ec)],_0x44c1f4[_0x18a381(0x1fe)](_0x18a381(0x1fc))?_0x18a381(0x1fc):_0x18a381(0x206)),_0x1bb8ba=_0x2a7673(_0x44c1f4[_0x18a381(0x1ec)],_0x53af8f['scope']===_0x18a381(0x1fc)?_0x18a381(0x206):_0x18a381(0x1fc)),_0x35729b=await _0x12e630({'appCode':_0x44c1f4[_0x18a381(0x1ec)],'scope':_0x4fe032[_0x18a381(0x1f4)]===0x1?_0x4fe032[0x0]:_0x18a381(0x1f9),'code':_0x5e44cc[_0x18a381(0x1f3)]()||undefined}),_0x57af90=_0x4fe032[_0x18a381(0x208)](_0x18a381(0x1f0))?_0x35729b['personal']:[],_0x3ad813=_0x4fe032[_0x18a381(0x208)](_0x18a381(0x202))?_0x35729b[_0x18a381(0x202)]:[],_0x3cedfc=new Set([..._0x57af90[_0x18a381(0x1fa)](_0x5c32de=>_0x5c32de[_0x18a381(0x1e6)]?.[_0x18a381(0x1f3)]())[_0x18a381(0x1ef)](_0x5627ed=>Boolean(_0x5627ed)),..._0x3ad813[_0x18a381(0x1fa)](_0x470994=>_0x470994['skillCode']?.[_0x18a381(0x1f3)]())[_0x18a381(0x1ef)](_0x43b404=>Boolean(_0x43b404))]),_0x3adfa6=_0x5e44cc[_0x18a381(0x1f3)]()?[_0x5e44cc[_0x18a381(0x1f3)]()]:undefined,_0x67f972=_0x4fe032[_0x18a381(0x1f4)]===0x2&&_0x4fe032[_0x18a381(0x208)](_0x18a381(0x1f0))&&_0x4fe032['includes'](_0x18a381(0x202)),_0x56fc63=_0x67f972?_0x35f24a(_0x53af8f,_0x3cedfc,_0x3adfa6):[],_0x179339=_0x17b032({'env':_0x59d0a2,'accessKey':_0x16c443,'appCode':_0x44c1f4[_0x18a381(0x1ec)],'activeSkillCodes':_0x3cedfc,'pruneSkillCodes':_0x3adfa6,'scopes':_0x4fe032,'protectedLinkRoots':_0x1bb8ba[_0x18a381(0x1ea)]}),_0x84694e=[..._0x57af90[_0x18a381(0x1fa)](_0x3ac383=>({'skill':_0x3ac383,'scope':_0x18a381(0x1f0)})),..._0x3ad813[_0x18a381(0x1fa)](_0x3db2cd=>({'skill':_0x3db2cd,'scope':'company'}))],_0x47d60e=await mapConcurrent(_0x84694e,PACKAGE_DOWNLOAD_CONCURRENCY,async({skill:_0x16a784,scope:_0x2a9fa8})=>{const _0x506f6b=_0x18a381,_0x5bd5ac=_0x1c249c(_0x16a784,_0x2a9fa8,{'env':_0x59d0a2,'accessKey':_0x16c443,'appCode':_0x44c1f4[_0x506f6b(0x1ec)]});if(_0x5bd5ac)return _0x5bd5ac;return _0x37a484(_0x16a784,_0x2a9fa8,{'env':_0x59d0a2,'accessKey':_0x16c443,'appCode':_0x44c1f4[_0x506f6b(0x1ec)],'force':_0x35ce7b,'packageBytes':await downloadSkillPackage(_0x16a784,_0x2a9fa8,_0x44c1f4[_0x506f6b(0x1ec)],_0x5e3de7)});}),_0x3c9c99=_0x5233aa(_0x47d60e,_0x53af8f),_0x4d22fc=countLinkActions(_0x3c9c99);return{'ok':!![],'data':{'appCode':_0x44c1f4[_0x18a381(0x1ec)],..._0x53af8f[_0x18a381(0x20c)]===_0x18a381(0x1fc)?{'installTarget':{'scope':_0x53af8f['scope'],'skillRoots':[..._0x53af8f[_0x18a381(0x1ea)]]}}:{},'personal':_0x57af90['length'],'company':_0x3ad813['length'],'materialized':_0x47d60e[_0x18a381(0x1f4)],'links':{'total':_0x3c9c99[_0x18a381(0x1f4)],'created':_0x4d22fc['created']??0x0,'updated':_0x4d22fc['updated']??0x0,'unchanged':_0x4d22fc[_0x18a381(0x20a)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x56fc63['filter'](_0x18d9b1=>_0x18d9b1[_0x18a381(0x1ee)]===_0x18a381(0x1e9))[_0x18a381(0x1f4)],'cacheDirs':_0x179339['filter'](_0x1cab4d=>_0x1cab4d[_0x18a381(0x1ee)]===_0x18a381(0x1e9))[_0x18a381(0x1f4)],'skipped':[..._0x56fc63,..._0x179339]['filter'](_0x30ffd4=>_0x30ffd4[_0x18a381(0x1ee)]===_0x18a381(0x20f))[_0x18a381(0x1f4)]},'skills':{'personal':_0x57af90[_0x18a381(0x1fa)](summarizeRuntimeSkill),'company':_0x3ad813[_0x18a381(0x1fa)](summarizeRuntimeSkill)}},'message':_0x18a381(0x1e8)+_0x57af90['length']+_0x18a381(0x207)+_0x3ad813[_0x18a381(0x1f4)]+_0x18a381(0x1ff)};}async function mapConcurrent(_0x1a8b29,_0x299db5,_0x44aac0){const _0x32c037=a65_0x578385,_0x45fc56=new Array(_0x1a8b29['length']);let _0x4d4b79=0x0;const _0x31a2b0=Array[_0x32c037(0x211)]({'length':Math[_0x32c037(0x1f8)](_0x299db5,_0x1a8b29['length'])},async()=>{const _0x598cce=_0x32c037;while(_0x4d4b79<_0x1a8b29[_0x598cce(0x1f4)]){const _0x20beac=_0x4d4b79;_0x4d4b79+=0x1,_0x45fc56[_0x20beac]=await _0x44aac0(_0x1a8b29[_0x20beac]);}});return await Promise[_0x32c037(0x1f9)](_0x31a2b0),_0x45fc56;}function a65_0x5156(_0x29c13e,_0x77ffaf){_0x29c13e=_0x29c13e-0x1e6;const _0x2f3132=a65_0x2f31();let _0x515605=_0x2f3132[_0x29c13e];return _0x515605;}async function downloadSkillPackage(_0x24a813,_0x3c0dd4,_0x3baef8,_0x39bade){const _0x413093=a65_0x578385,_0x46d63f=_0x24a813['version']?.[_0x413093(0x1f3)]();return _0x46d63f?_0x39bade(_0x3c0dd4,_0x24a813[_0x413093(0x1e6)],_0x3baef8,_0x46d63f):_0x39bade(_0x3c0dd4,_0x24a813[_0x413093(0x1e6)],_0x3baef8);}function countLinkActions(_0x18280b){return _0x18280b['reduce']((_0x3ca597,_0x47281d)=>{const _0xcaba97=a65_0x5156;return _0x3ca597[_0x47281d[_0xcaba97(0x1ee)]]=(_0x3ca597[_0x47281d[_0xcaba97(0x1ee)]]??0x0)+0x1,_0x3ca597;},{});}
1
+ const a65_0x39c3bc=a65_0x4a51;(function(_0x2f28bc,_0x1e1e38){const _0x1de188=a65_0x4a51,_0x4a43c1=_0x2f28bc();while(!![]){try{const _0x50a79d=-parseInt(_0x1de188(0x1a7))/0x1*(parseInt(_0x1de188(0x1b3))/0x2)+parseInt(_0x1de188(0x18d))/0x3*(parseInt(_0x1de188(0x196))/0x4)+parseInt(_0x1de188(0x190))/0x5*(parseInt(_0x1de188(0x1b1))/0x6)+parseInt(_0x1de188(0x1a1))/0x7+parseInt(_0x1de188(0x1a8))/0x8*(-parseInt(_0x1de188(0x195))/0x9)+-parseInt(_0x1de188(0x1a6))/0xa*(parseInt(_0x1de188(0x1ae))/0xb)+parseInt(_0x1de188(0x18f))/0xc;if(_0x50a79d===_0x1e1e38)break;else _0x4a43c1['push'](_0x4a43c1['shift']());}catch(_0x1dcf7b){_0x4a43c1['push'](_0x4a43c1['shift']());}}}(a65_0x12ef,0x59e5d));function a65_0x12ef(){const _0x561bac=['envName','authRequired','../../../skills/runtime-skill-sync.js','bool','trim','scope','from','install','3RGtdjs','skill','5673588hdcDbz','95UMkkYW','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','includes','length','created','694269mBatas','2566176JHhpCl','force','accessKey','action','personal','project','appCode','all','Installed\x20','map','skillRoots','3649681vPaqAl','updated','reduce','unchanged','removed','310TOWQdS','86537NoYJIB','8oWjMnD','skillCode','production','str','\x20personal\x20and\x20','global','212861VYmUXk','filter','version','4824qHGHiD','company','14gLyXkE','\x20company\x20Skill(s).','min','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories'];a65_0x12ef=function(){return _0x561bac;};return a65_0x12ef();}function a65_0x4a51(_0x58c2cd,_0x3bcffb){_0x58c2cd=_0x58c2cd-0x185;const _0x12ef3b=a65_0x12ef();let _0x4a5152=_0x12ef3b[_0x58c2cd];return _0x4a5152;}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';const PACKAGE_DOWNLOAD_CONCURRENCY=0x4;export const installCommand={'service':a65_0x39c3bc(0x18e),'command':a65_0x39c3bc(0x18c),'description':a65_0x39c3bc(0x1b6),'risk':'read','requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x2df5de){return syncRuntimeSkills(_0x2df5de);}};async function syncRuntimeSkills(_0x45b921){const _0x12c479=a65_0x39c3bc,{downloadRuntimeSkillPackage:_0x9fdc4,listRuntimeSkills:_0x5bed36}=await import('../../../core/api-client.js'),{linkEffectiveRuntimeSkills:_0x35ff8e,materializeRuntimeSkill:_0x36cff3,pruneStaleRuntimeSkillCache:_0x428371,pruneStaleRuntimeSkillLinks:_0x40b0de,resolveRuntimeSkillInstallTarget:_0x53690e,reuseMaterializedRuntimeSkill:_0x2e9433}=await import(_0x12c479(0x187)),_0x31678e=_0x45b921[_0x12c479(0x1ab)]('code'),_0x38aca5=normalizeSyncScopes(_0x45b921['str'](_0x12c479(0x18a))),_0x586609=_0x45b921[_0x12c479(0x185)]??_0x12c479(0x1aa),_0x36bca8=_0x45b921[_0x12c479(0x198)],_0x16dfa6=_0x45b921['bool'](_0x12c479(0x197));if(!_0x36bca8)throw CliErrors[_0x12c479(0x186)](_0x12c479(0x191));const _0x54f538=_0x53690e(_0x45b921['appCode'],_0x45b921[_0x12c479(0x188)](_0x12c479(0x19b))?'project':_0x12c479(0x1ad)),_0x4b02c2=_0x53690e(_0x45b921[_0x12c479(0x19c)],_0x54f538[_0x12c479(0x18a)]===_0x12c479(0x19b)?'global':_0x12c479(0x19b)),_0x65b393=await _0x5bed36({'appCode':_0x45b921['appCode'],'scope':_0x38aca5[_0x12c479(0x193)]===0x1?_0x38aca5[0x0]:_0x12c479(0x19d),'code':_0x31678e[_0x12c479(0x189)]()||undefined}),_0x1e4a69=_0x38aca5[_0x12c479(0x192)](_0x12c479(0x19a))?_0x65b393[_0x12c479(0x19a)]:[],_0x4456f8=_0x38aca5[_0x12c479(0x192)]('company')?_0x65b393[_0x12c479(0x1b2)]:[],_0x1352e0=new Set([..._0x1e4a69[_0x12c479(0x19f)](_0x29a57b=>_0x29a57b[_0x12c479(0x1a9)]?.[_0x12c479(0x189)]())[_0x12c479(0x1af)](_0x32351b=>Boolean(_0x32351b)),..._0x4456f8[_0x12c479(0x19f)](_0x5aab50=>_0x5aab50[_0x12c479(0x1a9)]?.[_0x12c479(0x189)]())[_0x12c479(0x1af)](_0x21bbeb=>Boolean(_0x21bbeb))]),_0x207518=_0x31678e['trim']()?[_0x31678e['trim']()]:undefined,_0xc77f75=_0x38aca5[_0x12c479(0x193)]===0x2&&_0x38aca5['includes'](_0x12c479(0x19a))&&_0x38aca5['includes'](_0x12c479(0x1b2)),_0x137fc4=_0xc77f75?_0x40b0de(_0x54f538,_0x1352e0,_0x207518):[],_0x39a1c3=_0x428371({'env':_0x586609,'accessKey':_0x36bca8,'appCode':_0x45b921[_0x12c479(0x19c)],'activeSkillCodes':_0x1352e0,'pruneSkillCodes':_0x207518,'scopes':_0x38aca5,'protectedLinkRoots':_0x4b02c2[_0x12c479(0x1a0)]}),_0xcbf126=[..._0x1e4a69[_0x12c479(0x19f)](_0x4fe2af=>({'skill':_0x4fe2af,'scope':_0x12c479(0x19a)})),..._0x4456f8[_0x12c479(0x19f)](_0x5ce195=>({'skill':_0x5ce195,'scope':_0x12c479(0x1b2)}))],_0x3ec359=await mapConcurrent(_0xcbf126,PACKAGE_DOWNLOAD_CONCURRENCY,async({skill:_0x5958dc,scope:_0x4abe0b})=>{const _0x300ae9=_0x12c479,_0x2e2302=_0x2e9433(_0x5958dc,_0x4abe0b,{'env':_0x586609,'accessKey':_0x36bca8,'appCode':_0x45b921[_0x300ae9(0x19c)]});if(_0x2e2302)return _0x2e2302;return _0x36cff3(_0x5958dc,_0x4abe0b,{'env':_0x586609,'accessKey':_0x36bca8,'appCode':_0x45b921[_0x300ae9(0x19c)],'force':_0x16dfa6,'packageBytes':await downloadSkillPackage(_0x5958dc,_0x4abe0b,_0x45b921[_0x300ae9(0x19c)],_0x9fdc4)});}),_0xc2ee0a=_0x35ff8e(_0x3ec359,_0x54f538),_0xe2d3e8=countLinkActions(_0xc2ee0a);return{'ok':!![],'data':{'appCode':_0x45b921['appCode'],..._0x54f538[_0x12c479(0x18a)]===_0x12c479(0x19b)?{'installTarget':{'scope':_0x54f538[_0x12c479(0x18a)],'skillRoots':[..._0x54f538[_0x12c479(0x1a0)]]}}:{},'personal':_0x1e4a69['length'],'company':_0x4456f8[_0x12c479(0x193)],'materialized':_0x3ec359[_0x12c479(0x193)],'links':{'total':_0xc2ee0a[_0x12c479(0x193)],'created':_0xe2d3e8[_0x12c479(0x194)]??0x0,'updated':_0xe2d3e8[_0x12c479(0x1a2)]??0x0,'unchanged':_0xe2d3e8[_0x12c479(0x1a4)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x137fc4[_0x12c479(0x1af)](_0x2143f9=>_0x2143f9[_0x12c479(0x199)]===_0x12c479(0x1a5))[_0x12c479(0x193)],'cacheDirs':_0x39a1c3[_0x12c479(0x1af)](_0x3ed13b=>_0x3ed13b['action']===_0x12c479(0x1a5))['length'],'skipped':[..._0x137fc4,..._0x39a1c3][_0x12c479(0x1af)](_0x22d976=>_0x22d976[_0x12c479(0x199)]==='skipped')[_0x12c479(0x193)]},'skills':{'personal':_0x1e4a69[_0x12c479(0x19f)](summarizeRuntimeSkill),'company':_0x4456f8[_0x12c479(0x19f)](summarizeRuntimeSkill)}},'message':_0x12c479(0x19e)+_0x1e4a69[_0x12c479(0x193)]+_0x12c479(0x1ac)+_0x4456f8[_0x12c479(0x193)]+_0x12c479(0x1b4)};}async function mapConcurrent(_0x4c74ec,_0x3553f2,_0x14fab5){const _0x3619ef=a65_0x39c3bc,_0x20f7f8=new Array(_0x4c74ec[_0x3619ef(0x193)]);let _0x513cb4=0x0;const _0x3b392f=Array[_0x3619ef(0x18b)]({'length':Math[_0x3619ef(0x1b5)](_0x3553f2,_0x4c74ec[_0x3619ef(0x193)])},async()=>{while(_0x513cb4<_0x4c74ec['length']){const _0x7b435f=_0x513cb4;_0x513cb4+=0x1,_0x20f7f8[_0x7b435f]=await _0x14fab5(_0x4c74ec[_0x7b435f]);}});return await Promise['all'](_0x3b392f),_0x20f7f8;}async function downloadSkillPackage(_0x50f1e1,_0x133119,_0x4a75ed,_0x45eee7){const _0x169031=a65_0x39c3bc,_0x4f68a0=_0x50f1e1[_0x169031(0x1b0)]?.[_0x169031(0x189)]();return _0x4f68a0?_0x45eee7(_0x133119,_0x50f1e1['skillCode'],_0x4a75ed,_0x4f68a0):_0x45eee7(_0x133119,_0x50f1e1[_0x169031(0x1a9)],_0x4a75ed);}function countLinkActions(_0x5c4a20){const _0x2db63c=a65_0x39c3bc;return _0x5c4a20[_0x2db63c(0x1a3)]((_0x4f7d67,_0x30b1f4)=>{const _0x497496=_0x2db63c;return _0x4f7d67[_0x30b1f4[_0x497496(0x199)]]=(_0x4f7d67[_0x30b1f4['action']]??0x0)+0x1,_0x4f7d67;},{});}
@@ -1 +1 @@
1
- const a66_0x4c33e5=a66_0x3d48;(function(_0xba4c7e,_0x29be9f){const _0x102eee=a66_0x3d48,_0x29351a=_0xba4c7e();while(!![]){try{const _0x16cb84=-parseInt(_0x102eee(0x14f))/0x1+-parseInt(_0x102eee(0x149))/0x2+parseInt(_0x102eee(0x14e))/0x3*(parseInt(_0x102eee(0x13c))/0x4)+parseInt(_0x102eee(0x144))/0x5+-parseInt(_0x102eee(0x150))/0x6+-parseInt(_0x102eee(0x13e))/0x7*(-parseInt(_0x102eee(0x153))/0x8)+parseInt(_0x102eee(0x159))/0x9;if(_0x16cb84===_0x29be9f)break;else _0x29351a['push'](_0x29351a['shift']());}catch(_0x27c5d1){_0x29351a['push'](_0x29351a['shift']());}}}(a66_0x5885,0x6c313));function a66_0x3d48(_0x3cc887,_0x164130){_0x3cc887=_0x3cc887-0x13b;const _0x5885d7=a66_0x5885();let _0x3d48c6=_0x5885d7[_0x3cc887];return _0x3d48c6;}import{CliErrors}from'../../../errors.js';function a66_0x5885(){const _0x220911=['personal','code','length','authRequired','\x20local\x20Skill(s).','3759665tTjdKB','../../../core/api-client.js','company','accessKey','production','1016096TSxarP','project','envName','filter','skill','4647sKOPcw','828939UnKpIn','4208538xGwGsh','builtin','list','16424TjgZku','appCode','bool','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','scope','local','12783735XMAuyb','remote','str','../../../skills/runtime-skill-sync.js','Listed\x20','map','104ELxMgp','read','917SQCnmB'];a66_0x5885=function(){return _0x220911;};return a66_0x5885();}import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a66_0x4c33e5(0x14d),'command':a66_0x4c33e5(0x152),'description':a66_0x4c33e5(0x156),'risk':a66_0x4c33e5(0x13d),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0xfb4bcd){const _0x1738c2=a66_0x4c33e5,_0x3a1229=_0xfb4bcd[_0x1738c2(0x15b)](_0x1738c2(0x140)),_0x14a4c3=normalizeListScope(_0xfb4bcd[_0x1738c2(0x15b)](_0x1738c2(0x157)));if(_0xfb4bcd[_0x1738c2(0x155)]('local')){const _0x44a6f3=_0xfb4bcd[_0x1738c2(0x147)];if(!_0x44a6f3)throw CliErrors[_0x1738c2(0x142)]();const {listLocalRuntimeSkills:_0x5ef145,resolveRuntimeSkillInstallTarget:_0x25d9c3}=await import(_0x1738c2(0x15c)),_0x45a7f7=_0x25d9c3(_0xfb4bcd[_0x1738c2(0x154)],_0xfb4bcd[_0x1738c2(0x155)]('project')?_0x1738c2(0x14a):'global'),_0x3602d7=_0x5ef145({'env':_0xfb4bcd[_0x1738c2(0x14b)]??_0x1738c2(0x148),'accessKey':_0x44a6f3,'appCode':_0xfb4bcd['appCode'],'scopes':listScopeToRuntimeScopes(_0x14a4c3),'code':_0x3a1229['trim']()||undefined},_0x45a7f7),_0x5f40a5=groupLocalRuntimeSkills(_0x3602d7);return{'ok':!![],'data':{'appCode':_0xfb4bcd[_0x1738c2(0x154)],'source':_0x1738c2(0x158),..._0x45a7f7[_0x1738c2(0x157)]===_0x1738c2(0x14a)?{'installScope':_0x45a7f7[_0x1738c2(0x157)]}:{},'scope':_0x14a4c3,'total':_0x3602d7[_0x1738c2(0x141)],'personal':_0x5f40a5[_0x1738c2(0x13f)]['length'],'company':_0x5f40a5['company']['length'],'items':_0x3602d7[_0x1738c2(0x13b)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x5f40a5[_0x1738c2(0x13f)]['map'](summarizeLocalRuntimeSkill),'company':_0x5f40a5[_0x1738c2(0x146)][_0x1738c2(0x13b)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x3602d7[_0x1738c2(0x141)]+_0x1738c2(0x143)};}const {listRuntimeSkills:_0x2ea897}=await import(_0x1738c2(0x145)),_0x658399=await _0x2ea897({'appCode':_0xfb4bcd[_0x1738c2(0x154)],'scope':listScopeToRemoteScope(_0x14a4c3),'code':_0x3a1229['trim']()||undefined}),_0x2f7f28=shouldListScope(_0x14a4c3,_0x1738c2(0x13f))?_0x658399['personal']??[]:[],_0x390440=shouldListScope(_0x14a4c3,'company')?_0x658399['company']??[]:[],_0x414730=[..._0x2f7f28,..._0x390440];return{'ok':!![],'data':{'appCode':_0xfb4bcd['appCode'],'source':_0x1738c2(0x15a),'scope':_0x14a4c3,'total':_0x414730[_0x1738c2(0x141)],'personal':_0x2f7f28['length'],'company':_0x390440['length'],'items':_0x414730[_0x1738c2(0x13b)](summarizeRuntimeSkill),'skills':{'personal':_0x2f7f28['map'](summarizeRuntimeSkill),'company':_0x390440[_0x1738c2(0x13b)](summarizeRuntimeSkill)}},'message':_0x1738c2(0x15d)+_0x414730[_0x1738c2(0x141)]+'\x20remote\x20Skill(s).'};}};function groupLocalRuntimeSkills(_0x49af9f){const _0x3c65c0=a66_0x4c33e5;return{'personal':_0x49af9f['filter'](_0x29a282=>_0x29a282[_0x3c65c0(0x157)]===_0x3c65c0(0x13f)),'company':_0x49af9f[_0x3c65c0(0x14c)](_0x558a8d=>_0x558a8d[_0x3c65c0(0x157)]===_0x3c65c0(0x146)),'builtin':_0x49af9f['filter'](_0x1a31a2=>_0x1a31a2[_0x3c65c0(0x157)]===_0x3c65c0(0x151))};}
1
+ const a66_0x9c8092=a66_0x31cc;(function(_0x47760f,_0x1d0287){const _0x27f2b8=a66_0x31cc,_0x363720=_0x47760f();while(!![]){try{const _0x101992=-parseInt(_0x27f2b8(0x17d))/0x1+parseInt(_0x27f2b8(0x174))/0x2*(-parseInt(_0x27f2b8(0x17f))/0x3)+parseInt(_0x27f2b8(0x16a))/0x4*(-parseInt(_0x27f2b8(0x17e))/0x5)+-parseInt(_0x27f2b8(0x17c))/0x6*(-parseInt(_0x27f2b8(0x181))/0x7)+-parseInt(_0x27f2b8(0x172))/0x8*(-parseInt(_0x27f2b8(0x16f))/0x9)+-parseInt(_0x27f2b8(0x182))/0xa*(-parseInt(_0x27f2b8(0x176))/0xb)+parseInt(_0x27f2b8(0x165))/0xc*(parseInt(_0x27f2b8(0x166))/0xd);if(_0x101992===_0x1d0287)break;else _0x363720['push'](_0x363720['shift']());}catch(_0x2e4aac){_0x363720['push'](_0x363720['shift']());}}}(a66_0x36bc,0x30fc6));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';function a66_0x31cc(_0x1992b1,_0x1e353a){_0x1992b1=_0x1992b1-0x165;const _0x36bc1f=a66_0x36bc();let _0x31ccf3=_0x36bc1f[_0x1992b1];return _0x31ccf3;}import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a66_0x9c8092(0x16c),'command':a66_0x9c8092(0x170),'description':a66_0x9c8092(0x179),'risk':a66_0x9c8092(0x17a),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x481c77){const _0x39d881=a66_0x9c8092,_0x45b572=_0x481c77[_0x39d881(0x178)](_0x39d881(0x177)),_0x3adf80=normalizeListScope(_0x481c77[_0x39d881(0x178)]('scope'));if(_0x481c77[_0x39d881(0x175)](_0x39d881(0x18a))){const _0x59f559=_0x481c77['accessKey'];if(!_0x59f559)throw CliErrors[_0x39d881(0x167)]();const {listLocalRuntimeSkills:_0x228dcd,resolveRuntimeSkillInstallTarget:_0x136a07}=await import(_0x39d881(0x168)),_0x1ac216=_0x136a07(_0x481c77[_0x39d881(0x184)],_0x481c77[_0x39d881(0x175)](_0x39d881(0x186))?_0x39d881(0x186):_0x39d881(0x16d)),_0x5740c6=_0x228dcd({'env':_0x481c77[_0x39d881(0x16e)]??'production','accessKey':_0x59f559,'appCode':_0x481c77[_0x39d881(0x184)],'scopes':listScopeToRuntimeScopes(_0x3adf80),'code':_0x45b572['trim']()||undefined},_0x1ac216),_0xe683bb=groupLocalRuntimeSkills(_0x5740c6);return{'ok':!![],'data':{'appCode':_0x481c77[_0x39d881(0x184)],'source':'local',..._0x1ac216['scope']===_0x39d881(0x186)?{'installScope':_0x1ac216[_0x39d881(0x183)]}:{},'scope':_0x3adf80,'total':_0x5740c6[_0x39d881(0x189)],'personal':_0xe683bb['personal']['length'],'company':_0xe683bb[_0x39d881(0x188)]['length'],'items':_0x5740c6[_0x39d881(0x171)](summarizeLocalRuntimeSkill),'skills':{'personal':_0xe683bb[_0x39d881(0x187)][_0x39d881(0x171)](summarizeLocalRuntimeSkill),'company':_0xe683bb['company'][_0x39d881(0x171)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x5740c6[_0x39d881(0x189)]+'\x20local\x20Skill(s).'};}const {listRuntimeSkills:_0x182daa}=await import('../../../core/api-client.js'),_0x1c48ad=await _0x182daa({'appCode':_0x481c77[_0x39d881(0x184)],'scope':listScopeToRemoteScope(_0x3adf80),'code':_0x45b572[_0x39d881(0x16b)]()||undefined}),_0x500bd7=shouldListScope(_0x3adf80,'personal')?_0x1c48ad[_0x39d881(0x187)]??[]:[],_0x14d096=shouldListScope(_0x3adf80,_0x39d881(0x188))?_0x1c48ad[_0x39d881(0x188)]??[]:[],_0x5466e=[..._0x500bd7,..._0x14d096];return{'ok':!![],'data':{'appCode':_0x481c77[_0x39d881(0x184)],'source':_0x39d881(0x17b),'scope':_0x3adf80,'total':_0x5466e[_0x39d881(0x189)],'personal':_0x500bd7[_0x39d881(0x189)],'company':_0x14d096[_0x39d881(0x189)],'items':_0x5466e['map'](summarizeRuntimeSkill),'skills':{'personal':_0x500bd7[_0x39d881(0x171)](summarizeRuntimeSkill),'company':_0x14d096[_0x39d881(0x171)](summarizeRuntimeSkill)}},'message':_0x39d881(0x185)+_0x5466e[_0x39d881(0x189)]+_0x39d881(0x180)};}};function groupLocalRuntimeSkills(_0x1c0b46){const _0xa685fa=a66_0x9c8092;return{'personal':_0x1c0b46[_0xa685fa(0x173)](_0x2b2210=>_0x2b2210['scope']===_0xa685fa(0x187)),'company':_0x1c0b46[_0xa685fa(0x173)](_0x3decf8=>_0x3decf8[_0xa685fa(0x183)]==='company'),'builtin':_0x1c0b46[_0xa685fa(0x173)](_0x46f526=>_0x46f526[_0xa685fa(0x183)]===_0xa685fa(0x169))};}function a66_0x36bc(){const _0x303d7a=['filter','22vhBMFW','bool','2958197eZUxkc','code','str','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','read','remote','68484IToMPM','302747KOskqI','3310MbxQfj','20097hOzFXM','\x20remote\x20Skill(s).','49DVPzqz','10ruwMnl','scope','appCode','Listed\x20','project','personal','company','length','local','30636DtuGio','429PRAFsg','authRequired','../../../skills/runtime-skill-sync.js','builtin','12aDECZE','trim','skill','global','envName','9ssZtxQ','list','map','1167952NIpwPP'];a66_0x36bc=function(){return _0x303d7a;};return a66_0x36bc();}