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

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 (158) 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.js +1 -1
  102. package/lib/core/db-resolver.js +1 -1
  103. package/lib/core/sdk-client.js +1 -1
  104. package/lib/errors.js +1 -1
  105. package/lib/framework/build-all-flags.js +1 -1
  106. package/lib/framework/dryrun.js +1 -1
  107. package/lib/framework/flags.js +1 -1
  108. package/lib/framework/help.js +1 -1
  109. package/lib/framework/index.js +1 -1
  110. package/lib/framework/output.js +1 -1
  111. package/lib/framework/preparse.js +1 -1
  112. package/lib/framework/rate-limit.js +1 -1
  113. package/lib/framework/raw-flags.js +1 -1
  114. package/lib/framework/response.js +1 -1
  115. package/lib/framework/runner-confirmation.js +1 -1
  116. package/lib/framework/runner-error.js +1 -1
  117. package/lib/framework/runner.js +1 -1
  118. package/lib/framework/schema-export.js +1 -1
  119. package/lib/framework/service-order.js +1 -1
  120. package/lib/framework/types.js +1 -1
  121. package/lib/generated/build-info.d.ts +4 -4
  122. package/lib/generated/build-info.js +1 -1
  123. package/lib/help.js +1 -1
  124. package/lib/postinstall.js +1 -1
  125. package/lib/runtime/confirmation.js +1 -1
  126. package/lib/runtime/event.js +1 -1
  127. package/lib/runtime/index.js +1 -1
  128. package/lib/runtime/queue.js +1 -1
  129. package/lib/runtime/resolve.js +1 -1
  130. package/lib/skills/builtin-skill.js +1 -1
  131. package/lib/skills/npx-skills-add.js +1 -1
  132. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  133. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  134. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  135. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  136. package/lib/skills/runtime-skill-sync/links.js +1 -1
  137. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  138. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  139. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  140. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  141. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  142. package/lib/skills/runtime-skill-sync/push.js +1 -1
  143. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  144. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  145. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  146. package/lib/skills/runtime-skill-sync.js +1 -1
  147. package/lib/skills/skill-presence.js +1 -1
  148. package/lib/utils/apply-jq-filter.js +1 -1
  149. package/lib/utils/logger.js +1 -1
  150. package/lib/utils/lossless-json.js +1 -1
  151. package/lib/utils/params.js +1 -1
  152. package/lib/utils/platform.js +1 -1
  153. package/lib/utils/update-notice.js +1 -1
  154. package/lib/utils/version.js +1 -1
  155. package/lib/utils/write-cli-side-channel.js +1 -1
  156. package/package.json +1 -1
  157. package/skills/lovrabet/SKILL.md +1 -1
  158. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- function a57_0x4b0f(){const _0x541925=['detail','/api/harness/apps/','appCode','taskId','286020CAdDDM','kimi/k3','read','title','--title\x20must\x20not\x20be\x20blank.','build','CRON','1620880nbbKaP','deepseek-v4-flash-0731','34KCZgzL','validate','cron','number','length','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','946sStSED','kind','string','Schedule\x20kind:\x20CRON\x20or\x20ONCE','Queued\x20Task\x20','high-risk-write','\x20immediately','805ctZfyK','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','str','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Created\x20','run','schedule-id','13920jjxKJw','36HlIBJc','Preview:\x20run\x20schedule\x20','44092flzbsY','/run','num','model','DELETE','创建周期性或单次执行的\x20Agent\x20定时任务','limit','body','Preview:\x20delete\x20schedule\x20','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','3486400bBOagK','description','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','POST','ONCE','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','Show\x20one\x20schedule\x20by\x20schedule\x20ID','Deleted\x20schedule\x20','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','cursor','Page\x20size\x20from\x201\x20to\x20100','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','\x20from\x20schedule\x20','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','Schedule\x20UUID','Preview:\x20create\x20an\x20Agent\x20schedule','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','validation','scheduleId','schedule','UTC','4560kBPTrJ','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','\x20schedule\x20','prompt','10283UabZCN','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','2997726baCCFT','--prompt\x20must\x20not\x20be\x20blank.','deepseek-v4-pro-0813','scheduled-at'];a57_0x4b0f=function(){return _0x541925;};return a57_0x4b0f();}const a57_0x247fbe=a57_0x15a7;function a57_0x15a7(_0xeef3c9,_0x26a09b){_0xeef3c9=_0xeef3c9-0x175;const _0x4b0fd4=a57_0x4b0f();let _0x15a7df=_0x4b0fd4[_0xeef3c9];return _0x15a7df;}(function(_0xe83cdc,_0x332464){const _0x1f88a3=a57_0x15a7,_0x1762c8=_0xe83cdc();while(!![]){try{const _0x42d571=parseInt(_0x1f88a3(0x1ad))/0x1*(-parseInt(_0x1f88a3(0x176))/0x2)+-parseInt(_0x1f88a3(0x19c))/0x3+-parseInt(_0x1f88a3(0x1c1))/0x4*(-parseInt(_0x1f88a3(0x1ba))/0x5)+parseInt(_0x1f88a3(0x196))/0x6*(parseInt(_0x1f88a3(0x19a))/0x7)+parseInt(_0x1f88a3(0x1ab))/0x8*(-parseInt(_0x1f88a3(0x1c2))/0x9)+-parseInt(_0x1f88a3(0x180))/0xa+-parseInt(_0x1f88a3(0x1b3))/0xb*(-parseInt(_0x1f88a3(0x1a4))/0xc);if(_0x42d571===_0x332464)break;else _0x1762c8['push'](_0x1762c8['shift']());}catch(_0x378c96){_0x1762c8['push'](_0x1762c8['shift']());}}}(a57_0x4b0f,0xc7dd4));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_0x247fbe(0x1b4),'type':'string','required':!![],'enum':['CRON',a57_0x247fbe(0x184)],'description':a57_0x247fbe(0x1b6)},CRON_FLAG={'name':'cron','type':a57_0x247fbe(0x1b5),'description':a57_0x247fbe(0x18e)},SCHEDULED_AT_FLAG={'name':a57_0x247fbe(0x19f),'type':'string','description':a57_0x247fbe(0x197)},TITLE_FLAG={'name':'title','type':'string','required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a57_0x247fbe(0x199),'type':'string','required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':'model','type':a57_0x247fbe(0x1b5),'enum':[a57_0x247fbe(0x1a5),a57_0x247fbe(0x1ac),a57_0x247fbe(0x19e)],'default':a57_0x247fbe(0x1ac),'description':a57_0x247fbe(0x18b)},SCHEDULE_ID_FLAG={'name':a57_0x247fbe(0x1c0),'type':a57_0x247fbe(0x1b5),'required':!![],'description':a57_0x247fbe(0x18f),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a57_0x247fbe(0x19b)}},LIMIT_FLAG={'name':a57_0x247fbe(0x17c),'type':a57_0x247fbe(0x1b0),'default':0x14,'description':a57_0x247fbe(0x18a)},CURSOR_FLAG={'name':'cursor','type':a57_0x247fbe(0x1b5),'description':a57_0x247fbe(0x191)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function readScheduleInput(_0x5d856f){const _0x4255bc=a57_0x247fbe,_0x339b70=_0x5d856f['str'](_0x4255bc(0x1b4)),_0xe323d4=_0x5d856f[_0x4255bc(0x1bc)](_0x4255bc(0x1a7))['trim'](),_0x927f80=_0x5d856f['str'](_0x4255bc(0x199))['trim'](),_0x278b39=_0x5d856f[_0x4255bc(0x1bc)](_0x4255bc(0x179)),_0x30d931=_0x5d856f['str'](_0x4255bc(0x1af)),_0x50c305=_0x5d856f[_0x4255bc(0x1bc)](_0x4255bc(0x19f));if(!_0xe323d4)throw CliErrors['validation'](_0x4255bc(0x1a8));if(!_0x927f80)throw CliErrors['validation'](_0x4255bc(0x19d));if(_0x339b70===_0x4255bc(0x1aa)){if(!_0x30d931||_0x50c305)throw CliErrors[_0x4255bc(0x192)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x339b70,'timezone':_0x4255bc(0x195),'cron':_0x30d931,'title':_0xe323d4,'prompt':_0x927f80,'model':_0x278b39};}if(_0x339b70===_0x4255bc(0x184)){if(!_0x50c305||_0x30d931)throw CliErrors[_0x4255bc(0x192)](_0x4255bc(0x1bb));return{'kind':_0x339b70,'timezone':_0x4255bc(0x195),'scheduledAt':_0x50c305,'title':_0xe323d4,'prompt':_0x927f80,'model':_0x278b39};}throw CliErrors[_0x4255bc(0x192)](_0x4255bc(0x188));}function scheduleCollectionPath(_0x2ae158){const _0x2d53ca=a57_0x247fbe;return _0x2d53ca(0x1a1)+encodeURIComponent(_0x2ae158)+'/schedules';}function scheduleItemPath(_0x4c6823,_0x4b6e26){return scheduleCollectionPath(_0x4c6823)+'/'+encodeURIComponent(_0x4b6e26);}const scheduleValidate={'service':a57_0x247fbe(0x194),'command':a57_0x247fbe(0x1ae),'description':a57_0x247fbe(0x18c),'risk':a57_0x247fbe(0x1a6),'flags':INPUT_FLAGS,async 'validate'(_0xec943){readScheduleInput(_0xec943);},async 'execute'(_0x239979){const _0x6761b6=readScheduleInput(_0x239979),_0x5a4d03=await validateRuntimeSchedule(_0x239979['appCode'],_0x6761b6);return{'ok':!![],'data':_0x5a4d03,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a57_0x247fbe(0x194),'command':'create','description':a57_0x247fbe(0x17b),'risk':a57_0x247fbe(0x1b8),'confirmationDescription':a57_0x247fbe(0x17f),'flags':INPUT_FLAGS,async 'validate'(_0x2a8569){readScheduleInput(_0x2a8569);},async 'execute'(_0x59cab9){const _0x494da2=a57_0x247fbe,_0x49aeb5=readScheduleInput(_0x59cab9),_0x298d22=await validateRuntimeSchedule(_0x59cab9[_0x494da2(0x1a2)],_0x49aeb5),_0x3f3046=await createRuntimeSchedule(_0x59cab9['appCode'],_0x298d22);return{'ok':!![],'data':_0x3f3046,'message':_0x494da2(0x1be)+_0x3f3046['kind']+_0x494da2(0x198)+_0x3f3046[_0x494da2(0x193)]};},async 'dryRun'(_0x2094ec){const _0x1f8b1b=a57_0x247fbe,_0x35f16a=readScheduleInput(_0x2094ec);return dryRun(_0x1f8b1b(0x183),scheduleCollectionPath(_0x2094ec[_0x1f8b1b(0x1a2)]))[_0x1f8b1b(0x17d)](_0x35f16a)['description'](_0x1f8b1b(0x190))[_0x1f8b1b(0x1a9)]();}},scheduleList={'service':'schedule','command':'list','description':a57_0x247fbe(0x1b2),'risk':a57_0x247fbe(0x1a6),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x87c7cc){const _0x4d3839=a57_0x247fbe,_0x1587f6=_0x87c7cc[_0x4d3839(0x178)]('limit');if(!Number['isSafeInteger'](_0x1587f6)||_0x1587f6<0x1||_0x1587f6>0x64)throw CliErrors['validation'](_0x4d3839(0x1bd));const _0x3a5574=_0x87c7cc[_0x4d3839(0x1bc)](_0x4d3839(0x189));if(_0x3a5574&&(_0x3a5574[_0x4d3839(0x1b1)]>0x400||_0x3a5574['trim']()!==_0x3a5574))throw CliErrors['validation'](_0x4d3839(0x182));},async 'execute'(_0x9fa930){const _0x1bf28a=a57_0x247fbe,_0x4a50b0=_0x9fa930[_0x1bf28a(0x1bc)](_0x1bf28a(0x189)),_0x3aafc9=await listRuntimeSchedules(_0x9fa930[_0x1bf28a(0x1a2)],{'kind':_0x9fa930[_0x1bf28a(0x1bc)]('kind'),'limit':_0x9fa930[_0x1bf28a(0x178)](_0x1bf28a(0x17c)),..._0x4a50b0?{'cursor':_0x4a50b0}:{}});return{'ok':!![],'data':_0x3aafc9};}},scheduleDetail={'service':'schedule','command':a57_0x247fbe(0x1a0),'description':a57_0x247fbe(0x186),'risk':a57_0x247fbe(0x1a6),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x124bd2){const _0x56e339=a57_0x247fbe,_0x2c0a61=await getRuntimeSchedule(_0x124bd2[_0x56e339(0x1a2)],_0x124bd2['str'](_0x56e339(0x1c0)));return{'ok':!![],'data':_0x2c0a61};}},scheduleRun={'service':a57_0x247fbe(0x194),'command':a57_0x247fbe(0x1bf),'description':'立即运行一次定时任务并创建\x20Task','risk':'high-risk-write','confirmationDescription':a57_0x247fbe(0x185),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x214398){const _0x12d8d7=a57_0x247fbe,_0x4290b7=_0x214398['str'](_0x12d8d7(0x1c0)),_0x225882=await runRuntimeSchedule(_0x214398[_0x12d8d7(0x1a2)],_0x4290b7);return{'ok':!![],'data':_0x225882,'message':_0x12d8d7(0x1b7)+_0x225882[_0x12d8d7(0x1a3)]+_0x12d8d7(0x18d)+_0x4290b7};},async 'dryRun'(_0x2a9a81){const _0x90480b=a57_0x247fbe,_0x2d7f56=_0x2a9a81[_0x90480b(0x1bc)]('schedule-id');return dryRun('POST',scheduleItemPath(_0x2a9a81[_0x90480b(0x1a2)],_0x2d7f56)+_0x90480b(0x177))[_0x90480b(0x181)](_0x90480b(0x175)+_0x2d7f56+_0x90480b(0x1b9))[_0x90480b(0x1a9)]();}},scheduleDelete={'service':a57_0x247fbe(0x194),'command':'delete','description':'删除定时任务并停止其后续触发','risk':'high-risk-write','confirmationDescription':'将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x3dab35){const _0x267268=a57_0x247fbe,_0x8db828=_0x3dab35['str']('schedule-id'),_0x4ae0ea=await deleteRuntimeSchedule(_0x3dab35[_0x267268(0x1a2)],_0x8db828);return{'ok':!![],'data':_0x4ae0ea,'message':_0x267268(0x187)+_0x8db828};},async 'dryRun'(_0x5bddb6){const _0x36e2b1=a57_0x247fbe,_0x4c348d=_0x5bddb6[_0x36e2b1(0x1bc)]('schedule-id');return dryRun(_0x36e2b1(0x17a),scheduleItemPath(_0x5bddb6['appCode'],_0x4c348d))['description'](_0x36e2b1(0x17e)+_0x4c348d)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a57_0xa0a9e4=a57_0x1bda;(function(_0x153ad5,_0x20607f){const _0x269b13=a57_0x1bda,_0x205471=_0x153ad5();while(!![]){try{const _0x192418=-parseInt(_0x269b13(0x14f))/0x1+parseInt(_0x269b13(0x157))/0x2+-parseInt(_0x269b13(0x174))/0x3+-parseInt(_0x269b13(0x171))/0x4*(-parseInt(_0x269b13(0x162))/0x5)+parseInt(_0x269b13(0x154))/0x6*(parseInt(_0x269b13(0x164))/0x7)+-parseInt(_0x269b13(0x173))/0x8*(-parseInt(_0x269b13(0x170))/0x9)+parseInt(_0x269b13(0x17f))/0xa*(-parseInt(_0x269b13(0x155))/0xb);if(_0x192418===_0x20607f)break;else _0x205471['push'](_0x205471['shift']());}catch(_0x3c6b17){_0x205471['push'](_0x205471['shift']());}}}(a57_0x5543,0x4430d));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_0xa0a9e4(0x161),'type':a57_0xa0a9e4(0x16d),'required':!![],'enum':[a57_0xa0a9e4(0x168),a57_0xa0a9e4(0x179)],'description':a57_0xa0a9e4(0x145)},CRON_FLAG={'name':a57_0xa0a9e4(0x167),'type':a57_0xa0a9e4(0x16d),'description':a57_0xa0a9e4(0x158)},SCHEDULED_AT_FLAG={'name':a57_0xa0a9e4(0x14c),'type':a57_0xa0a9e4(0x16d),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a57_0xa0a9e4(0x172),'type':a57_0xa0a9e4(0x16d),'required':!![],'description':a57_0xa0a9e4(0x160)},PROMPT_FLAG={'name':'prompt','type':a57_0xa0a9e4(0x16d),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},MODEL_FLAG={'name':a57_0xa0a9e4(0x188),'type':'string','enum':[a57_0xa0a9e4(0x178),a57_0xa0a9e4(0x15c),a57_0xa0a9e4(0x14d)],'default':'deepseek-v4-flash-0731','description':a57_0xa0a9e4(0x152)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a57_0xa0a9e4(0x16d),'required':!![],'description':a57_0xa0a9e4(0x185),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a57_0xa0a9e4(0x144)}},LIMIT_FLAG={'name':a57_0xa0a9e4(0x180),'type':a57_0xa0a9e4(0x17c),'default':0x14,'description':a57_0xa0a9e4(0x187)},CURSOR_FLAG={'name':a57_0xa0a9e4(0x177),'type':a57_0xa0a9e4(0x16d),'description':a57_0xa0a9e4(0x147)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,MODEL_FLAG];function a57_0x5543(){const _0x2ca458=['isSafeInteger','str','立即运行一次定时任务并创建\x20Task','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Schedule\x20kind:\x20CRON\x20or\x20ONCE','--title\x20must\x20not\x20be\x20blank.','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','\x20schedule\x20','description','删除定时任务并停止其后续触发','run','scheduled-at','deepseek-v4-pro-0813','Queued\x20Task\x20','340636kfhfZp','high-risk-write','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','Task\x20model\x20used\x20when\x20the\x20schedule\x20runs','DELETE','1146QaqCTa','3135IUjePN','schedule-id','1095972WMeNHo','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','read','UTC','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','deepseek-v4-flash-0731','validation','body','appCode','Schedule\x20title','kind','45370lWgSdw','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','19901aVAPXD','list','/schedules','cron','CRON','Created\x20','length','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','num','string','/api/harness/apps/','POST','9zoylkn','52KNLwQi','title','4137304EaJReh','304662vNsGht','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','prompt','cursor','kimi/k3','ONCE','trim','create','number','delete','schedule','35250WygsVf','limit','/run','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','build','Schedule\x20input\x20is\x20valid','Schedule\x20UUID','创建周期性或单次执行的\x20Agent\x20定时任务','Page\x20size\x20from\x201\x20to\x20100','model','scheduleId','Preview:\x20run\x20schedule\x20','Preview:\x20create\x20an\x20Agent\x20schedule'];a57_0x5543=function(){return _0x2ca458;};return a57_0x5543();}function readScheduleInput(_0x47baa1){const _0x172a8=a57_0xa0a9e4,_0x203337=_0x47baa1[_0x172a8(0x142)](_0x172a8(0x161)),_0x2484d3=_0x47baa1[_0x172a8(0x142)](_0x172a8(0x172))[_0x172a8(0x17a)](),_0x14159b=_0x47baa1[_0x172a8(0x142)](_0x172a8(0x176))['trim'](),_0x1f8187=_0x47baa1[_0x172a8(0x142)](_0x172a8(0x188)),_0x253cb3=_0x47baa1['str']('cron'),_0x1f0261=_0x47baa1[_0x172a8(0x142)](_0x172a8(0x14c));if(!_0x2484d3)throw CliErrors[_0x172a8(0x15d)](_0x172a8(0x146));if(!_0x14159b)throw CliErrors[_0x172a8(0x15d)]('--prompt\x20must\x20not\x20be\x20blank.');if(_0x203337===_0x172a8(0x168)){if(!_0x253cb3||_0x1f0261)throw CliErrors[_0x172a8(0x15d)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x203337,'timezone':_0x172a8(0x15a),'cron':_0x253cb3,'title':_0x2484d3,'prompt':_0x14159b,'model':_0x1f8187};}if(_0x203337===_0x172a8(0x179)){if(!_0x1f0261||_0x253cb3)throw CliErrors['validation'](_0x172a8(0x15b));return{'kind':_0x203337,'timezone':'UTC','scheduledAt':_0x1f0261,'title':_0x2484d3,'prompt':_0x14159b,'model':_0x1f8187};}throw CliErrors[_0x172a8(0x15d)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function scheduleCollectionPath(_0x2afaf6){const _0x4d4ee0=a57_0xa0a9e4;return _0x4d4ee0(0x16e)+encodeURIComponent(_0x2afaf6)+_0x4d4ee0(0x166);}function a57_0x1bda(_0x3a86c2,_0x4b21e9){_0x3a86c2=_0x3a86c2-0x13e;const _0x554393=a57_0x5543();let _0x1bda51=_0x554393[_0x3a86c2];return _0x1bda51;}function scheduleItemPath(_0x474e54,_0x5d2012){return scheduleCollectionPath(_0x474e54)+'/'+encodeURIComponent(_0x5d2012);}const scheduleValidate={'service':a57_0xa0a9e4(0x17e),'command':'validate','description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a57_0xa0a9e4(0x159),'flags':INPUT_FLAGS,async 'validate'(_0xae26b5){readScheduleInput(_0xae26b5);},async 'execute'(_0x59d799){const _0x23e288=a57_0xa0a9e4,_0x14f5f3=readScheduleInput(_0x59d799),_0x3ce1fd=await validateRuntimeSchedule(_0x59d799[_0x23e288(0x15f)],_0x14f5f3);return{'ok':!![],'data':_0x3ce1fd,'message':_0x23e288(0x184)};}},scheduleCreate={'service':a57_0xa0a9e4(0x17e),'command':a57_0xa0a9e4(0x17b),'description':a57_0xa0a9e4(0x186),'risk':a57_0xa0a9e4(0x150),'confirmationDescription':a57_0xa0a9e4(0x163),'flags':INPUT_FLAGS,async 'validate'(_0x2e54b4){readScheduleInput(_0x2e54b4);},async 'execute'(_0x49511b){const _0x48cff9=a57_0xa0a9e4,_0x46c2e7=readScheduleInput(_0x49511b),_0x326a9e=await validateRuntimeSchedule(_0x49511b[_0x48cff9(0x15f)],_0x46c2e7),_0x3c0e37=await createRuntimeSchedule(_0x49511b[_0x48cff9(0x15f)],_0x326a9e);return{'ok':!![],'data':_0x3c0e37,'message':_0x48cff9(0x169)+_0x3c0e37['kind']+_0x48cff9(0x148)+_0x3c0e37[_0x48cff9(0x13e)]};},async 'dryRun'(_0x59937e){const _0x4b169e=a57_0xa0a9e4,_0x28a697=readScheduleInput(_0x59937e);return dryRun(_0x4b169e(0x16f),scheduleCollectionPath(_0x59937e[_0x4b169e(0x15f)]))[_0x4b169e(0x15e)](_0x28a697)[_0x4b169e(0x149)](_0x4b169e(0x140))[_0x4b169e(0x183)]();}},scheduleList={'service':'schedule','command':a57_0xa0a9e4(0x165),'description':a57_0xa0a9e4(0x182),'risk':a57_0xa0a9e4(0x159),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3747f0){const _0x197592=a57_0xa0a9e4,_0x2b37b7=_0x3747f0[_0x197592(0x16c)](_0x197592(0x180));if(!Number[_0x197592(0x141)](_0x2b37b7)||_0x2b37b7<0x1||_0x2b37b7>0x64)throw CliErrors[_0x197592(0x15d)](_0x197592(0x175));const _0x18e010=_0x3747f0[_0x197592(0x142)](_0x197592(0x177));if(_0x18e010&&(_0x18e010[_0x197592(0x16a)]>0x400||_0x18e010[_0x197592(0x17a)]()!==_0x18e010))throw CliErrors[_0x197592(0x15d)](_0x197592(0x16b));},async 'execute'(_0xed296b){const _0x56b97c=a57_0xa0a9e4,_0x40ac58=_0xed296b[_0x56b97c(0x142)](_0x56b97c(0x177)),_0x33249e=await listRuntimeSchedules(_0xed296b[_0x56b97c(0x15f)],{'kind':_0xed296b['str']('kind'),'limit':_0xed296b[_0x56b97c(0x16c)](_0x56b97c(0x180)),..._0x40ac58?{'cursor':_0x40ac58}:{}});return{'ok':!![],'data':_0x33249e};}},scheduleDetail={'service':a57_0xa0a9e4(0x17e),'command':'detail','description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a57_0xa0a9e4(0x159),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x412718){const _0x516eaa=a57_0xa0a9e4,_0x157ba3=await getRuntimeSchedule(_0x412718[_0x516eaa(0x15f)],_0x412718[_0x516eaa(0x142)](_0x516eaa(0x156)));return{'ok':!![],'data':_0x157ba3};}},scheduleRun={'service':a57_0xa0a9e4(0x17e),'command':a57_0xa0a9e4(0x14b),'description':a57_0xa0a9e4(0x143),'risk':a57_0xa0a9e4(0x150),'confirmationDescription':'将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x594c3e){const _0x518852=a57_0xa0a9e4,_0x47a289=_0x594c3e[_0x518852(0x142)](_0x518852(0x156)),_0x5e69e6=await runRuntimeSchedule(_0x594c3e[_0x518852(0x15f)],_0x47a289);return{'ok':!![],'data':_0x5e69e6,'message':_0x518852(0x14e)+_0x5e69e6['taskId']+'\x20from\x20schedule\x20'+_0x47a289};},async 'dryRun'(_0x388c06){const _0x54c873=a57_0xa0a9e4,_0x14ca9c=_0x388c06[_0x54c873(0x142)](_0x54c873(0x156));return dryRun(_0x54c873(0x16f),scheduleItemPath(_0x388c06['appCode'],_0x14ca9c)+_0x54c873(0x181))[_0x54c873(0x149)](_0x54c873(0x13f)+_0x14ca9c+'\x20immediately')['build']();}},scheduleDelete={'service':a57_0xa0a9e4(0x17e),'command':a57_0xa0a9e4(0x17d),'description':a57_0xa0a9e4(0x14a),'risk':a57_0xa0a9e4(0x150),'confirmationDescription':a57_0xa0a9e4(0x151),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1672aa){const _0x290f02=a57_0xa0a9e4,_0x4b978d=_0x1672aa[_0x290f02(0x142)](_0x290f02(0x156)),_0x4add8e=await deleteRuntimeSchedule(_0x1672aa[_0x290f02(0x15f)],_0x4b978d);return{'ok':!![],'data':_0x4add8e,'message':'Deleted\x20schedule\x20'+_0x4b978d};},async 'dryRun'(_0x4e0127){const _0x47350c=a57_0xa0a9e4,_0x4008b0=_0x4e0127['str'](_0x47350c(0x156));return dryRun(_0x47350c(0x153),scheduleItemPath(_0x4e0127['appCode'],_0x4008b0))[_0x47350c(0x149)]('Preview:\x20delete\x20schedule\x20'+_0x4008b0)[_0x47350c(0x183)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a58_0x49f701=a58_0x2f18;(function(_0xf0c05b,_0x163218){const _0x4ac333=a58_0x2f18,_0x26ec2f=_0xf0c05b();while(!![]){try{const _0x2f0188=-parseInt(_0x4ac333(0xc6))/0x1+-parseInt(_0x4ac333(0xc5))/0x2*(-parseInt(_0x4ac333(0xce))/0x3)+-parseInt(_0x4ac333(0xcc))/0x4+parseInt(_0x4ac333(0xc9))/0x5+-parseInt(_0x4ac333(0xc7))/0x6*(-parseInt(_0x4ac333(0xcb))/0x7)+-parseInt(_0x4ac333(0xcd))/0x8*(parseInt(_0x4ac333(0xca))/0x9)+parseInt(_0x4ac333(0xc8))/0xa;if(_0x2f0188===_0x163218)break;else _0x26ec2f['push'](_0x26ec2f['shift']());}catch(_0x21fa50){_0x26ec2f['push'](_0x26ec2f['shift']());}}}(a58_0x315a,0x9b851));import{buildSchemaPayload}from'../framework/schema-export.js';function a58_0x315a(){const _0x1ca656=['46efmXgR','137287yJGKfs','6qfmPXy','3135120bDvLeD','4923940XQXetW','3243267BTTtZN','2675876aNATbz','3726208SnFKBY','24nKMbQz','144309rIVcIK','export','Export\x20machine-readable\x20command\x20schema\x20(JSON)'];a58_0x315a=function(){return _0x1ca656;};return a58_0x315a();}function a58_0x2f18(_0xcd91f,_0x2ae05b){_0xcd91f=_0xcd91f-0xc5;const _0x315ad4=a58_0x315a();let _0x2f186b=_0x315ad4[_0xcd91f];return _0x2f186b;}async function execute(_0x5bcb70){const _0x3a935e=await buildSchemaPayload();return{'ok':!![],'data':_0x3a935e};}export const schemaDefinition={'service':'schema','command':a58_0x49f701(0xcf),'description':a58_0x49f701(0xd0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a58_0x4f14ee=a58_0x5b8a;(function(_0x213137,_0x24cfca){const _0x4584a2=a58_0x5b8a,_0x197ed0=_0x213137();while(!![]){try{const _0x58cbc8=-parseInt(_0x4584a2(0x1f4))/0x1+-parseInt(_0x4584a2(0x1f5))/0x2*(-parseInt(_0x4584a2(0x1f2))/0x3)+parseInt(_0x4584a2(0x1f7))/0x4+-parseInt(_0x4584a2(0x1f6))/0x5+parseInt(_0x4584a2(0x1fa))/0x6+parseInt(_0x4584a2(0x1f3))/0x7*(-parseInt(_0x4584a2(0x1f8))/0x8)+-parseInt(_0x4584a2(0x1f9))/0x9*(-parseInt(_0x4584a2(0x1fe))/0xa);if(_0x58cbc8===_0x24cfca)break;else _0x197ed0['push'](_0x197ed0['shift']());}catch(_0x1089bc){_0x197ed0['push'](_0x197ed0['shift']());}}}(a58_0x12d5,0x3e3f7));function a58_0x5b8a(_0x5587b6,_0x10157f){_0x5587b6=_0x5587b6-0x1f1;const _0x12d5f6=a58_0x12d5();let _0x5b8a52=_0x12d5f6[_0x5587b6];return _0x5b8a52;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0xddd00f){const _0x1cc992=await buildSchemaPayload();return{'ok':!![],'data':_0x1cc992};}export const schemaDefinition={'service':a58_0x4f14ee(0x1f1),'command':a58_0x4f14ee(0x1fb),'description':a58_0x4f14ee(0x1fc),'risk':a58_0x4f14ee(0x1fd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a58_0x12d5(){const _0x198618=['schema','2253GSmLTH','9051eiAxnF','73070iHFutT','838UQgEAC','2264030VcQufH','1814244KpVXtv','3008FSpRSr','614727nzyxML','123960YxSdWP','export','Export\x20machine-readable\x20command\x20schema\x20(JSON)','read','70wAIThx'];a58_0x12d5=function(){return _0x198618;};return a58_0x12d5();}
@@ -1 +1 @@
1
- function a59_0x2fc9(_0x1e8a4b,_0xbf428a){_0x1e8a4b=_0x1e8a4b-0x164;const _0x55e55a=a59_0x55e5();let _0x2fc92c=_0x55e55a[_0x1e8a4b];return _0x2fc92c;}(function(_0x5b2395,_0x492300){const _0x5a7c6a=a59_0x2fc9,_0x5808b6=_0x5b2395();while(!![]){try{const _0x44be90=parseInt(_0x5a7c6a(0x19a))/0x1+parseInt(_0x5a7c6a(0x1bb))/0x2*(parseInt(_0x5a7c6a(0x191))/0x3)+parseInt(_0x5a7c6a(0x186))/0x4*(parseInt(_0x5a7c6a(0x1b0))/0x5)+-parseInt(_0x5a7c6a(0x198))/0x6+-parseInt(_0x5a7c6a(0x1bc))/0x7+parseInt(_0x5a7c6a(0x19d))/0x8+-parseInt(_0x5a7c6a(0x1aa))/0x9;if(_0x44be90===_0x492300)break;else _0x5808b6['push'](_0x5808b6['shift']());}catch(_0x15f007){_0x5808b6['push'](_0x5808b6['shift']());}}}(a59_0x55e5,0xcf5c0));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(_0x5c8fed,_0x287d3d){const _0x3a3aca=a59_0x2fc9,_0x3769e0=listLocalServiceTrees();let _0x519629;for(const _0x365980 of _0x3769e0){const _0x1ecdf5=matchServiceTreeCommand(_0x365980,_0x5c8fed);if(!_0x1ecdf5)continue;(!_0x519629||_0x1ecdf5['command']['fullPath'][_0x3a3aca(0x19e)]>_0x519629[_0x3a3aca(0x18d)][_0x3a3aca(0x177)][_0x3a3aca(0x19e)])&&(_0x519629={'tree':_0x365980,'command':_0x1ecdf5[_0x3a3aca(0x18d)],'remainingArgs':_0x1ecdf5[_0x3a3aca(0x17f)]});}if(!_0x519629)return undefined;const _0x5d84fb={..._0x287d3d};return applyAppBinding(_0x519629[_0x3a3aca(0x19b)],_0x519629[_0x3a3aca(0x18d)],_0x5d84fb),{'definition':buildDynamicCommandDefinition(_0x519629[_0x3a3aca(0x19b)],_0x519629['command']),'args':_0x519629[_0x3a3aca(0x17f)],'flags':_0x5d84fb,'tree':_0x519629[_0x3a3aca(0x19b)],'command':_0x519629['command']};}export function generateDynamicServiceHelp(_0x2ed6ce){const _0x2bb3f2=a59_0x2fc9,_0x5136c4=listLocalServiceTrees()[_0x2bb3f2(0x1b3)](_0x2ba2bf=>_0x2ba2bf[_0x2bb3f2(0x1a3)][_0x2bb3f2(0x1a8)]===_0x2ed6ce);if(!_0x5136c4)return undefined;const _0x2835d7=[CLI_BIN_NAME+'\x20'+_0x2ed6ce+'\x20<command>\x20[flags]','',_0x5136c4[_0x2bb3f2(0x1a3)][_0x2bb3f2(0x168)]||_0x2ed6ce,_0x5136c4[_0x2bb3f2(0x1a3)]['description']?'\x20\x20'+_0x5136c4[_0x2bb3f2(0x1a3)][_0x2bb3f2(0x17a)]:'','',_0x2bb3f2(0x174),..._0x5136c4[_0x2bb3f2(0x1c2)]['map'](_0x26ab4a=>{const _0x153827=_0x2bb3f2,_0x4de805=_0x26ab4a[_0x153827(0x177)]['slice'](0x1)[_0x153827(0x1b8)]('\x20'),_0x3ff688=_0x26ab4a[_0x153827(0x1be)]===_0x153827(0x16a)?'':'\x20['+_0x26ab4a[_0x153827(0x1be)]+']';return'\x20\x20'+_0x4de805[_0x153827(0x164)](0x18)+'\x20'+(_0x26ab4a[_0x153827(0x17a)]||'')+_0x3ff688;}),'',_0x2bb3f2(0x18b)+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x2ed6ce+'`\x20to\x20inspect\x20the\x20manifest.'][_0x2bb3f2(0x16b)](Boolean);return _0x2835d7[_0x2bb3f2(0x1b8)]('\x0a');}export function listDynamicServiceEntries(){const _0x430fc3=a59_0x2fc9;return listLocalServices()[_0x430fc3(0x184)](_0xb08c78=>{const _0x1192ce=_0x430fc3,_0x309985=_0xb08c78[_0x1192ce(0x199)];return{'service':_0x309985['service'][_0x1192ce(0x1a8)],'label':_0x309985['service'][_0x1192ce(0x168)]||_0x309985[_0x1192ce(0x1a3)][_0x1192ce(0x1a8)],'commands':_0x309985['commands'][_0x1192ce(0x184)](_0x1143e1=>({'command':dynamicCommandName(_0x1143e1),'description':_0x1143e1[_0x1192ce(0x17a)]||'Run\x20service\x20command\x20'+_0x1143e1[_0x1192ce(0x1c4)],'tag':riskTag(_0x1143e1[_0x1192ce(0x1be)])}))};});}export function getDynamicServiceEntry(_0x5d0616){const _0x5e15a4=a59_0x2fc9;return listDynamicServiceEntries()[_0x5e15a4(0x1b3)](_0x45e6cf=>_0x45e6cf[_0x5e15a4(0x1a3)]===_0x5d0616);}export function listDynamicServiceDefinitions(_0x5c4f3e){const _0xcb4c02=a59_0x2fc9;return listLocalServiceTrees()[_0xcb4c02(0x16b)](_0x542d4e=>!_0x5c4f3e||_0x542d4e['service'][_0xcb4c02(0x1a8)]===_0x5c4f3e)[_0xcb4c02(0x16d)](_0xcbb35d=>_0xcbb35d[_0xcb4c02(0x1c2)][_0xcb4c02(0x184)](_0x5939f9=>buildDynamicCommandDefinition(_0xcbb35d,_0x5939f9)));}export function getDynamicServiceDefinitions(_0x51cc1d){const _0x1f3747=a59_0x2fc9,_0x486516=listDynamicServiceDefinitions(_0x51cc1d);return _0x486516[_0x1f3747(0x19e)]>0x0?_0x486516:undefined;}function a59_0x55e5(){const _0x498d7d=['tree','now','9705280NoMmek','length','username','source','cliName','bffCode','service','ctx.','\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20','Cannot\x20resolve\x20datatable\x20\x22','\x20requires\x20target.functionName.','code','\x20\x20MAP\x20TO','13755096VGVzYf','sql','dbtableConfig','nickName','loginName','datasetCode','224405ANJWvU','scriptName','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','find','flags','json','employeeId','SERVICE_TREE','join','boolean','userName','429172qwzXPn','8610924RHOSvP','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','risk','\x20requires\x20target.sqlCode.','enum','some','commands','\x20\x20\x20\x20kind:\x20\x20\x20\x20','cliPath','sqlCode','startsWith','padEnd','entries','number','Run\x20service\x20command\x20','name','context.','read','filter','operator','flatMap','\x20\x20\x20\x20sqlCode:\x20','validation','\x20\x20[','Service\x20command\x20','该命令被清单标记为写入,可能修改业务数据或服务状态。','appCode','Commands:','appRef','\x22\x20in\x20service\x20command\x20','fullPath','type','default','description','trim','userId','tableName','Unsupported\x20service\x20target\x20kind:\x20','remainingArgs','app','envName','datatable','rawFlags','map','appcode','116sfAduL','target','args','nickname','required','Use\x20`','params','command','push','\x20\x20\x20\x20datatable:\x20','string','15rMVyhd','Unknown\x20appRef\x20\x22','env','mapTo','kind','\x20\x20\x20\x20','bffId','5533998yTOGPb','normalizedManifest','942514aAhTmd'];a59_0x55e5=function(){return _0x498d7d;};return a59_0x55e5();}export function findDynamicServiceDefinition(_0x3e0ba3,_0x444b05){const _0x215f14=a59_0x2fc9;return listDynamicServiceDefinitions(_0x3e0ba3)['find'](_0x500f95=>_0x500f95[_0x215f14(0x18d)]===_0x444b05);}export function buildDynamicCommandDefinition(_0x491203,_0x1f342e){const _0x157f17=a59_0x2fc9;return{'service':_0x491203[_0x157f17(0x1a3)]['code'],'command':dynamicCommandName(_0x1f342e),'description':_0x1f342e['description']||_0x157f17(0x167)+_0x1f342e['cliPath'],'risk':_0x1f342e[_0x157f17(0x1be)],..._0x1f342e['risk']==='read'?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x1f342e)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x1f342e[_0x157f17(0x188)]['map'](_0x333590=>({'name':_0x333590[_0x157f17(0x168)],'description':_0x333590[_0x157f17(0x17a)]||_0x333590['name'],'required':_0x333590[_0x157f17(0x18a)]})),'flags':_0x1f342e[_0x157f17(0x1b4)]['map'](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x1f342e),async 'dryRun'(_0x1376a7){const _0x50459e=_0x157f17,_0xdaf894=await compilePlan(_0x1f342e,_0x1376a7);return{'method':_0x50459e(0x1b7),'url':_0x1f342e[_0x50459e(0x1c4)],'body':{'target':targetPreview(_0xdaf894),'params':_0xdaf894[_0x50459e(0x18c)]},'description':'Preview\x20dynamic\x20service\x20command:\x20'+_0x1f342e[_0x50459e(0x1c4)]};},async 'execute'(_0x39f50b){const _0xe062f2=_0x157f17,_0x519dde=await compilePlan(_0x1f342e,_0x39f50b),_0x1fcc3f=Date['now'](),_0xa2498c=await executePlan(_0x519dde,_0x1f342e,_0x39f50b),_0x4c1e4c=Date[_0xe062f2(0x19c)]()-_0x1fcc3f;return{'ok':!![],'data':{'service':_0x491203[_0xe062f2(0x1a3)],'command':_0x1f342e['cliPath'],'target':targetPreview(_0x519dde),'result':_0xa2498c,'elapsed':_0x4c1e4c},'message':_0xe062f2(0x171)+_0x1f342e['cliPath']+'\x20completed\x20in\x20'+_0x4c1e4c+'ms'};}};}function buildDynamicConfirmationDescription(_0x294f63){const _0x2017bc=a59_0x2fc9,_0x4880bd=_0x294f63[_0x2017bc(0x17a)]||_0x294f63[_0x2017bc(0x1c4)],_0x3c57b5=_0x294f63['risk']==='high-risk-write'?'该命令被清单标记为高风险写入,可能产生难以恢复的业务变更。':_0x2017bc(0x172);return'将通过\x20Service\x20Tree\x20执行“'+_0x4880bd+'”。'+_0x3c57b5;}function dynamicCommandName(_0x400c80){const _0x229645=a59_0x2fc9;return _0x400c80['fullPath']['slice'](0x1)[_0x229645(0x1b8)]('\x20');}function riskTag(_0x1d7b4){const _0x13c1b3=a59_0x2fc9;return _0x1d7b4===_0x13c1b3(0x16a)?'':_0x13c1b3(0x170)+_0x1d7b4+']';}function flagToCommandFlag(_0xc9f04c){const _0x5b695e=a59_0x2fc9;return{'name':_0xc9f04c[_0x5b695e(0x1a1)],'type':_0xc9f04c[_0x5b695e(0x178)]===_0x5b695e(0x1b5)?_0x5b695e(0x190):_0xc9f04c[_0x5b695e(0x178)],'description':_0xc9f04c['description']||_0xc9f04c[_0x5b695e(0x168)],'required':_0xc9f04c['required'],'default':isPrimitiveFlagDefault(_0xc9f04c[_0x5b695e(0x179)])?_0xc9f04c[_0x5b695e(0x179)]:undefined,'enum':_0xc9f04c[_0x5b695e(0x1c0)]};}async function compilePlan(_0x4ed87e,_0x372d0b){const _0x4ed86e=a59_0x2fc9;return compileServiceTreeCommand(_0x4ed87e,{'flags':_0x372d0b[_0x4ed86e(0x183)],'args':_0x372d0b[_0x4ed86e(0x188)],'context':await buildServiceContext(_0x4ed87e,_0x372d0b)});}async function buildServiceContext(_0x791c9f,_0x2fa6e7){const _0x452c28=a59_0x2fc9,_0x56704e={'appCode':_0x2fa6e7[_0x452c28(0x173)],'env':_0x2fa6e7[_0x452c28(0x181)],'envName':_0x2fa6e7[_0x452c28(0x181)]};if(!usesRuntimeContext(_0x791c9f))return _0x56704e;const _0x51fe=await getLoginUserInfo(),_0x530d46=pickFirst(_0x51fe[_0x452c28(0x17c)],_0x51fe['id']);return{..._0x56704e,'user':_0x51fe,'userId':_0x530d46,'id':_0x51fe['id'],'username':pickFirst(_0x51fe[_0x452c28(0x19f)],_0x51fe[_0x452c28(0x1ba)],_0x51fe[_0x452c28(0x1ae)]),'userName':_0x51fe[_0x452c28(0x1ba)],'nickname':pickFirst(_0x51fe[_0x452c28(0x189)],_0x51fe[_0x452c28(0x1ad)]),'nickName':_0x51fe[_0x452c28(0x1ad)],'tenantCode':_0x51fe['tenantCode'],'employeeId':_0x51fe[_0x452c28(0x1b6)]};}function usesRuntimeContext(_0x445426){const _0x2d03b6=a59_0x2fc9;return _0x445426['mapTo'][_0x2d03b6(0x1c1)](_0x23c57=>typeof _0x23c57['source']===_0x2d03b6(0x190)&&(_0x23c57[_0x2d03b6(0x1a0)]['startsWith'](_0x2d03b6(0x169))||_0x23c57[_0x2d03b6(0x1a0)][_0x2d03b6(0x1c6)](_0x2d03b6(0x1a4))));}function pickFirst(..._0x28b5e6){const _0x3045dc=a59_0x2fc9;return _0x28b5e6[_0x3045dc(0x1b3)](_0x1bc143=>_0x1bc143!==undefined&&_0x1bc143!==null);}async function executePlan(_0x8d25fc,_0x1f4498,_0x1138c0){const _0x2b105f=a59_0x2fc9;if(_0x8d25fc[_0x2b105f(0x195)]==='data'){const _0x1fbb95=await resolveDatasetCode(_0x8d25fc,_0x1f4498,_0x1138c0);return executeData(_0x1fbb95,_0x8d25fc[_0x2b105f(0x18d)],_0x8d25fc[_0x2b105f(0x18c)]);}if(_0x8d25fc[_0x2b105f(0x195)]===_0x2b105f(0x1ab)){if(!_0x8d25fc[_0x2b105f(0x1c5)])throw CliErrors[_0x2b105f(0x16f)](_0x2b105f(0x171)+_0x1f4498[_0x2b105f(0x1c4)]+_0x2b105f(0x1bf));return executeSdkSql(_0x8d25fc[_0x2b105f(0x1c5)],normalizeScalarParams(_0x8d25fc[_0x2b105f(0x18c)]));}if(_0x8d25fc[_0x2b105f(0x195)]==='bff'){const _0x35a602=_0x8d25fc['scriptName']||_0x8d25fc[_0x2b105f(0x1a2)]||(_0x8d25fc[_0x2b105f(0x197)]==null?'':String(_0x8d25fc[_0x2b105f(0x197)]));if(!_0x35a602)throw CliErrors[_0x2b105f(0x16f)](_0x2b105f(0x171)+_0x1f4498['cliPath']+_0x2b105f(0x1a7));return executeSdkBff(_0x35a602,_0x8d25fc['params']);}throw CliErrors['validation'](_0x2b105f(0x17e)+_0x8d25fc[_0x2b105f(0x195)]);}async function resolveDatasetCode(_0x2f1caf,_0x523cd7,_0x45cfe5){const _0x178a22=a59_0x2fc9;if(_0x2f1caf[_0x178a22(0x1af)])return _0x2f1caf[_0x178a22(0x1af)];if(!_0x2f1caf[_0x178a22(0x182)])throw CliErrors[_0x178a22(0x16f)]('Service\x20command\x20'+_0x523cd7[_0x178a22(0x1c4)]+_0x178a22(0x1b2));const _0x44ac59=await listDatasets(_0x45cfe5[_0x178a22(0x173)]),_0x20ae3f=_0x44ac59[_0x178a22(0x1b3)](_0x155ad5=>_0x155ad5[_0x178a22(0x1ac)]?.[_0x178a22(0x17d)]===_0x2f1caf[_0x178a22(0x182)]);if(!_0x20ae3f?.[_0x178a22(0x1a8)])throw CliErrors[_0x178a22(0x16f)](_0x178a22(0x1a6)+_0x2f1caf[_0x178a22(0x182)]+_0x178a22(0x1a5)+_0x45cfe5['appCode']+'.','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.');return _0x20ae3f[_0x178a22(0x1a8)];}function applyAppBinding(_0x47f2c0,_0x2560cd,_0x2af5d7){const _0x230f61=a59_0x2fc9,_0x596dd1=_0x2560cd[_0x230f61(0x187)][_0x230f61(0x175)];if(!_0x596dd1)return;const _0x3529de=_0x47f2c0['appBindings'][_0x596dd1];if(!_0x3529de)throw CliErrors[_0x230f61(0x16f)](_0x230f61(0x192)+_0x596dd1+_0x230f61(0x176)+_0x2560cd['cliPath']+'.',_0x230f61(0x1bd));const _0x4e4aef=_0x3529de[_0x230f61(0x185)]||_0x3529de[_0x230f61(0x173)];_0x4e4aef&&!hasText(_0x2af5d7['appcode'])&&(_0x2af5d7['appcode']=_0x4e4aef),_0x3529de[_0x230f61(0x180)]&&!hasText(_0x2af5d7[_0x230f61(0x180)])&&!hasText(_0x2af5d7['appcode'])&&(_0x2af5d7[_0x230f61(0x180)]=_0x3529de[_0x230f61(0x180)]),_0x3529de[_0x230f61(0x193)]&&!hasText(_0x2af5d7[_0x230f61(0x193)])&&(_0x2af5d7[_0x230f61(0x193)]=_0x3529de[_0x230f61(0x193)]);}function renderDynamicCommandHelp(_0x1578be){const _0x54dcd7=a59_0x2fc9,_0x5e075c=['\x20\x20SERVICE\x20TREE\x20TARGET',_0x54dcd7(0x1c3)+_0x1578be[_0x54dcd7(0x187)]['kind'],'\x20\x20\x20\x20command:\x20'+_0x1578be[_0x54dcd7(0x187)][_0x54dcd7(0x18d)]];if(_0x1578be['target'][_0x54dcd7(0x1af)])_0x5e075c[_0x54dcd7(0x18e)]('\x20\x20\x20\x20datasetCode:\x20'+_0x1578be[_0x54dcd7(0x187)][_0x54dcd7(0x1af)]);if(_0x1578be[_0x54dcd7(0x187)]['datatable'])_0x5e075c['push'](_0x54dcd7(0x18f)+_0x1578be[_0x54dcd7(0x187)][_0x54dcd7(0x182)]);if(_0x1578be[_0x54dcd7(0x187)][_0x54dcd7(0x1c5)])_0x5e075c['push'](_0x54dcd7(0x16e)+_0x1578be[_0x54dcd7(0x187)]['sqlCode']);if(_0x1578be[_0x54dcd7(0x187)]['scriptName'])_0x5e075c[_0x54dcd7(0x18e)]('\x20\x20\x20\x20functionName:\x20'+_0x1578be[_0x54dcd7(0x187)][_0x54dcd7(0x1b1)]);if(_0x1578be[_0x54dcd7(0x194)][_0x54dcd7(0x19e)]>0x0){_0x5e075c['push']('',_0x54dcd7(0x1a9));for(const _0x197659 of _0x1578be[_0x54dcd7(0x194)]){_0x5e075c[_0x54dcd7(0x18e)](_0x54dcd7(0x196)+(_0x197659[_0x54dcd7(0x1a0)]||'const')+'\x20->\x20'+_0x197659[_0x54dcd7(0x187)]+(_0x197659[_0x54dcd7(0x16c)]?'.'+_0x197659['operator']:''));}}return _0x5e075c[_0x54dcd7(0x1b8)]('\x0a');}function targetPreview(_0x27bd22){const _0x21d2bc=a59_0x2fc9;return{'kind':_0x27bd22['kind'],'command':_0x27bd22[_0x21d2bc(0x18d)],'appRef':_0x27bd22[_0x21d2bc(0x175)],'datasetCode':_0x27bd22['datasetCode'],'datatable':_0x27bd22[_0x21d2bc(0x182)],'sqlCode':_0x27bd22['sqlCode'],'bffCode':_0x27bd22['bffCode'],'bffId':_0x27bd22[_0x21d2bc(0x197)],'functionName':_0x27bd22['scriptName']};}function normalizeScalarParams(_0x475618){const _0x4e369e=a59_0x2fc9;return Object['fromEntries'](Object[_0x4e369e(0x165)](_0x475618)[_0x4e369e(0x16b)](([,_0x4f1917])=>typeof _0x4f1917===_0x4e369e(0x190)||typeof _0x4f1917===_0x4e369e(0x166)));}function hasText(_0x53d151){const _0x1aa1d3=a59_0x2fc9;return typeof _0x53d151===_0x1aa1d3(0x190)&&_0x53d151[_0x1aa1d3(0x17b)]()[_0x1aa1d3(0x19e)]>0x0;}function isPrimitiveFlagDefault(_0x2f4a50){const _0x2898d=a59_0x2fc9;return _0x2f4a50===undefined||typeof _0x2f4a50===_0x2898d(0x190)||typeof _0x2f4a50===_0x2898d(0x166)||typeof _0x2f4a50===_0x2898d(0x1b9);}
1
+ function a59_0x40ca(_0x55eb25,_0x58cc35){_0x55eb25=_0x55eb25-0x118;const _0x1d30f7=a59_0x1d30();let _0x40ca6d=_0x1d30f7[_0x55eb25];return _0x40ca6d;}(function(_0x2d00bf,_0x696f91){const _0x369e21=a59_0x40ca,_0x23b65c=_0x2d00bf();while(!![]){try{const _0xffeed5=parseInt(_0x369e21(0x171))/0x1*(parseInt(_0x369e21(0x175))/0x2)+-parseInt(_0x369e21(0x12f))/0x3+parseInt(_0x369e21(0x17a))/0x4+parseInt(_0x369e21(0x170))/0x5+parseInt(_0x369e21(0x128))/0x6*(-parseInt(_0x369e21(0x148))/0x7)+-parseInt(_0x369e21(0x167))/0x8+parseInt(_0x369e21(0x164))/0x9*(parseInt(_0x369e21(0x177))/0xa);if(_0xffeed5===_0x696f91)break;else _0x23b65c['push'](_0x23b65c['shift']());}catch(_0x22f4ac){_0x23b65c['push'](_0x23b65c['shift']());}}}(a59_0x1d30,0x9c603));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(_0x27f2df,_0x4b050a){const _0x3e3367=a59_0x40ca,_0x295e8f=listLocalServiceTrees();let _0x429085;for(const _0x3ab033 of _0x295e8f){const _0x2bf049=matchServiceTreeCommand(_0x3ab033,_0x27f2df);if(!_0x2bf049)continue;(!_0x429085||_0x2bf049[_0x3e3367(0x168)][_0x3e3367(0x157)][_0x3e3367(0x135)]>_0x429085[_0x3e3367(0x168)][_0x3e3367(0x157)][_0x3e3367(0x135)])&&(_0x429085={'tree':_0x3ab033,'command':_0x2bf049[_0x3e3367(0x168)],'remainingArgs':_0x2bf049[_0x3e3367(0x141)]});}if(!_0x429085)return undefined;const _0x7599f0={..._0x4b050a};return applyAppBinding(_0x429085[_0x3e3367(0x130)],_0x429085[_0x3e3367(0x168)],_0x7599f0),{'definition':buildDynamicCommandDefinition(_0x429085['tree'],_0x429085[_0x3e3367(0x168)]),'args':_0x429085[_0x3e3367(0x141)],'flags':_0x7599f0,'tree':_0x429085[_0x3e3367(0x130)],'command':_0x429085[_0x3e3367(0x168)]};}export function generateDynamicServiceHelp(_0x24ca3f){const _0x2160be=a59_0x40ca,_0x4955d9=listLocalServiceTrees()[_0x2160be(0x149)](_0x576e8a=>_0x576e8a[_0x2160be(0x13c)][_0x2160be(0x163)]===_0x24ca3f);if(!_0x4955d9)return undefined;const _0x38a532=[CLI_BIN_NAME+'\x20'+_0x24ca3f+'\x20<command>\x20[flags]','',_0x4955d9[_0x2160be(0x13c)][_0x2160be(0x14c)]||_0x24ca3f,_0x4955d9[_0x2160be(0x13c)]['description']?'\x20\x20'+_0x4955d9['service'][_0x2160be(0x123)]:'','',_0x2160be(0x14e),..._0x4955d9[_0x2160be(0x178)][_0x2160be(0x142)](_0x680999=>{const _0x270c9a=_0x2160be,_0x46110a=_0x680999[_0x270c9a(0x157)][_0x270c9a(0x12e)](0x1)[_0x270c9a(0x137)]('\x20'),_0x2c67d0=_0x680999[_0x270c9a(0x179)]===_0x270c9a(0x166)?'':'\x20['+_0x680999[_0x270c9a(0x179)]+']';return'\x20\x20'+_0x46110a[_0x270c9a(0x127)](0x18)+'\x20'+(_0x680999[_0x270c9a(0x123)]||'')+_0x2c67d0;}),'','Use\x20`'+CLI_BIN_NAME+'\x20service\x20detail\x20--service\x20'+_0x24ca3f+_0x2160be(0x15f)][_0x2160be(0x13f)](Boolean);return _0x38a532[_0x2160be(0x137)]('\x0a');}export function listDynamicServiceEntries(){const _0x50bee3=a59_0x40ca;return listLocalServices()[_0x50bee3(0x142)](_0x32c641=>{const _0x167afa=_0x50bee3,_0x1f1ec3=_0x32c641['normalizedManifest'];return{'service':_0x1f1ec3[_0x167afa(0x13c)]['code'],'label':_0x1f1ec3[_0x167afa(0x13c)]['name']||_0x1f1ec3[_0x167afa(0x13c)][_0x167afa(0x163)],'commands':_0x1f1ec3[_0x167afa(0x178)][_0x167afa(0x142)](_0x33c1fd=>({'command':dynamicCommandName(_0x33c1fd),'description':_0x33c1fd[_0x167afa(0x123)]||_0x167afa(0x11c)+_0x33c1fd['cliPath'],'tag':riskTag(_0x33c1fd['risk'])}))};});}export function getDynamicServiceEntry(_0x11196f){const _0x12bcea=a59_0x40ca;return listDynamicServiceEntries()[_0x12bcea(0x149)](_0x4aa54d=>_0x4aa54d[_0x12bcea(0x13c)]===_0x11196f);}export function listDynamicServiceDefinitions(_0x3ada17){const _0x469643=a59_0x40ca;return listLocalServiceTrees()[_0x469643(0x13f)](_0xc9b03f=>!_0x3ada17||_0xc9b03f[_0x469643(0x13c)][_0x469643(0x163)]===_0x3ada17)[_0x469643(0x138)](_0x2a926c=>_0x2a926c[_0x469643(0x178)][_0x469643(0x142)](_0x9fe3a8=>buildDynamicCommandDefinition(_0x2a926c,_0x9fe3a8)));}export function getDynamicServiceDefinitions(_0xd1f890){const _0x55fddc=listDynamicServiceDefinitions(_0xd1f890);return _0x55fddc['length']>0x0?_0x55fddc:undefined;}export function findDynamicServiceDefinition(_0x637b2d,_0x522b90){const _0x3d0ea5=a59_0x40ca;return listDynamicServiceDefinitions(_0x637b2d)[_0x3d0ea5(0x149)](_0x100d19=>_0x100d19[_0x3d0ea5(0x168)]===_0x522b90);}export function buildDynamicCommandDefinition(_0x49058d,_0x211c93){const _0x47b6ff=a59_0x40ca;return{'service':_0x49058d[_0x47b6ff(0x13c)][_0x47b6ff(0x163)],'command':dynamicCommandName(_0x211c93),'description':_0x211c93[_0x47b6ff(0x123)]||_0x47b6ff(0x11c)+_0x211c93[_0x47b6ff(0x15b)],'risk':_0x211c93['risk'],..._0x211c93['risk']===_0x47b6ff(0x166)?{}:{'confirmationDescription':buildDynamicConfirmationDescription(_0x211c93)},'requiresAuth':!![],'requiresAppCode':!![],'args':_0x211c93[_0x47b6ff(0x152)][_0x47b6ff(0x142)](_0x2133c8=>({'name':_0x2133c8['name'],'description':_0x2133c8['description']||_0x2133c8['name'],'required':_0x2133c8[_0x47b6ff(0x173)]})),'flags':_0x211c93[_0x47b6ff(0x17b)][_0x47b6ff(0x142)](flagToCommandFlag),'helpExtra':()=>renderDynamicCommandHelp(_0x211c93),async 'dryRun'(_0x429da4){const _0x43cdef=_0x47b6ff,_0x4eb052=await compilePlan(_0x211c93,_0x429da4);return{'method':_0x43cdef(0x11a),'url':_0x211c93[_0x43cdef(0x15b)],'body':{'target':targetPreview(_0x4eb052),'params':_0x4eb052[_0x43cdef(0x133)]},'description':_0x43cdef(0x169)+_0x211c93[_0x43cdef(0x15b)]};},async 'execute'(_0x43cfd8){const _0x583ecc=_0x47b6ff,_0x234f97=await compilePlan(_0x211c93,_0x43cfd8),_0x25dd10=Date[_0x583ecc(0x12c)](),_0x3c29fe=await executePlan(_0x234f97,_0x211c93,_0x43cfd8),_0x3a16b7=Date[_0x583ecc(0x12c)]()-_0x25dd10;return{'ok':!![],'data':{'service':_0x49058d[_0x583ecc(0x13c)],'command':_0x211c93[_0x583ecc(0x15b)],'target':targetPreview(_0x234f97),'result':_0x3c29fe,'elapsed':_0x3a16b7},'message':_0x583ecc(0x14f)+_0x211c93[_0x583ecc(0x15b)]+_0x583ecc(0x174)+_0x3a16b7+'ms'};}};}function buildDynamicConfirmationDescription(_0x576ef2){const _0x340560=a59_0x40ca,_0x14d802=_0x576ef2[_0x340560(0x123)]||_0x576ef2[_0x340560(0x15b)],_0x5380ed=_0x576ef2[_0x340560(0x179)]==='high-risk-write'?_0x340560(0x120):'该命令被清单标记为写入,可能修改业务数据或服务状态。';return'将通过\x20Service\x20Tree\x20执行“'+_0x14d802+'”。'+_0x5380ed;}function dynamicCommandName(_0x3501ce){const _0x2bb2ac=a59_0x40ca;return _0x3501ce[_0x2bb2ac(0x157)][_0x2bb2ac(0x12e)](0x1)[_0x2bb2ac(0x137)]('\x20');}function riskTag(_0x3a222d){const _0x5781d0=a59_0x40ca;return _0x3a222d===_0x5781d0(0x166)?'':_0x5781d0(0x14a)+_0x3a222d+']';}function flagToCommandFlag(_0x4b77c1){const _0x21beec=a59_0x40ca;return{'name':_0x4b77c1[_0x21beec(0x140)],'type':_0x4b77c1[_0x21beec(0x12a)]===_0x21beec(0x119)?_0x21beec(0x126):_0x4b77c1['type'],'description':_0x4b77c1[_0x21beec(0x123)]||_0x4b77c1[_0x21beec(0x14c)],'required':_0x4b77c1['required'],'default':isPrimitiveFlagDefault(_0x4b77c1[_0x21beec(0x154)])?_0x4b77c1['default']:undefined,'enum':_0x4b77c1['enum']};}async function compilePlan(_0x1099ca,_0x114b4d){const _0x2da900=a59_0x40ca;return compileServiceTreeCommand(_0x1099ca,{'flags':_0x114b4d[_0x2da900(0x132)],'args':_0x114b4d[_0x2da900(0x152)],'context':await buildServiceContext(_0x1099ca,_0x114b4d)});}async function buildServiceContext(_0x354024,_0x1af6df){const _0x38bde9=a59_0x40ca,_0x2b22e5={'appCode':_0x1af6df['appCode'],'env':_0x1af6df[_0x38bde9(0x14d)],'envName':_0x1af6df[_0x38bde9(0x14d)]};if(!usesRuntimeContext(_0x354024))return _0x2b22e5;const _0x368c0c=await getLoginUserInfo(),_0xcd2d0d=pickFirst(_0x368c0c['userId'],_0x368c0c['id']);return{..._0x2b22e5,'user':_0x368c0c,'userId':_0xcd2d0d,'id':_0x368c0c['id'],'username':pickFirst(_0x368c0c[_0x38bde9(0x136)],_0x368c0c['userName'],_0x368c0c[_0x38bde9(0x16f)]),'userName':_0x368c0c[_0x38bde9(0x12d)],'nickname':pickFirst(_0x368c0c[_0x38bde9(0x176)],_0x368c0c[_0x38bde9(0x121)]),'nickName':_0x368c0c[_0x38bde9(0x121)],'tenantCode':_0x368c0c[_0x38bde9(0x122)],'employeeId':_0x368c0c[_0x38bde9(0x13d)]};}function usesRuntimeContext(_0x11c92e){const _0x2ab1c2=a59_0x40ca;return _0x11c92e[_0x2ab1c2(0x16b)][_0x2ab1c2(0x159)](_0x4e7b3d=>typeof _0x4e7b3d[_0x2ab1c2(0x16c)]==='string'&&(_0x4e7b3d[_0x2ab1c2(0x16c)][_0x2ab1c2(0x151)](_0x2ab1c2(0x153))||_0x4e7b3d[_0x2ab1c2(0x16c)][_0x2ab1c2(0x151)](_0x2ab1c2(0x11b))));}function pickFirst(..._0x86f937){const _0x4f1c38=a59_0x40ca;return _0x86f937[_0x4f1c38(0x149)](_0x5d80fe=>_0x5d80fe!==undefined&&_0x5d80fe!==null);}async function executePlan(_0x98d00d,_0x4dd2c8,_0x1efa02){const _0x1d61e0=a59_0x40ca;if(_0x98d00d[_0x1d61e0(0x162)]==='data'){const _0x60d4db=await resolveDatasetCode(_0x98d00d,_0x4dd2c8,_0x1efa02);return executeData(_0x60d4db,_0x98d00d[_0x1d61e0(0x168)],_0x98d00d['params']);}if(_0x98d00d[_0x1d61e0(0x162)]==='sql'){if(!_0x98d00d[_0x1d61e0(0x15d)])throw CliErrors[_0x1d61e0(0x144)]('Service\x20command\x20'+_0x4dd2c8[_0x1d61e0(0x15b)]+_0x1d61e0(0x139));return executeSdkSql(_0x98d00d[_0x1d61e0(0x15d)],normalizeScalarParams(_0x98d00d[_0x1d61e0(0x133)]));}if(_0x98d00d['kind']==='bff'){const _0xc197=_0x98d00d['scriptName']||_0x98d00d[_0x1d61e0(0x156)]||(_0x98d00d[_0x1d61e0(0x134)]==null?'':String(_0x98d00d[_0x1d61e0(0x134)]));if(!_0xc197)throw CliErrors[_0x1d61e0(0x144)](_0x1d61e0(0x14f)+_0x4dd2c8[_0x1d61e0(0x15b)]+'\x20requires\x20target.functionName.');return executeSdkBff(_0xc197,_0x98d00d[_0x1d61e0(0x133)]);}throw CliErrors[_0x1d61e0(0x144)](_0x1d61e0(0x146)+_0x98d00d[_0x1d61e0(0x162)]);}function a59_0x1d30(){const _0x2d910f=['args','context.','default','fromEntries','bffCode','fullPath','\x20\x20\x20\x20kind:\x20\x20\x20\x20','some','const','cliPath','env','sqlCode','\x20requires\x20target.datasetCode\x20or\x20target.datatable.','`\x20to\x20inspect\x20the\x20manifest.','Unknown\x20appRef\x20\x22','\x20\x20\x20\x20','kind','code','18ucuGBA','appCode','read','4094640lJWVDv','command','Preview\x20dynamic\x20service\x20command:\x20','appcode','mapTo','source','app','\x22\x20in\x20service\x20command\x20','loginName','5147625SjPGoi','26XhhDDT','number','required','\x20completed\x20in\x20','2854hQuNwD','nickname','717020pytGUb','commands','risk','3310160dJkpLl','flags','Define\x20the\x20appRef\x20under\x20appBindings\x20or\x20remove\x20target.appRef.','json','SERVICE_TREE','ctx.','Run\x20service\x20command\x20','\x20\x20SERVICE\x20TREE\x20TARGET','datasetCode','\x20\x20\x20\x20datasetCode:\x20','该命令被清单标记为高风险写入,可能产生难以恢复的业务变更。','nickName','tenantCode','description','appRef','\x20\x20\x20\x20datatable:\x20','string','padEnd','569598zJgQzR','\x20->\x20','type','\x20\x20\x20\x20sqlCode:\x20','now','userName','slice','2370879PlUasX','tree','\x20\x20\x20\x20functionName:\x20','rawFlags','params','bffId','length','username','join','flatMap','\x20requires\x20target.sqlCode.','dbtableConfig','target','service','employeeId','\x20\x20MAP\x20TO','filter','cliName','remainingArgs','map','Use\x20lovrabet\x20dataset\x20list\x20to\x20confirm\x20the\x20physical\x20table\x20name\x20or\x20add\x20target.datasetCode\x20to\x20the\x20manifest.','validation','scriptName','Unsupported\x20service\x20target\x20kind:\x20','boolean','7XsrUbR','find','\x20\x20[','datatable','name','envName','Commands:','Service\x20command\x20','push','startsWith'];a59_0x1d30=function(){return _0x2d910f;};return a59_0x1d30();}async function resolveDatasetCode(_0xa4f68d,_0x1dbb83,_0x191878){const _0x413642=a59_0x40ca;if(_0xa4f68d['datasetCode'])return _0xa4f68d[_0x413642(0x11e)];if(!_0xa4f68d[_0x413642(0x14b)])throw CliErrors['validation'](_0x413642(0x14f)+_0x1dbb83[_0x413642(0x15b)]+_0x413642(0x15e));const _0x3afa79=await listDatasets(_0x191878['appCode']),_0x3a3d70=_0x3afa79[_0x413642(0x149)](_0x529baf=>_0x529baf[_0x413642(0x13a)]?.['tableName']===_0xa4f68d[_0x413642(0x14b)]);if(!_0x3a3d70?.['code'])throw CliErrors[_0x413642(0x144)]('Cannot\x20resolve\x20datatable\x20\x22'+_0xa4f68d[_0x413642(0x14b)]+'\x22\x20to\x20a\x20datasetCode\x20in\x20app\x20'+_0x191878[_0x413642(0x165)]+'.',_0x413642(0x143));return _0x3a3d70[_0x413642(0x163)];}function applyAppBinding(_0x452f18,_0x2bb6ea,_0x39a94f){const _0xbcdfca=a59_0x40ca,_0x39c348=_0x2bb6ea[_0xbcdfca(0x13b)][_0xbcdfca(0x124)];if(!_0x39c348)return;const _0x19f90f=_0x452f18['appBindings'][_0x39c348];if(!_0x19f90f)throw CliErrors[_0xbcdfca(0x144)](_0xbcdfca(0x160)+_0x39c348+_0xbcdfca(0x16e)+_0x2bb6ea[_0xbcdfca(0x15b)]+'.',_0xbcdfca(0x118));const _0x47b4d2=_0x19f90f[_0xbcdfca(0x16a)]||_0x19f90f[_0xbcdfca(0x165)];_0x47b4d2&&!hasText(_0x39a94f[_0xbcdfca(0x16a)])&&(_0x39a94f['appcode']=_0x47b4d2),_0x19f90f['app']&&!hasText(_0x39a94f[_0xbcdfca(0x16d)])&&!hasText(_0x39a94f[_0xbcdfca(0x16a)])&&(_0x39a94f[_0xbcdfca(0x16d)]=_0x19f90f[_0xbcdfca(0x16d)]),_0x19f90f[_0xbcdfca(0x15c)]&&!hasText(_0x39a94f[_0xbcdfca(0x15c)])&&(_0x39a94f['env']=_0x19f90f['env']);}function renderDynamicCommandHelp(_0x54ead9){const _0x2c8855=a59_0x40ca,_0x481807=[_0x2c8855(0x11d),_0x2c8855(0x158)+_0x54ead9[_0x2c8855(0x13b)]['kind'],'\x20\x20\x20\x20command:\x20'+_0x54ead9[_0x2c8855(0x13b)][_0x2c8855(0x168)]];if(_0x54ead9['target'][_0x2c8855(0x11e)])_0x481807[_0x2c8855(0x150)](_0x2c8855(0x11f)+_0x54ead9[_0x2c8855(0x13b)][_0x2c8855(0x11e)]);if(_0x54ead9['target'][_0x2c8855(0x14b)])_0x481807['push'](_0x2c8855(0x125)+_0x54ead9[_0x2c8855(0x13b)][_0x2c8855(0x14b)]);if(_0x54ead9['target'][_0x2c8855(0x15d)])_0x481807['push'](_0x2c8855(0x12b)+_0x54ead9['target'][_0x2c8855(0x15d)]);if(_0x54ead9[_0x2c8855(0x13b)][_0x2c8855(0x145)])_0x481807[_0x2c8855(0x150)](_0x2c8855(0x131)+_0x54ead9[_0x2c8855(0x13b)]['scriptName']);if(_0x54ead9[_0x2c8855(0x16b)][_0x2c8855(0x135)]>0x0){_0x481807[_0x2c8855(0x150)]('',_0x2c8855(0x13e));for(const _0x1024b2 of _0x54ead9[_0x2c8855(0x16b)]){_0x481807['push'](_0x2c8855(0x161)+(_0x1024b2[_0x2c8855(0x16c)]||_0x2c8855(0x15a))+_0x2c8855(0x129)+_0x1024b2[_0x2c8855(0x13b)]+(_0x1024b2['operator']?'.'+_0x1024b2['operator']:''));}}return _0x481807[_0x2c8855(0x137)]('\x0a');}function targetPreview(_0x121825){const _0x405644=a59_0x40ca;return{'kind':_0x121825['kind'],'command':_0x121825[_0x405644(0x168)],'appRef':_0x121825[_0x405644(0x124)],'datasetCode':_0x121825[_0x405644(0x11e)],'datatable':_0x121825[_0x405644(0x14b)],'sqlCode':_0x121825['sqlCode'],'bffCode':_0x121825[_0x405644(0x156)],'bffId':_0x121825[_0x405644(0x134)],'functionName':_0x121825[_0x405644(0x145)]};}function normalizeScalarParams(_0x44a97f){const _0x21fe11=a59_0x40ca;return Object[_0x21fe11(0x155)](Object['entries'](_0x44a97f)[_0x21fe11(0x13f)](([,_0xb566f9])=>typeof _0xb566f9===_0x21fe11(0x126)||typeof _0xb566f9===_0x21fe11(0x172)));}function hasText(_0x10807e){const _0x5cdb15=a59_0x40ca;return typeof _0x10807e==='string'&&_0x10807e['trim']()[_0x5cdb15(0x135)]>0x0;}function isPrimitiveFlagDefault(_0x3c1c0d){const _0x39bf37=a59_0x40ca;return _0x3c1c0d===undefined||typeof _0x3c1c0d===_0x39bf37(0x126)||typeof _0x3c1c0d==='number'||typeof _0x3c1c0d===_0x39bf37(0x147);}
@@ -1 +1 @@
1
- (function(_0x2ca676,_0x5ddf76){const _0x17f5c5=a60_0x4c91,_0x374846=_0x2ca676();while(!![]){try{const _0x451fc1=-parseInt(_0x17f5c5(0x120))/0x1*(-parseInt(_0x17f5c5(0x128))/0x2)+-parseInt(_0x17f5c5(0x137))/0x3*(parseInt(_0x17f5c5(0x11b))/0x4)+-parseInt(_0x17f5c5(0x123))/0x5*(parseInt(_0x17f5c5(0x13c))/0x6)+parseInt(_0x17f5c5(0x12d))/0x7+-parseInt(_0x17f5c5(0x13b))/0x8+-parseInt(_0x17f5c5(0x135))/0x9*(-parseInt(_0x17f5c5(0x124))/0xa)+-parseInt(_0x17f5c5(0x13a))/0xb*(-parseInt(_0x17f5c5(0x11f))/0xc);if(_0x451fc1===_0x5ddf76)break;else _0x374846['push'](_0x374846['shift']());}catch(_0x455fc7){_0x374846['push'](_0x374846['shift']());}}}(a60_0x38fa,0xa1800));export function adaptServiceTreeManifestForLegacyFramework(_0x13915a){const _0x200750=a60_0x4c91,_0x8969b4=cloneJsonValue(_0x13915a),_0x5b08da=[];if(!isObjectRecord(_0x8969b4))return{'manifest':_0x8969b4,'errors':_0x5b08da};return Array[_0x200750(0x12b)](_0x8969b4[_0x200750(0x115)])&&_0x8969b4['commands'][_0x200750(0x129)]((_0x175082,_0x3e764f)=>{const _0x5b23f3=_0x200750;if(!isObjectRecord(_0x175082))return;adaptBffTarget(_0x175082[_0x5b23f3(0x13e)],_0x5b23f3(0x134)+_0x3e764f+_0x5b23f3(0x139),_0x5b08da);}),adaptResources(_0x8969b4[_0x200750(0x125)],'$.resources',_0x5b08da),{'manifest':_0x8969b4,'errors':_0x5b08da};}export function toPublicServiceTreeTarget(_0x1d866b){const _0x5d1606=a60_0x4c91,{scriptName:_0x5cb677,..._0x1c5c15}=_0x1d866b;return typeof _0x5cb677===_0x5d1606(0x11a)&&_0x5cb677['trim']()&&(_0x1c5c15[_0x5d1606(0x130)]=_0x5cb677),_0x1c5c15;}function a60_0x38fa(){const _0x1d67fc=['resources','error','functionName\x20must\x20be\x20a\x20non-empty\x20string.','2vhgPkg','forEach','bff','isArray','object','281911XQuNZH','map','action','functionName','fromEntries','entries','.target','$.commands[','7866jGWKiE','kind','999147WwVntx','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','].target','100265TDgvdX','5767048qPQNwr','978lDFVWt','scriptName','target','commands','.functionName','actions','.scriptName','.resources','string','12PekIMW','hasOwnProperty','call','prototype','2796dOOfCp','253091gZqNTk','push','.actions.','32085fmIDzH','11560ORbySZ'];a60_0x38fa=function(){return _0x1d67fc;};return a60_0x38fa();}export function toPublicNormalizedServiceTree(_0x5b7c77){const _0x94a24d=a60_0x4c91;return{..._0x5b7c77,'commands':_0x5b7c77[_0x94a24d(0x115)][_0x94a24d(0x12e)](_0x13b30d=>({..._0x13b30d,'target':toPublicServiceTreeTarget(_0x13b30d[_0x94a24d(0x13e)])}))};}function adaptResources(_0x37f1a7,_0x206ad7,_0x5bc04d){const _0x4b8c56=a60_0x4c91;if(!isObjectRecord(_0x37f1a7))return;for(const [_0x547ca5,_0x226377]of Object[_0x4b8c56(0x132)](_0x37f1a7)){if(!isObjectRecord(_0x226377))continue;const _0x2a8570=_0x206ad7+'.'+_0x547ca5;if(isObjectRecord(_0x226377[_0x4b8c56(0x117)]))for(const [_0x3f6091,_0x122957]of Object[_0x4b8c56(0x132)](_0x226377[_0x4b8c56(0x117)])){if(!isObjectRecord(_0x122957))continue;const _0x4f1447=_0x2a8570+_0x4b8c56(0x122)+_0x3f6091,_0x3a6702=isObjectRecord(_0x122957[_0x4b8c56(0x13e)])&&_0x122957[_0x4b8c56(0x13e)]['kind']===_0x4b8c56(0x12a);adaptBffTarget(_0x122957[_0x4b8c56(0x13e)],_0x4f1447+_0x4b8c56(0x133),_0x5bc04d),(_0x3a6702||isBffAction(_0x122957))&&adaptFunctionNameField(_0x122957,_0x4f1447,_0x5bc04d);}adaptResources(_0x226377[_0x4b8c56(0x125)],_0x2a8570+_0x4b8c56(0x119),_0x5bc04d);}}function adaptBffTarget(_0x16ac6a,_0x2f0cbf,_0x17fe26){const _0x3613ff=a60_0x4c91;if(!isObjectRecord(_0x16ac6a)||_0x16ac6a['kind']!==_0x3613ff(0x12a))return;adaptFunctionNameField(_0x16ac6a,_0x2f0cbf,_0x17fe26);}function adaptFunctionNameField(_0x309767,_0x3b6c6a,_0x4e2a85){const _0x5ab68c=a60_0x4c91;Object[_0x5ab68c(0x11e)][_0x5ab68c(0x11c)][_0x5ab68c(0x11d)](_0x309767,_0x5ab68c(0x13d))&&_0x4e2a85[_0x5ab68c(0x121)]({'level':_0x5ab68c(0x126),'path':_0x3b6c6a+_0x5ab68c(0x118),'message':_0x5ab68c(0x138)});if(Object['prototype'][_0x5ab68c(0x11c)][_0x5ab68c(0x11d)](_0x309767,_0x5ab68c(0x130))){if(typeof _0x309767[_0x5ab68c(0x130)]!==_0x5ab68c(0x11a)||!_0x309767[_0x5ab68c(0x130)]['trim']()){_0x4e2a85['push']({'level':_0x5ab68c(0x126),'path':_0x3b6c6a+_0x5ab68c(0x116),'message':_0x5ab68c(0x127)}),delete _0x309767[_0x5ab68c(0x130)];return;}_0x309767[_0x5ab68c(0x13d)]=_0x309767['functionName'],delete _0x309767[_0x5ab68c(0x130)];}}function isBffAction(_0x56757d){const _0x568b02=a60_0x4c91;return _0x56757d[_0x568b02(0x136)]==='bff'||_0x56757d[_0x568b02(0x12f)]==='bff.exec'||_0x56757d[_0x568b02(0x13e)]==='bff.exec';}function cloneJsonValue(_0x29be97){const _0x1cd5ad=a60_0x4c91;if(Array[_0x1cd5ad(0x12b)](_0x29be97))return _0x29be97[_0x1cd5ad(0x12e)](_0x25c339=>cloneJsonValue(_0x25c339));if(isObjectRecord(_0x29be97))return Object[_0x1cd5ad(0x131)](Object['entries'](_0x29be97)['map'](([_0x11290d,_0x145a2])=>[_0x11290d,cloneJsonValue(_0x145a2)]));return _0x29be97;}function a60_0x4c91(_0x423c64,_0x378db2){_0x423c64=_0x423c64-0x115;const _0x38fa48=a60_0x38fa();let _0x4c914a=_0x38fa48[_0x423c64];return _0x4c914a;}function isObjectRecord(_0x358a0e){const _0x5d67ef=a60_0x4c91;return Boolean(_0x358a0e)&&typeof _0x358a0e===_0x5d67ef(0x12c)&&!Array[_0x5d67ef(0x12b)](_0x358a0e);}
1
+ (function(_0x430b18,_0xa94dd2){const _0x5d653c=a60_0x3072,_0x241799=_0x430b18();while(!![]){try{const _0x4d2336=parseInt(_0x5d653c(0x6c))/0x1+parseInt(_0x5d653c(0x82))/0x2+parseInt(_0x5d653c(0x79))/0x3*(parseInt(_0x5d653c(0x6e))/0x4)+-parseInt(_0x5d653c(0x72))/0x5*(parseInt(_0x5d653c(0x74))/0x6)+parseInt(_0x5d653c(0x84))/0x7*(parseInt(_0x5d653c(0x87))/0x8)+-parseInt(_0x5d653c(0x6b))/0x9+parseInt(_0x5d653c(0x7f))/0xa*(parseInt(_0x5d653c(0x70))/0xb);if(_0x4d2336===_0xa94dd2)break;else _0x241799['push'](_0x241799['shift']());}catch(_0x18c10f){_0x241799['push'](_0x241799['shift']());}}}(a60_0x261b,0x8653e));export function adaptServiceTreeManifestForLegacyFramework(_0x21171a){const _0x5b9569=a60_0x3072,_0x1ac2b1=cloneJsonValue(_0x21171a),_0x26e343=[];if(!isObjectRecord(_0x1ac2b1))return{'manifest':_0x1ac2b1,'errors':_0x26e343};return Array[_0x5b9569(0x7b)](_0x1ac2b1[_0x5b9569(0x68)])&&_0x1ac2b1['commands'][_0x5b9569(0x66)]((_0x136dd8,_0x387a2d)=>{const _0x4a3bf5=_0x5b9569;if(!isObjectRecord(_0x136dd8))return;adaptBffTarget(_0x136dd8['target'],_0x4a3bf5(0x80)+_0x387a2d+_0x4a3bf5(0x7c),_0x26e343);}),adaptResources(_0x1ac2b1[_0x5b9569(0x67)],_0x5b9569(0x86),_0x26e343),{'manifest':_0x1ac2b1,'errors':_0x26e343};}export function toPublicServiceTreeTarget(_0x4e34bc){const _0x5ef02e=a60_0x3072,{scriptName:_0x5bcd36,..._0x4662a5}=_0x4e34bc;return typeof _0x5bcd36===_0x5ef02e(0x77)&&_0x5bcd36[_0x5ef02e(0x7a)]()&&(_0x4662a5[_0x5ef02e(0x88)]=_0x5bcd36),_0x4662a5;}export function toPublicNormalizedServiceTree(_0x58cae5){const _0x4e3590=a60_0x3072;return{..._0x58cae5,'commands':_0x58cae5[_0x4e3590(0x68)][_0x4e3590(0x78)](_0x25666c=>({..._0x25666c,'target':toPublicServiceTreeTarget(_0x25666c[_0x4e3590(0x73)])}))};}function a60_0x3072(_0x462bfa,_0x3ca47e){_0x462bfa=_0x462bfa-0x65;const _0x261bb5=a60_0x261b();let _0x3072a8=_0x261bb5[_0x462bfa];return _0x3072a8;}function adaptResources(_0x4e1a97,_0x7450,_0x6ad096){const _0x3e5503=a60_0x3072;if(!isObjectRecord(_0x4e1a97))return;for(const [_0x12ad6a,_0x33700f]of Object['entries'](_0x4e1a97)){if(!isObjectRecord(_0x33700f))continue;const _0x4fdd69=_0x7450+'.'+_0x12ad6a;if(isObjectRecord(_0x33700f[_0x3e5503(0x81)]))for(const [_0x496c6f,_0x51a674]of Object[_0x3e5503(0x6f)](_0x33700f['actions'])){if(!isObjectRecord(_0x51a674))continue;const _0x24bab0=_0x4fdd69+_0x3e5503(0x75)+_0x496c6f,_0x21eafd=isObjectRecord(_0x51a674[_0x3e5503(0x73)])&&_0x51a674[_0x3e5503(0x73)][_0x3e5503(0x7e)]==='bff';adaptBffTarget(_0x51a674[_0x3e5503(0x73)],_0x24bab0+'.target',_0x6ad096),(_0x21eafd||isBffAction(_0x51a674))&&adaptFunctionNameField(_0x51a674,_0x24bab0,_0x6ad096);}adaptResources(_0x33700f[_0x3e5503(0x67)],_0x4fdd69+_0x3e5503(0x76),_0x6ad096);}}function adaptBffTarget(_0x2e555d,_0x1cf457,_0x874772){const _0x50e263=a60_0x3072;if(!isObjectRecord(_0x2e555d)||_0x2e555d[_0x50e263(0x7e)]!==_0x50e263(0x7d))return;adaptFunctionNameField(_0x2e555d,_0x1cf457,_0x874772);}function adaptFunctionNameField(_0x5c731a,_0x11184e,_0x422ba7){const _0x1d27ff=a60_0x3072;Object[_0x1d27ff(0x6d)]['hasOwnProperty'][_0x1d27ff(0x85)](_0x5c731a,'scriptName')&&_0x422ba7['push']({'level':_0x1d27ff(0x6a),'path':_0x11184e+_0x1d27ff(0x83),'message':_0x1d27ff(0x71)});if(Object[_0x1d27ff(0x6d)]['hasOwnProperty']['call'](_0x5c731a,_0x1d27ff(0x88))){if(typeof _0x5c731a[_0x1d27ff(0x88)]!==_0x1d27ff(0x77)||!_0x5c731a[_0x1d27ff(0x88)][_0x1d27ff(0x7a)]()){_0x422ba7['push']({'level':_0x1d27ff(0x6a),'path':_0x11184e+_0x1d27ff(0x69),'message':'functionName\x20must\x20be\x20a\x20non-empty\x20string.'}),delete _0x5c731a[_0x1d27ff(0x88)];return;}_0x5c731a['scriptName']=_0x5c731a['functionName'],delete _0x5c731a[_0x1d27ff(0x88)];}}function isBffAction(_0x39c279){const _0x4c58bb=a60_0x3072;return _0x39c279[_0x4c58bb(0x7e)]==='bff'||_0x39c279['action']==='bff.exec'||_0x39c279['target']==='bff.exec';}function cloneJsonValue(_0x2705b1){const _0x2f676b=a60_0x3072;if(Array[_0x2f676b(0x7b)](_0x2705b1))return _0x2705b1[_0x2f676b(0x78)](_0x3f4187=>cloneJsonValue(_0x3f4187));if(isObjectRecord(_0x2705b1))return Object[_0x2f676b(0x65)](Object[_0x2f676b(0x6f)](_0x2705b1)[_0x2f676b(0x78)](([_0x5e2f26,_0x3ae6a9])=>[_0x5e2f26,cloneJsonValue(_0x3ae6a9)]));return _0x2705b1;}function a60_0x261b(){const _0x3b9f7d=['bff','kind','5576560nXEHOf','$.commands[','actions','617192cyuiKK','.scriptName','7fTIjOa','call','$.resources','192784lXmXOQ','functionName','fromEntries','forEach','resources','commands','.functionName','error','7680942nfhVVT','17881woqXxF','prototype','260xuqMjv','entries','11XRoLZH','Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.','137415zvoEEL','target','24DeapvQ','.actions.','.resources','string','map','27939AMfSjw','trim','isArray','].target'];a60_0x261b=function(){return _0x3b9f7d;};return a60_0x261b();}function isObjectRecord(_0x57b90d){return Boolean(_0x57b90d)&&typeof _0x57b90d==='object'&&!Array['isArray'](_0x57b90d);}
@@ -1 +1 @@
1
- const a61_0x1342ce=a61_0x2687;function a61_0x79f7(){const _0x55cdb8=['required','hash','将读取指定清单并写入本地\x20Service\x20Tree\x20注册表;相同服务编码的现有清单会被更新。确认界面不会展示本地文件路径。','serviceCount','cliPath','warnings','detail','manifests','manifest','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','write','export','file','Imported\x20','source','Exported\x20service\x20','将把指定服务的本地\x20Service\x20Tree\x20清单写入\x20JSON\x20文件;目标位置已有文件时可能被覆盖。确认界面不会展示本地文件路径。','validate','2901350XnVSpN','232770dPtYOF','\x20service(s),\x20updated\x20','81893QIIqvG','将\x20Service\x20Tree\x20清单导入本地运行态注册表','20hpSgbr','766323Bpcxwp','risk','service','entry','registryPath','entries','read','\x20service(s).','registry','description','serviceCode','type','\x20service\x20','Removed\x20service\x20','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','将本地\x20Service\x20Tree\x20清单导出为\x20JSON\x20文件','replaced','normalizedManifest','从本地运行态注册表移除\x20Service\x20Tree\x20清单','Updated','updated','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','errors','length','string','582tmxjHl','flags','将从本地\x20Service\x20Tree\x20注册表中移除指定服务清单;之后该清单提供的动态命令将不可用。','name','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','WRITE','list','target','44801460jQWILa','str','99hhxnKn','7811125fYfshC','2SgcZnK','filePath','imported','map','719624BcGyaz','remove','report','Imported','cliName','commands','kind','import','version','Service\x20manifest\x20validation\x20passed.','importedAt','Service\x20Tree\x20manifest\x20file\x20path'];a61_0x79f7=function(){return _0x55cdb8;};return a61_0x79f7();}(function(_0x1e8a80,_0x32b121){const _0x1c5361=a61_0x2687,_0x249ff1=_0x1e8a80();while(!![]){try{const _0x4c7150=parseInt(_0x1c5361(0xb0))/0x1*(-parseInt(_0x1c5361(0xd5))/0x2)+parseInt(_0x1c5361(0xab))/0x3*(-parseInt(_0x1c5361(0xaf))/0x4)+-parseInt(_0x1c5361(0xd4))/0x5+parseInt(_0x1c5361(0xc9))/0x6*(-parseInt(_0x1c5361(0xad))/0x7)+-parseInt(_0x1c5361(0xd9))/0x8*(-parseInt(_0x1c5361(0xd3))/0x9)+-parseInt(_0x1c5361(0xaa))/0xa+parseInt(_0x1c5361(0xd1))/0xb;if(_0x4c7150===_0x32b121)break;else _0x249ff1['push'](_0x249ff1['shift']());}catch(_0x3fab3d){_0x249ff1['push'](_0x249ff1['shift']());}}}(a61_0x79f7,0xe0d4b));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_0x1342ce(0xf1),'type':a61_0x1342ce(0xc8),'required':!![],'description':a61_0x1342ce(0xe4)},SERVICE_FLAG={'name':a61_0x1342ce(0xb2),'type':a61_0x1342ce(0xc8),'required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function a61_0x2687(_0x3550af,_0x2b5896){_0x3550af=_0x3550af-0xa9;const _0x79f719=a61_0x79f7();let _0x268747=_0x79f719[_0x3550af];return _0x268747;}function summarizeService(_0x39bb94){const _0x32288c=a61_0x1342ce;return{'serviceCode':_0x39bb94[_0x32288c(0xba)],'name':_0x39bb94['normalizedManifest'][_0x32288c(0xb2)]['name'],'version':_0x39bb94[_0x32288c(0xe1)],'importedAt':_0x39bb94[_0x32288c(0xe3)],'source':_0x39bb94[_0x32288c(0xf3)],'commandCount':_0x39bb94[_0x32288c(0xc1)][_0x32288c(0xde)][_0x32288c(0xc7)],'commands':_0x39bb94[_0x32288c(0xc1)][_0x32288c(0xde)][_0x32288c(0xd8)](_0x1ec5ae=>({'path':_0x1ec5ae[_0x32288c(0xe9)],'description':_0x1ec5ae[_0x32288c(0xb9)],'risk':_0x1ec5ae[_0x32288c(0xb1)],'target':toPublicServiceTreeTarget(_0x1ec5ae[_0x32288c(0xd0)]),'flags':_0x1ec5ae[_0x32288c(0xca)][_0x32288c(0xd8)](_0x5e8094=>({'name':_0x5e8094[_0x32288c(0xcc)],'cliName':_0x5e8094[_0x32288c(0xdd)],'type':_0x5e8094[_0x32288c(0xbb)],'required':_0x5e8094[_0x32288c(0xe5)]===!![]}))}))};}function summarizeLoadedManifest(_0x3e6b2f){const _0x4163d3=a61_0x1342ce;return{'service':_0x3e6b2f[_0x4163d3(0xc1)]?.[_0x4163d3(0xb2)],'version':_0x3e6b2f[_0x4163d3(0xc1)]?.['version'],'commandCount':_0x3e6b2f[_0x4163d3(0xc1)]?.[_0x4163d3(0xde)][_0x4163d3(0xc7)]??0x0,'commands':_0x3e6b2f['normalizedManifest']?.[_0x4163d3(0xde)][_0x4163d3(0xd8)](_0x1d065d=>({'path':_0x1d065d[_0x4163d3(0xe9)],'risk':_0x1d065d[_0x4163d3(0xb1)],'target':toPublicServiceTreeTarget(_0x1d065d[_0x4163d3(0xd0)])}))??[],'registryIndex':_0x3e6b2f['registryIndex'],'registryServiceCode':_0x3e6b2f['registryServiceCode'],'errors':_0x3e6b2f[_0x4163d3(0xdb)][_0x4163d3(0xc6)],'warnings':_0x3e6b2f[_0x4163d3(0xdb)][_0x4163d3(0xea)]};}export const serviceDefinitions=[{'service':a61_0x1342ce(0xb2),'command':a61_0x1342ce(0xa9),'description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x50e13a){const _0x1dda03=a61_0x1342ce,_0x4fb82=loadServiceManifestFromFile(_0x50e13a[_0x1dda03(0xd2)](_0x1dda03(0xf1)));if(!_0x4fb82[_0x1dda03(0xdb)]['ok'])return{'ok':![],'data':{'file':_0x4fb82['filePath'],'hash':_0x4fb82['hash'],'kind':_0x4fb82[_0x1dda03(0xdf)],'serviceCount':_0x4fb82[_0x1dda03(0xec)][_0x1dda03(0xc7)],'services':_0x4fb82[_0x1dda03(0xec)][_0x1dda03(0xd8)](summarizeLoadedManifest),'errors':_0x4fb82['report'][_0x1dda03(0xc6)],'warnings':_0x4fb82[_0x1dda03(0xdb)]['warnings']},'message':formatValidationFailure(_0x4fb82['report'])};if(_0x4fb82[_0x1dda03(0xdf)]===_0x1dda03(0xb8)||_0x4fb82['manifests'][_0x1dda03(0xc7)]!==0x1)return{'ok':!![],'data':{'file':_0x4fb82['filePath'],'hash':_0x4fb82[_0x1dda03(0xe6)],'kind':_0x4fb82[_0x1dda03(0xdf)],'serviceCount':_0x4fb82[_0x1dda03(0xec)][_0x1dda03(0xc7)],'commandCount':_0x4fb82[_0x1dda03(0xec)]['reduce']((_0x5c56eb,_0x326787)=>_0x5c56eb+(_0x326787[_0x1dda03(0xc1)]?.[_0x1dda03(0xde)][_0x1dda03(0xc7)]??0x0),0x0),'services':_0x4fb82['manifests']['map'](summarizeLoadedManifest),'warnings':_0x4fb82[_0x1dda03(0xdb)][_0x1dda03(0xea)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x4fb82[_0x1dda03(0xd6)],'hash':_0x4fb82['hash'],'kind':_0x4fb82[_0x1dda03(0xdf)],'service':_0x4fb82['normalizedManifest']?.[_0x1dda03(0xb2)],'version':_0x4fb82[_0x1dda03(0xc1)]?.[_0x1dda03(0xe1)],'commandCount':_0x4fb82['normalizedManifest']?.[_0x1dda03(0xde)][_0x1dda03(0xc7)]??0x0,'commands':_0x4fb82[_0x1dda03(0xc1)]?.[_0x1dda03(0xde)][_0x1dda03(0xd8)](_0x3aeee0=>({'path':_0x3aeee0[_0x1dda03(0xe9)],'risk':_0x3aeee0[_0x1dda03(0xb1)],'target':toPublicServiceTreeTarget(_0x3aeee0[_0x1dda03(0xd0)])})),'warnings':_0x4fb82[_0x1dda03(0xdb)][_0x1dda03(0xea)]},'message':_0x1dda03(0xe2)};}},{'service':'service','command':a61_0x1342ce(0xe0),'description':a61_0x1342ce(0xae),'risk':'write','confirmationDescription':a61_0x1342ce(0xe7),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x55c53c){const _0x866fd=a61_0x1342ce,_0x12af68=loadServiceManifestFromFile(_0x55c53c[_0x866fd(0xd2)](_0x866fd(0xf1)));return{'method':_0x866fd(0xce),'url':getServiceRegistryPath(),'body':{'file':_0x12af68[_0x866fd(0xd6)],'hash':_0x12af68[_0x866fd(0xe6)],'kind':_0x12af68[_0x866fd(0xdf)],'ok':_0x12af68[_0x866fd(0xdb)]['ok'],'service':_0x12af68['normalizedManifest']?.[_0x866fd(0xb2)],'version':_0x12af68[_0x866fd(0xc1)]?.[_0x866fd(0xe1)],'serviceCount':_0x12af68['manifests']['length'],'services':_0x12af68[_0x866fd(0xec)][_0x866fd(0xd8)](_0x5d02c9=>({'service':_0x5d02c9[_0x866fd(0xc1)]?.['service'],'version':_0x5d02c9['normalizedManifest']?.[_0x866fd(0xe1)],'commandCount':_0x5d02c9[_0x866fd(0xc1)]?.[_0x866fd(0xde)][_0x866fd(0xc7)]??0x0,'errors':_0x5d02c9['report'][_0x866fd(0xc6)]})),'errors':_0x12af68[_0x866fd(0xdb)][_0x866fd(0xc6)],'commandCount':_0x12af68[_0x866fd(0xc1)]?.['commands'][_0x866fd(0xc7)]??0x0},'description':_0x866fd(0xbe)};},async 'execute'(_0x21167a){const _0x27e2c4=a61_0x1342ce,_0x348b9d=importServiceManifest(_0x21167a[_0x27e2c4(0xd2)](_0x27e2c4(0xf1)));if(_0x348b9d['entries']['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x348b9d['registryPath'],'imported':_0x348b9d[_0x27e2c4(0xd7)],'updated':_0x348b9d[_0x27e2c4(0xc4)],'serviceCount':_0x348b9d[_0x27e2c4(0xe8)],'services':_0x348b9d[_0x27e2c4(0xb5)]['map'](summarizeService)},'message':_0x27e2c4(0xf2)+_0x348b9d[_0x27e2c4(0xd7)]+_0x27e2c4(0xac)+_0x348b9d[_0x27e2c4(0xc4)]+_0x27e2c4(0xb7)};return{'ok':!![],'data':{'registryPath':_0x348b9d[_0x27e2c4(0xb4)],'replaced':_0x348b9d[_0x27e2c4(0xc0)],'imported':_0x348b9d[_0x27e2c4(0xd7)],'updated':_0x348b9d[_0x27e2c4(0xc4)],'serviceCount':_0x348b9d[_0x27e2c4(0xe8)],'service':summarizeService(_0x348b9d[_0x27e2c4(0xb3)])},'message':(_0x348b9d[_0x27e2c4(0xc0)]?_0x27e2c4(0xc3):_0x27e2c4(0xdc))+_0x27e2c4(0xbc)+_0x348b9d[_0x27e2c4(0xb3)][_0x27e2c4(0xba)]+'.'};}},{'service':a61_0x1342ce(0xb2),'command':a61_0x1342ce(0xf0),'description':a61_0x1342ce(0xbf),'risk':'write','confirmationDescription':a61_0x1342ce(0xf5),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x2b2ef8){const _0x21ff28=a61_0x1342ce,_0x3c88cf=getLocalServiceEntry(_0x2b2ef8[_0x21ff28(0xd2)](_0x21ff28(0xb2)));return{'method':'WRITE','url':_0x2b2ef8['str']('file'),'body':{'service':_0x2b2ef8[_0x21ff28(0xd2)](_0x21ff28(0xb2)),'found':Boolean(_0x3c88cf),'version':_0x3c88cf?.['version'],'source':_0x3c88cf?.[_0x21ff28(0xf3)]},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x12e24d){const _0x1d6377=a61_0x1342ce,_0x1190ac=exportServiceManifest(_0x12e24d[_0x1d6377(0xd2)](_0x1d6377(0xb2)),_0x12e24d[_0x1d6377(0xd2)](_0x1d6377(0xf1)));return{'ok':!![],'data':{'registryPath':_0x1190ac[_0x1d6377(0xb4)],'file':_0x1190ac[_0x1d6377(0xd6)],'service':summarizeService(_0x1190ac['entry'])},'message':_0x1d6377(0xf4)+_0x1190ac[_0x1d6377(0xb3)][_0x1d6377(0xba)]+'.'};}},{'service':a61_0x1342ce(0xb2),'command':a61_0x1342ce(0xcf),'description':a61_0x1342ce(0xcd),'risk':a61_0x1342ce(0xb6),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x5d3c55=a61_0x1342ce,_0x10c19c=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x10c19c['length'],'services':_0x10c19c[_0x5d3c55(0xd8)](summarizeService)}};}},{'service':'service','command':a61_0x1342ce(0xda),'description':a61_0x1342ce(0xc2),'risk':a61_0x1342ce(0xef),'confirmationDescription':a61_0x1342ce(0xcb),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x35344a){const _0x1f7c5c=a61_0x1342ce,_0x3d3238=getLocalServiceEntry(_0x35344a[_0x1f7c5c(0xd2)](_0x1f7c5c(0xb2)));return{'method':_0x1f7c5c(0xce),'url':getServiceRegistryPath(),'body':{'service':_0x35344a[_0x1f7c5c(0xd2)](_0x1f7c5c(0xb2)),'found':Boolean(_0x3d3238),'version':_0x3d3238?.[_0x1f7c5c(0xe1)],'source':_0x3d3238?.[_0x1f7c5c(0xf3)]},'description':_0x1f7c5c(0xc5)};},async 'execute'(_0x58ca82){const _0x58e07d=a61_0x1342ce,_0x13d0ef=removeServiceManifest(_0x58ca82['str'](_0x58e07d(0xb2)));return{'ok':!![],'data':{'registryPath':_0x13d0ef[_0x58e07d(0xb4)],'serviceCount':_0x13d0ef['serviceCount'],'service':summarizeService(_0x13d0ef[_0x58e07d(0xb3)])},'message':_0x58e07d(0xbd)+_0x13d0ef[_0x58e07d(0xb3)][_0x58e07d(0xba)]+'.'};}},{'service':a61_0x1342ce(0xb2),'command':a61_0x1342ce(0xeb),'description':a61_0x1342ce(0xee),'risk':a61_0x1342ce(0xb6),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x951f1f){const _0x51e632=a61_0x1342ce,_0x1c3a10=getLocalServiceEntry(_0x951f1f[_0x51e632(0xd2)]('service'));if(!_0x1c3a10)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x951f1f['str'](_0x51e632(0xb2))},'message':'Local\x20service\x20not\x20found:\x20'+_0x951f1f[_0x51e632(0xd2)](_0x51e632(0xb2))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x1c3a10),'manifest':_0x1c3a10[_0x51e632(0xed)],'normalizedManifest':toPublicNormalizedServiceTree(_0x1c3a10[_0x51e632(0xc1)])}};}}];
1
+ const a61_0x4ab7ed=a61_0x1245;(function(_0x25432b,_0x17e1b8){const _0x335bd1=a61_0x1245,_0x2ac063=_0x25432b();while(!![]){try{const _0x4863d6=parseInt(_0x335bd1(0xed))/0x1+parseInt(_0x335bd1(0xd2))/0x2+parseInt(_0x335bd1(0xc6))/0x3*(parseInt(_0x335bd1(0xe4))/0x4)+parseInt(_0x335bd1(0xc5))/0x5*(-parseInt(_0x335bd1(0xc7))/0x6)+-parseInt(_0x335bd1(0xe1))/0x7*(-parseInt(_0x335bd1(0xcd))/0x8)+parseInt(_0x335bd1(0xce))/0x9*(parseInt(_0x335bd1(0xc3))/0xa)+-parseInt(_0x335bd1(0x104))/0xb*(parseInt(_0x335bd1(0xda))/0xc);if(_0x4863d6===_0x17e1b8)break;else _0x2ac063['push'](_0x2ac063['shift']());}catch(_0x1612b5){_0x2ac063['push'](_0x2ac063['shift']());}}}(a61_0x24e5,0x68176));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_0x4ab7ed(0xfc),'type':'string','required':!![],'description':a61_0x4ab7ed(0xf3)},SERVICE_FLAG={'name':a61_0x4ab7ed(0xe7),'type':a61_0x4ab7ed(0xc4),'required':!![],'description':a61_0x4ab7ed(0xe2),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x39e3c1){const _0xc14ec6=a61_0x4ab7ed;return{'serviceCode':_0x39e3c1['serviceCode'],'name':_0x39e3c1['normalizedManifest'][_0xc14ec6(0xe7)][_0xc14ec6(0xf5)],'version':_0x39e3c1[_0xc14ec6(0xd0)],'importedAt':_0x39e3c1['importedAt'],'source':_0x39e3c1[_0xc14ec6(0xfa)],'commandCount':_0x39e3c1[_0xc14ec6(0xdf)][_0xc14ec6(0xf1)][_0xc14ec6(0xdc)],'commands':_0x39e3c1[_0xc14ec6(0xdf)][_0xc14ec6(0xf1)][_0xc14ec6(0xf8)](_0x5e8eb5=>({'path':_0x5e8eb5[_0xc14ec6(0xfd)],'description':_0x5e8eb5[_0xc14ec6(0xea)],'risk':_0x5e8eb5['risk'],'target':toPublicServiceTreeTarget(_0x5e8eb5[_0xc14ec6(0xdd)]),'flags':_0x5e8eb5['flags'][_0xc14ec6(0xf8)](_0x43b095=>({'name':_0x43b095[_0xc14ec6(0xf5)],'cliName':_0x43b095['cliName'],'type':_0x43b095[_0xc14ec6(0xe6)],'required':_0x43b095[_0xc14ec6(0xd8)]===!![]}))}))};}function a61_0x1245(_0xb2c024,_0x4efcbc){_0xb2c024=_0xb2c024-0xc0;const _0x24e5c3=a61_0x24e5();let _0x124580=_0x24e5c3[_0xb2c024];return _0x124580;}function a61_0x24e5(){const _0x547903=['list','length','target','warnings','normalizedManifest','str','56ydsPCS','Local\x20service\x20code,\x20for\x20example\x20crm','Service\x20registry\x20validation\x20passed.','3868zLuSxe','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','type','service','remove','registryPath','description','write','read','99687DMknqI','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','WRITE','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','commands','serviceCount','Service\x20Tree\x20manifest\x20file\x20path','Updated','name','kind','Exported\x20service\x20','map','report','source','updated','file','cliPath','\x20service\x20','entry','entries','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','registryIndex','validate','31361QAWPFg','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','filePath','replaced','registry','2805610nishaX','string','638035LdOFkr','57xFQEQX','18CCzRlM','\x20service(s).','Local\x20service\x20not\x20found:\x20','errors','imported','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','207904PEBIyO','9PtmCDJ','\x20service(s),\x20updated\x20','version','Service\x20manifest\x20validation\x20passed.','650494NsTbFf','serviceCode','risk','将从本地\x20Service\x20Tree\x20注册表中移除指定服务清单;之后该清单提供的动态命令将不可用。','manifests','import','required','hash','516MEyuYr'];a61_0x24e5=function(){return _0x547903;};return a61_0x24e5();}function summarizeLoadedManifest(_0x2fd440){const _0x12137f=a61_0x4ab7ed;return{'service':_0x2fd440[_0x12137f(0xdf)]?.['service'],'version':_0x2fd440['normalizedManifest']?.[_0x12137f(0xd0)],'commandCount':_0x2fd440['normalizedManifest']?.[_0x12137f(0xf1)][_0x12137f(0xdc)]??0x0,'commands':_0x2fd440[_0x12137f(0xdf)]?.[_0x12137f(0xf1)][_0x12137f(0xf8)](_0xd061df=>({'path':_0xd061df[_0x12137f(0xfd)],'risk':_0xd061df[_0x12137f(0xd4)],'target':toPublicServiceTreeTarget(_0xd061df[_0x12137f(0xdd)])}))??[],'registryIndex':_0x2fd440[_0x12137f(0x102)],'registryServiceCode':_0x2fd440['registryServiceCode'],'errors':_0x2fd440[_0x12137f(0xf9)][_0x12137f(0xca)],'warnings':_0x2fd440[_0x12137f(0xf9)][_0x12137f(0xde)]};}export const serviceDefinitions=[{'service':a61_0x4ab7ed(0xe7),'command':a61_0x4ab7ed(0x103),'description':a61_0x4ab7ed(0xee),'risk':a61_0x4ab7ed(0xec),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0xdead2b){const _0x1984d3=a61_0x4ab7ed,_0x5ac711=loadServiceManifestFromFile(_0xdead2b[_0x1984d3(0xe0)](_0x1984d3(0xfc)));if(!_0x5ac711['report']['ok'])return{'ok':![],'data':{'file':_0x5ac711[_0x1984d3(0xc0)],'hash':_0x5ac711[_0x1984d3(0xd9)],'kind':_0x5ac711[_0x1984d3(0xf6)],'serviceCount':_0x5ac711[_0x1984d3(0xd6)][_0x1984d3(0xdc)],'services':_0x5ac711[_0x1984d3(0xd6)][_0x1984d3(0xf8)](summarizeLoadedManifest),'errors':_0x5ac711[_0x1984d3(0xf9)][_0x1984d3(0xca)],'warnings':_0x5ac711[_0x1984d3(0xf9)][_0x1984d3(0xde)]},'message':formatValidationFailure(_0x5ac711[_0x1984d3(0xf9)])};if(_0x5ac711[_0x1984d3(0xf6)]===_0x1984d3(0xc2)||_0x5ac711[_0x1984d3(0xd6)][_0x1984d3(0xdc)]!==0x1)return{'ok':!![],'data':{'file':_0x5ac711[_0x1984d3(0xc0)],'hash':_0x5ac711[_0x1984d3(0xd9)],'kind':_0x5ac711[_0x1984d3(0xf6)],'serviceCount':_0x5ac711[_0x1984d3(0xd6)][_0x1984d3(0xdc)],'commandCount':_0x5ac711['manifests']['reduce']((_0x16f69e,_0x4bddaa)=>_0x16f69e+(_0x4bddaa[_0x1984d3(0xdf)]?.[_0x1984d3(0xf1)][_0x1984d3(0xdc)]??0x0),0x0),'services':_0x5ac711[_0x1984d3(0xd6)]['map'](summarizeLoadedManifest),'warnings':_0x5ac711[_0x1984d3(0xf9)][_0x1984d3(0xde)]},'message':_0x1984d3(0xe3)};return{'ok':!![],'data':{'file':_0x5ac711[_0x1984d3(0xc0)],'hash':_0x5ac711[_0x1984d3(0xd9)],'kind':_0x5ac711['kind'],'service':_0x5ac711[_0x1984d3(0xdf)]?.[_0x1984d3(0xe7)],'version':_0x5ac711[_0x1984d3(0xdf)]?.[_0x1984d3(0xd0)],'commandCount':_0x5ac711[_0x1984d3(0xdf)]?.[_0x1984d3(0xf1)]['length']??0x0,'commands':_0x5ac711[_0x1984d3(0xdf)]?.[_0x1984d3(0xf1)][_0x1984d3(0xf8)](_0x41a2df=>({'path':_0x41a2df[_0x1984d3(0xfd)],'risk':_0x41a2df[_0x1984d3(0xd4)],'target':toPublicServiceTreeTarget(_0x41a2df['target'])})),'warnings':_0x5ac711['report'][_0x1984d3(0xde)]},'message':_0x1984d3(0xd1)};}},{'service':'service','command':a61_0x4ab7ed(0xd7),'description':'将\x20Service\x20Tree\x20清单导入本地运行态注册表','risk':a61_0x4ab7ed(0xeb),'confirmationDescription':'将读取指定清单并写入本地\x20Service\x20Tree\x20注册表;相同服务编码的现有清单会被更新。确认界面不会展示本地文件路径。','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x224aa6){const _0x1d6364=a61_0x4ab7ed,_0x38bd88=loadServiceManifestFromFile(_0x224aa6['str'](_0x1d6364(0xfc)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'file':_0x38bd88[_0x1d6364(0xc0)],'hash':_0x38bd88[_0x1d6364(0xd9)],'kind':_0x38bd88[_0x1d6364(0xf6)],'ok':_0x38bd88[_0x1d6364(0xf9)]['ok'],'service':_0x38bd88[_0x1d6364(0xdf)]?.[_0x1d6364(0xe7)],'version':_0x38bd88[_0x1d6364(0xdf)]?.[_0x1d6364(0xd0)],'serviceCount':_0x38bd88[_0x1d6364(0xd6)][_0x1d6364(0xdc)],'services':_0x38bd88[_0x1d6364(0xd6)][_0x1d6364(0xf8)](_0xf17814=>({'service':_0xf17814[_0x1d6364(0xdf)]?.[_0x1d6364(0xe7)],'version':_0xf17814[_0x1d6364(0xdf)]?.[_0x1d6364(0xd0)],'commandCount':_0xf17814[_0x1d6364(0xdf)]?.[_0x1d6364(0xf1)]['length']??0x0,'errors':_0xf17814['report'][_0x1d6364(0xca)]})),'errors':_0x38bd88[_0x1d6364(0xf9)][_0x1d6364(0xca)],'commandCount':_0x38bd88[_0x1d6364(0xdf)]?.[_0x1d6364(0xf1)][_0x1d6364(0xdc)]??0x0},'description':_0x1d6364(0x105)};},async 'execute'(_0x1eee97){const _0x4ca2a6=a61_0x4ab7ed,_0x33ba76=importServiceManifest(_0x1eee97['str'](_0x4ca2a6(0xfc)));if(_0x33ba76[_0x4ca2a6(0x100)][_0x4ca2a6(0xdc)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x33ba76[_0x4ca2a6(0xe9)],'imported':_0x33ba76['imported'],'updated':_0x33ba76[_0x4ca2a6(0xfb)],'serviceCount':_0x33ba76[_0x4ca2a6(0xf2)],'services':_0x33ba76[_0x4ca2a6(0x100)][_0x4ca2a6(0xf8)](summarizeService)},'message':'Imported\x20'+_0x33ba76[_0x4ca2a6(0xcb)]+_0x4ca2a6(0xcf)+_0x33ba76[_0x4ca2a6(0xfb)]+_0x4ca2a6(0xc8)};return{'ok':!![],'data':{'registryPath':_0x33ba76[_0x4ca2a6(0xe9)],'replaced':_0x33ba76[_0x4ca2a6(0xc1)],'imported':_0x33ba76[_0x4ca2a6(0xcb)],'updated':_0x33ba76[_0x4ca2a6(0xfb)],'serviceCount':_0x33ba76[_0x4ca2a6(0xf2)],'service':summarizeService(_0x33ba76[_0x4ca2a6(0xff)])},'message':(_0x33ba76[_0x4ca2a6(0xc1)]?_0x4ca2a6(0xf4):'Imported')+_0x4ca2a6(0xfe)+_0x33ba76[_0x4ca2a6(0xff)][_0x4ca2a6(0xd3)]+'.'};}},{'service':a61_0x4ab7ed(0xe7),'command':'export','description':'将本地\x20Service\x20Tree\x20清单导出为\x20JSON\x20文件','risk':'write','confirmationDescription':'将把指定服务的本地\x20Service\x20Tree\x20清单写入\x20JSON\x20文件;目标位置已有文件时可能被覆盖。确认界面不会展示本地文件路径。','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x24ae40){const _0x16510f=a61_0x4ab7ed,_0x229fc8=getLocalServiceEntry(_0x24ae40['str'](_0x16510f(0xe7)));return{'method':_0x16510f(0xef),'url':_0x24ae40[_0x16510f(0xe0)]('file'),'body':{'service':_0x24ae40[_0x16510f(0xe0)](_0x16510f(0xe7)),'found':Boolean(_0x229fc8),'version':_0x229fc8?.['version'],'source':_0x229fc8?.[_0x16510f(0xfa)]},'description':_0x16510f(0xe5)};},async 'execute'(_0x7c76c4){const _0x3b2633=a61_0x4ab7ed,_0x2ff67a=exportServiceManifest(_0x7c76c4[_0x3b2633(0xe0)](_0x3b2633(0xe7)),_0x7c76c4[_0x3b2633(0xe0)](_0x3b2633(0xfc)));return{'ok':!![],'data':{'registryPath':_0x2ff67a['registryPath'],'file':_0x2ff67a[_0x3b2633(0xc0)],'service':summarizeService(_0x2ff67a[_0x3b2633(0xff)])},'message':_0x3b2633(0xf7)+_0x2ff67a[_0x3b2633(0xff)]['serviceCode']+'.'};}},{'service':a61_0x4ab7ed(0xe7),'command':a61_0x4ab7ed(0xdb),'description':a61_0x4ab7ed(0xf0),'risk':a61_0x4ab7ed(0xec),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0xcfdcd3=a61_0x4ab7ed,_0x1eee89=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x1eee89['length'],'services':_0x1eee89[_0xcfdcd3(0xf8)](summarizeService)}};}},{'service':a61_0x4ab7ed(0xe7),'command':a61_0x4ab7ed(0xe8),'description':'从本地运行态注册表移除\x20Service\x20Tree\x20清单','risk':a61_0x4ab7ed(0xeb),'confirmationDescription':a61_0x4ab7ed(0xd5),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x52e044){const _0x49e8b9=a61_0x4ab7ed,_0x4aa465=getLocalServiceEntry(_0x52e044['str'](_0x49e8b9(0xe7)));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0x52e044[_0x49e8b9(0xe0)](_0x49e8b9(0xe7)),'found':Boolean(_0x4aa465),'version':_0x4aa465?.[_0x49e8b9(0xd0)],'source':_0x4aa465?.[_0x49e8b9(0xfa)]},'description':_0x49e8b9(0x101)};},async 'execute'(_0x32022a){const _0x3fdaaa=a61_0x4ab7ed,_0x598ff8=removeServiceManifest(_0x32022a['str']('service'));return{'ok':!![],'data':{'registryPath':_0x598ff8['registryPath'],'serviceCount':_0x598ff8[_0x3fdaaa(0xf2)],'service':summarizeService(_0x598ff8[_0x3fdaaa(0xff)])},'message':'Removed\x20service\x20'+_0x598ff8[_0x3fdaaa(0xff)][_0x3fdaaa(0xd3)]+'.'};}},{'service':a61_0x4ab7ed(0xe7),'command':'detail','description':a61_0x4ab7ed(0xcc),'risk':a61_0x4ab7ed(0xec),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x3e7f44){const _0x459e78=a61_0x4ab7ed,_0x5f55f0=getLocalServiceEntry(_0x3e7f44[_0x459e78(0xe0)](_0x459e78(0xe7)));if(!_0x5f55f0)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x3e7f44[_0x459e78(0xe0)](_0x459e78(0xe7))},'message':_0x459e78(0xc9)+_0x3e7f44[_0x459e78(0xe0)](_0x459e78(0xe7))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x5f55f0),'manifest':_0x5f55f0['manifest'],'normalizedManifest':toPublicNormalizedServiceTree(_0x5f55f0[_0x459e78(0xdf)])}};}}];
@@ -1 +1 @@
1
- const a62_0x143389=a62_0x1136;(function(_0x24c2b8,_0x2dad71){const _0x1b5ed4=a62_0x1136,_0x3f52e4=_0x24c2b8();while(!![]){try{const _0x58dbf6=parseInt(_0x1b5ed4(0x18b))/0x1*(-parseInt(_0x1b5ed4(0x19e))/0x2)+-parseInt(_0x1b5ed4(0x1a6))/0x3+parseInt(_0x1b5ed4(0x19c))/0x4+parseInt(_0x1b5ed4(0x197))/0x5+-parseInt(_0x1b5ed4(0x1b1))/0x6*(-parseInt(_0x1b5ed4(0x1c0))/0x7)+-parseInt(_0x1b5ed4(0x1da))/0x8*(parseInt(_0x1b5ed4(0x1dd))/0x9)+parseInt(_0x1b5ed4(0x1d0))/0xa;if(_0x58dbf6===_0x2dad71)break;else _0x3f52e4['push'](_0x3f52e4['shift']());}catch(_0x4b166d){_0x3f52e4['push'](_0x3f52e4['shift']());}}}(a62_0x57b0,0x6024c));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';function a62_0x1136(_0x682177,_0x33b819){_0x682177=_0x682177-0x18a;const _0x57b0ff=a62_0x57b0();let _0x11367e=_0x57b0ff[_0x682177];return _0x11367e;}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;function a62_0x57b0(){const _0x3232ad=['normalizedManifest','description','services','slice','flatMap','462mtHZDW','stringify','hex','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','service','cliPath','registryIndex','map','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','length','schemaVersion','file','sourceHash','utf8','command','push','7720090wiUiMe','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','homeDirName','commandCount','Unsupported\x20service\x20registry\x20schemaVersion:\x20','path','ENOENT','validation','toISOString','invalid','8kBEVck','risk','isArray','6812307tnVpQl','Local\x20service\x20not\x20found:\x20','splice','1QvIKZP','Service\x20manifest\x20validation\x20failed:\x0a','missing','importedAt','startsWith','message','source','Unsupported\x20schemaVersion:\x20','update','$.services[','target','find','1089795TMqWTO','sha256','reduce','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','serviceCode','2660764ERzWPL','trim','484912muvrBD','CliError','Service\x20manifest\x20file\x20not\x20found:\x20','version','Invalid\x20service\x20manifest\x20JSON:\x20','report','homeDir','name','969474BZlWmh','digest','string','manifest','errors','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','warnings','service.json','manifests','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','join','5562jOtzDH','code','now','].manifest','kind','findIndex','registry','commands','Invalid\x20service\x20registry\x20JSON:\x20','updatedAt'];a62_0x57b0=function(){return _0x3232ad;};return a62_0x57b0();}export const SERVICE_REGISTRY_FILE_NAME=a62_0x143389(0x1ad);export function getServiceRegistryPath(_0x38205f={}){const _0x33bd08=a62_0x143389;return resolve(_0x38205f[_0x33bd08(0x1a4)]??homedir(),PRODUCT_CONFIG[_0x33bd08(0x1d2)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x5bd6cd={}){const _0x366320=a62_0x143389,_0x27f64f=getServiceRegistryPath(_0x5bd6cd);if(!existsSync(_0x27f64f))return emptyServiceRegistry();try{const _0xdefcf7=readFileSync(_0x27f64f,'utf8');if(!_0xdefcf7[_0x366320(0x19d)]())return emptyServiceRegistry();const _0x424b8a=JSON['parse'](_0xdefcf7);if(_0x424b8a[_0x366320(0x1ca)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x366320(0x1d7)](_0x366320(0x1d4)+String(_0x424b8a['schemaVersion']),'Remove\x20or\x20migrate\x20'+_0x27f64f+'.');if(!Array[_0x366320(0x1dc)](_0x424b8a['services']))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x424b8a[_0x366320(0x1ba)],'services':_0x424b8a['services']};}catch(_0x846bce){if(_0x846bce instanceof Error&&_0x846bce['name']===_0x366320(0x19f))throw _0x846bce;throw CliErrors['validation'](_0x366320(0x1b9)+_0x27f64f,_0x366320(0x19a));}}export function writeServiceRegistry(_0x9bc0ba,_0x1d111e={}){const _0x433f84=a62_0x143389,_0x3ca2b9=getServiceRegistryPath(_0x1d111e),_0xebe37b=dirname(_0x3ca2b9);!existsSync(_0xebe37b)&&mkdirSync(_0xebe37b,{'recursive':!![]});const _0x18a552=_0x3ca2b9+'.tmp';try{writeFileSync(_0x18a552,JSON['stringify'](_0x9bc0ba,null,0x2)+'\x0a',{'encoding':_0x433f84(0x1cd),'mode':0x180}),renameSync(_0x18a552,_0x3ca2b9);}catch(_0x3ade54){try{unlinkSync(_0x18a552);}catch{}if(_0x3ade54?.[_0x433f84(0x1b2)]===_0x433f84(0x1d6))throw CliErrors[_0x433f84(0x1d7)]('Cannot\x20write\x20service\x20registry:\x20'+_0x3ca2b9);throw _0x3ade54;}return _0x3ca2b9;}export function loadServiceManifestFromFile(_0x3b84db){const _0xe3b82d=a62_0x143389,_0x3b3677=resolve(_0x3b84db);if(!existsSync(_0x3b3677))throw CliErrors[_0xe3b82d(0x1d7)](_0xe3b82d(0x1a0)+_0x3b84db);let _0x3074ce;const _0x2f91f1=readFileSync(_0x3b3677,'utf8');try{_0x3074ce=JSON['parse'](_0x2f91f1);}catch{throw CliErrors[_0xe3b82d(0x1d7)](_0xe3b82d(0x1a2)+_0x3b84db,_0xe3b82d(0x1c8));}const _0x1b47d7=sha256(_0x2f91f1),_0x1e7d52=extractLoadedServiceManifests(_0x3074ce,_0x1b47d7),_0x521c3b=aggregateValidationReports(_0x1e7d52),_0x341658=_0x1e7d52[0x0];return{'filePath':_0x3b3677,'hash':_0x1b47d7,'kind':isServiceRegistryLike(_0x3074ce)?_0xe3b82d(0x1b7):_0xe3b82d(0x1a9),'manifest':_0x341658?.[_0xe3b82d(0x1a9)]??_0x3074ce,'report':_0x521c3b,'normalizedManifest':_0x1e7d52['length']===0x1?_0x341658?.['normalizedManifest']:undefined,'manifests':_0x1e7d52};}export function importServiceManifest(_0x51f1f0,_0x1cb94e={}){const _0x39c2a5=a62_0x143389,_0xd93dcf=loadServiceManifestFromFile(_0x51f1f0);if(!_0xd93dcf[_0x39c2a5(0x1a3)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0xd93dcf['report']),_0x39c2a5(0x1af));if(_0xd93dcf['manifests'][_0x39c2a5(0x1c9)]===0x0)throw CliErrors[_0x39c2a5(0x1d7)](_0x39c2a5(0x1c3),'Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.');const _0x11e79e=readServiceRegistry(_0x1cb94e),_0x8a3879=(_0x1cb94e[_0x39c2a5(0x1b3)]??(()=>new Date()))()['toISOString'](),_0x1ef8aa=[];let _0x9e6995=0x0,_0xf92194=0x0;for(const _0x531fb6 of _0xd93dcf[_0x39c2a5(0x1ae)]){if(!_0x531fb6[_0x39c2a5(0x1bb)])continue;const _0x15dd16=_0x531fb6[_0x39c2a5(0x1bb)]['service']['code'],_0x4d237b={'serviceCode':_0x15dd16,'version':_0x531fb6['normalizedManifest']['version'],'importedAt':_0x8a3879,'source':{'type':_0x39c2a5(0x1cb),'path':_0xd93dcf['filePath'],'hash':_0x531fb6[_0x39c2a5(0x1cc)]},'manifest':_0x531fb6[_0x39c2a5(0x1a9)],'normalizedManifest':_0x531fb6['normalizedManifest']},_0x23d309=_0x11e79e[_0x39c2a5(0x1bd)]['findIndex'](_0x28bfc9=>_0x28bfc9['serviceCode']===_0x15dd16);_0x23d309>=0x0?(_0x11e79e['services'][_0x23d309]=_0x4d237b,_0xf92194++):(_0x11e79e['services']['push'](_0x4d237b),_0x9e6995++),_0x1ef8aa[_0x39c2a5(0x1cf)](_0x4d237b);}_0x11e79e['services']['sort']((_0x4d62c5,_0x442627)=>_0x4d62c5[_0x39c2a5(0x19b)]['localeCompare'](_0x442627[_0x39c2a5(0x19b)])),_0x11e79e[_0x39c2a5(0x1ba)]=_0x8a3879;const _0x460738=writeServiceRegistry(_0x11e79e,_0x1cb94e);return{'registryPath':_0x460738,'entry':_0x1ef8aa[0x0],'replaced':_0x1ef8aa[_0x39c2a5(0x1c9)]===0x1?_0xf92194===0x1:_0xf92194>0x0,'entries':_0x1ef8aa,'imported':_0x9e6995,'updated':_0xf92194,'serviceCount':_0x11e79e['services']['length']};}export function exportServiceManifest(_0x2830f7,_0xa8ca80,_0x9835d1={}){const _0x317a98=a62_0x143389,_0x2bfbe6=getServiceRegistryPath(_0x9835d1),_0x4fde96=getLocalServiceEntry(_0x2830f7,_0x9835d1);if(!_0x4fde96)throw CliErrors[_0x317a98(0x1d7)](_0x317a98(0x1de)+_0x2830f7,_0x317a98(0x1d1));const _0x5f051d=resolve(_0xa8ca80),_0x473ba1=dirname(_0x5f051d);return!existsSync(_0x473ba1)&&mkdirSync(_0x473ba1,{'recursive':!![]}),writeFileSync(_0x5f051d,JSON[_0x317a98(0x1c1)](_0x4fde96[_0x317a98(0x1a9)],null,0x2)+'\x0a',{'encoding':_0x317a98(0x1cd),'mode':0x180}),{'registryPath':_0x2bfbe6,'filePath':_0x5f051d,'entry':_0x4fde96};}export function removeServiceManifest(_0x190612,_0xcd1600={}){const _0x4c7c99=a62_0x143389,_0x584436=readServiceRegistry(_0xcd1600),_0x2757d6=_0x190612['trim'](),_0x186f92=_0x584436[_0x4c7c99(0x1bd)][_0x4c7c99(0x1b6)](_0x15471f=>_0x15471f[_0x4c7c99(0x19b)]===_0x2757d6);if(_0x186f92<0x0)throw CliErrors[_0x4c7c99(0x1d7)](_0x4c7c99(0x1de)+_0x2757d6,_0x4c7c99(0x1d1));const [_0x499475]=_0x584436[_0x4c7c99(0x1bd)][_0x4c7c99(0x18a)](_0x186f92,0x1),_0x36243c=(_0xcd1600['now']??(()=>new Date()))()[_0x4c7c99(0x1d8)]();_0x584436[_0x4c7c99(0x1ba)]=_0x36243c;const _0x30a46c=writeServiceRegistry(_0x584436,_0xcd1600);return{'registryPath':_0x30a46c,'entry':_0x499475,'serviceCount':_0x584436[_0x4c7c99(0x1bd)][_0x4c7c99(0x1c9)]};}export function listLocalServices(_0x16a6db={}){return readServiceRegistry(_0x16a6db)['services'];}export function getLocalServiceEntry(_0x1e7ddb,_0xa41dd4={}){const _0x25b1fe=a62_0x143389;return readServiceRegistry(_0xa41dd4)['services'][_0x25b1fe(0x196)](_0x525f6b=>_0x525f6b[_0x25b1fe(0x19b)]===_0x1e7ddb[_0x25b1fe(0x19d)]());}export function listLocalServiceTrees(_0x2ea9f7={}){const _0x563b6e=a62_0x143389;return readServiceRegistry(_0x2ea9f7)['services'][_0x563b6e(0x1c7)](_0x483f14=>_0x483f14[_0x563b6e(0x1bb)]);}export function inspectServiceRegistry(_0x1c7a21={}){const _0x211a7f=a62_0x143389,_0xce0e3b=getServiceRegistryPath(_0x1c7a21);if(!existsSync(_0xce0e3b))return emptyServiceRegistryInspection(_0xce0e3b,_0x211a7f(0x18d),![]);try{const _0x11600b=readFileSync(_0xce0e3b,_0x211a7f(0x1cd));if(!_0x11600b[_0x211a7f(0x19d)]())return emptyServiceRegistryInspection(_0xce0e3b,'empty',!![]);const _0xe5e1ad=JSON['parse'](_0x11600b);if(_0xe5e1ad['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0xce0e3b,'invalid',!![]),'schemaVersion':_0xe5e1ad[_0x211a7f(0x1ca)],'message':_0x211a7f(0x192)+String(_0xe5e1ad[_0x211a7f(0x1ca)])};if(!Array[_0x211a7f(0x1dc)](_0xe5e1ad[_0x211a7f(0x1bd)]))return{...emptyServiceRegistryInspection(_0xce0e3b,'invalid',!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xe5e1ad[_0x211a7f(0x1ba)],'message':'services\x20must\x20be\x20an\x20array'};const _0x2d8f35=_0xe5e1ad[_0x211a7f(0x1bd)][_0x211a7f(0x1c7)](summarizeLocalServiceEntry);return{'registryPath':_0xce0e3b,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xe5e1ad[_0x211a7f(0x1ba)],'serviceCount':_0x2d8f35[_0x211a7f(0x1c9)],'commandCount':_0x2d8f35[_0x211a7f(0x199)]((_0x130c66,_0x263606)=>_0x130c66+_0x263606[_0x211a7f(0x1d3)],0x0),'services':_0x2d8f35};}catch(_0x50e607){return{...emptyServiceRegistryInspection(_0xce0e3b,_0x211a7f(0x1d9),!![]),'message':_0x50e607 instanceof Error?_0x50e607['message']:String(_0x50e607)};}}export function formatValidationFailure(_0x593659){const _0x4b4a69=a62_0x143389,_0x335c66=_0x593659['errors'][_0x4b4a69(0x1c7)](_0x94b7a3=>_0x94b7a3[_0x4b4a69(0x1d5)]+':\x20'+_0x94b7a3[_0x4b4a69(0x190)]);return _0x4b4a69(0x18c)+_0x335c66[_0x4b4a69(0x1b0)]('\x0a');}function extractLoadedServiceManifests(_0x5d489c,_0x32bc66){const _0x2db93d=a62_0x143389;if(!isServiceRegistryLike(_0x5d489c)){const _0x27542f=_0x5d489c,{manifest:_0x2d5453,errors:_0x21809a}=adaptServiceTreeManifestForLegacyFramework(_0x27542f),_0x128ca6=validateServiceTreeManifest(_0x2d5453),_0xbd0cfb=mergeValidationErrors(_0x128ca6,_0x21809a);return[{'manifest':_0x27542f,'report':_0xbd0cfb,'normalizedManifest':_0xbd0cfb['ok']?normalizeServiceTreeManifest(_0x2d5453):undefined,'sourceHash':_0x32bc66}];}return _0x5d489c['services'][_0x2db93d(0x1c7)]((_0x2a5d08,_0x3b0cdb)=>{const _0x265948=_0x2db93d,_0x120d6a=isObjectRecord(_0x2a5d08)?_0x2a5d08[_0x265948(0x1a9)]:undefined,{manifest:_0x15b113,errors:_0xdb253b}=adaptServiceTreeManifestForLegacyFramework(_0x120d6a),_0x302f8e=validateServiceTreeManifest(_0x15b113),_0x413164=mergeValidationErrors(_0x302f8e,_0xdb253b),_0x4ae1e1=isObjectRecord(_0x2a5d08)&&typeof _0x2a5d08['serviceCode']===_0x265948(0x1a8)?_0x2a5d08[_0x265948(0x19b)]:undefined;return{'manifest':_0x120d6a,'report':_0x413164,'normalizedManifest':_0x413164['ok']?normalizeServiceTreeManifest(_0x15b113):undefined,'sourceHash':sha256(JSON[_0x265948(0x1c1)](_0x120d6a,null,0x2)+'\x0a'),'registryIndex':_0x3b0cdb,'registryServiceCode':_0x4ae1e1};});}function mergeValidationErrors(_0x51e429,_0x4ff643){const _0x1f15fd=a62_0x143389,_0x3cef66=_0x51e429['errors']['map'](_0x488229=>_0x488229['message']===_0x1f15fd(0x1ab)?{..._0x488229,'message':'bff\x20target\x20requires\x20functionName.'}:_0x488229),_0x5a16f8=[..._0x4ff643,..._0x3cef66];return{'ok':_0x5a16f8[_0x1f15fd(0x1c9)]===0x0,'errors':_0x5a16f8,'warnings':_0x51e429['warnings']};}function aggregateValidationReports(_0x2577f3){const _0x234c38=a62_0x143389,_0x1735b2=_0x2577f3[_0x234c38(0x1bf)](_0x382137=>_0x382137[_0x234c38(0x1c6)]===undefined?_0x382137[_0x234c38(0x1a3)]['errors']:_0x382137['report'][_0x234c38(0x1aa)][_0x234c38(0x1c7)](_0x30f559=>({..._0x30f559,'path':prefixRegistryIssuePath(_0x382137[_0x234c38(0x1c6)],_0x30f559[_0x234c38(0x1d5)])}))),_0x552638=_0x2577f3[_0x234c38(0x1bf)](_0x48eeaf=>_0x48eeaf[_0x234c38(0x1c6)]===undefined?_0x48eeaf['report'][_0x234c38(0x1ac)]:_0x48eeaf[_0x234c38(0x1a3)][_0x234c38(0x1ac)][_0x234c38(0x1c7)](_0x457c4d=>({..._0x457c4d,'path':prefixRegistryIssuePath(_0x48eeaf[_0x234c38(0x1c6)],_0x457c4d[_0x234c38(0x1d5)])})));return{'ok':_0x1735b2['length']===0x0,'errors':_0x1735b2,'warnings':_0x552638};}function prefixRegistryIssuePath(_0x4a1f02,_0x113f7b){const _0x94cd4b=a62_0x143389;if(_0x113f7b==='$')return _0x94cd4b(0x194)+_0x4a1f02+_0x94cd4b(0x1b4);if(_0x113f7b[_0x94cd4b(0x18f)]('$.'))return _0x94cd4b(0x194)+_0x4a1f02+_0x94cd4b(0x1b4)+_0x113f7b[_0x94cd4b(0x1be)](0x1);if(_0x113f7b[_0x94cd4b(0x18f)]('$['))return'$.services['+_0x4a1f02+_0x94cd4b(0x1b4)+_0x113f7b[_0x94cd4b(0x1be)](0x1);return _0x94cd4b(0x194)+_0x4a1f02+'].manifest.'+_0x113f7b;}function isServiceRegistryLike(_0x4a305d){const _0x2b253f=a62_0x143389;return isObjectRecord(_0x4a305d)&&_0x4a305d[_0x2b253f(0x1ca)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x4a305d[_0x2b253f(0x1bd)]);}function isObjectRecord(_0xf0ac7b){const _0x3905c1=a62_0x143389;return Boolean(_0xf0ac7b)&&typeof _0xf0ac7b==='object'&&!Array[_0x3905c1(0x1dc)](_0xf0ac7b);}function emptyServiceRegistryInspection(_0x1a7c59,_0x505d4d,_0x5ee62b){return{'registryPath':_0x1a7c59,'exists':_0x5ee62b,'status':_0x505d4d,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x565302){const _0x4fbe55=a62_0x143389,_0x48aa9a=_0x565302[_0x4fbe55(0x1bb)],_0x94be44=_0x48aa9a[_0x4fbe55(0x1b8)][_0x4fbe55(0x1c7)](_0x72ca2c=>({'path':_0x72ca2c[_0x4fbe55(0x1c5)],'description':_0x72ca2c['description'],'risk':_0x72ca2c[_0x4fbe55(0x1db)],'targetKind':_0x72ca2c[_0x4fbe55(0x195)][_0x4fbe55(0x1b5)],'targetCommand':_0x72ca2c[_0x4fbe55(0x195)][_0x4fbe55(0x1ce)]}));return{'serviceCode':_0x565302[_0x4fbe55(0x19b)],'name':_0x48aa9a[_0x4fbe55(0x1c4)][_0x4fbe55(0x1a5)],'description':_0x48aa9a[_0x4fbe55(0x1c4)][_0x4fbe55(0x1bc)],'version':_0x565302[_0x4fbe55(0x1a1)],'importedAt':_0x565302[_0x4fbe55(0x18e)],'source':_0x565302[_0x4fbe55(0x191)],'commandCount':_0x94be44[_0x4fbe55(0x1c9)],'commands':_0x94be44};}function sha256(_0x405d06){const _0x4b36a7=a62_0x143389;return createHash(_0x4b36a7(0x198))[_0x4b36a7(0x193)](_0x405d06)[_0x4b36a7(0x1a7)](_0x4b36a7(0x1c2));}
1
+ (function(_0x56c56a,_0x4cf880){const _0x5aeab0=a62_0x270a,_0x10a3e9=_0x56c56a();while(!![]){try{const _0x18e54c=parseInt(_0x5aeab0(0x144))/0x1+-parseInt(_0x5aeab0(0x108))/0x2*(parseInt(_0x5aeab0(0x10e))/0x3)+-parseInt(_0x5aeab0(0x143))/0x4*(parseInt(_0x5aeab0(0x138))/0x5)+-parseInt(_0x5aeab0(0x12e))/0x6*(parseInt(_0x5aeab0(0x153))/0x7)+parseInt(_0x5aeab0(0x10c))/0x8*(parseInt(_0x5aeab0(0x115))/0x9)+-parseInt(_0x5aeab0(0x158))/0xa*(parseInt(_0x5aeab0(0x136))/0xb)+parseInt(_0x5aeab0(0x147))/0xc;if(_0x18e54c===_0x4cf880)break;else _0x10a3e9['push'](_0x10a3e9['shift']());}catch(_0x5be897){_0x10a3e9['push'](_0x10a3e9['shift']());}}}(a62_0x5597,0xc4908));import{createHash}from'node:crypto';function a62_0x270a(_0xfde32c,_0x34739e){_0xfde32c=_0xfde32c-0x101;const _0x5597d7=a62_0x5597();let _0x270a1d=_0x5597d7[_0xfde32c];return _0x270a1d;}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='service.json';export function getServiceRegistryPath(_0x2e4772={}){const _0x3e1cd2=a62_0x270a;return resolve(_0x2e4772[_0x3e1cd2(0x11e)]??homedir(),PRODUCT_CONFIG[_0x3e1cd2(0x140)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x1db4f9={}){const _0xb1f206=a62_0x270a,_0x530bc3=getServiceRegistryPath(_0x1db4f9);if(!existsSync(_0x530bc3))return emptyServiceRegistry();try{const _0x3d2480=readFileSync(_0x530bc3,'utf8');if(!_0x3d2480[_0xb1f206(0x13d)]())return emptyServiceRegistry();const _0x2ee147=JSON['parse'](_0x3d2480);if(_0x2ee147[_0xb1f206(0x101)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0xb1f206(0x118)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x2ee147[_0xb1f206(0x101)]),_0xb1f206(0x157)+_0x530bc3+'.');if(!Array[_0xb1f206(0x137)](_0x2ee147[_0xb1f206(0x12d)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2ee147[_0xb1f206(0x15a)],'services':_0x2ee147['services']};}catch(_0x4a1fcc){if(_0x4a1fcc instanceof Error&&_0x4a1fcc[_0xb1f206(0x14d)]===_0xb1f206(0x10a))throw _0x4a1fcc;throw CliErrors['validation'](_0xb1f206(0x152)+_0x530bc3,_0xb1f206(0x11b));}}export function writeServiceRegistry(_0xeda3f0,_0x535e06={}){const _0x1d53f0=a62_0x270a,_0x11f531=getServiceRegistryPath(_0x535e06),_0x222350=dirname(_0x11f531);!existsSync(_0x222350)&&mkdirSync(_0x222350,{'recursive':!![]});const _0x5098c7=_0x11f531+_0x1d53f0(0x131);try{writeFileSync(_0x5098c7,JSON[_0x1d53f0(0x102)](_0xeda3f0,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x5098c7,_0x11f531);}catch(_0x9ed08a){try{unlinkSync(_0x5098c7);}catch{}if(_0x9ed08a?.[_0x1d53f0(0x125)]===_0x1d53f0(0x132))throw CliErrors['validation'](_0x1d53f0(0x11d)+_0x11f531);throw _0x9ed08a;}return _0x11f531;}export function loadServiceManifestFromFile(_0x23d759){const _0x4dd3d0=a62_0x270a,_0x55fa0f=resolve(_0x23d759);if(!existsSync(_0x55fa0f))throw CliErrors[_0x4dd3d0(0x118)](_0x4dd3d0(0x134)+_0x23d759);let _0xdf1d0c;const _0x509cf7=readFileSync(_0x55fa0f,_0x4dd3d0(0x128));try{_0xdf1d0c=JSON[_0x4dd3d0(0x112)](_0x509cf7);}catch{throw CliErrors[_0x4dd3d0(0x118)](_0x4dd3d0(0x14f)+_0x23d759,_0x4dd3d0(0x156));}const _0x45341f=sha256(_0x509cf7),_0x1bf74c=extractLoadedServiceManifests(_0xdf1d0c,_0x45341f),_0x58b730=aggregateValidationReports(_0x1bf74c),_0x7be125=_0x1bf74c[0x0];return{'filePath':_0x55fa0f,'hash':_0x45341f,'kind':isServiceRegistryLike(_0xdf1d0c)?_0x4dd3d0(0x124):_0x4dd3d0(0x13a),'manifest':_0x7be125?.[_0x4dd3d0(0x13a)]??_0xdf1d0c,'report':_0x58b730,'normalizedManifest':_0x1bf74c[_0x4dd3d0(0x12a)]===0x1?_0x7be125?.[_0x4dd3d0(0x146)]:undefined,'manifests':_0x1bf74c};}export function importServiceManifest(_0x5177ec,_0x1a41e4={}){const _0x5693de=a62_0x270a,_0x5dbed0=loadServiceManifestFromFile(_0x5177ec);if(!_0x5dbed0[_0x5693de(0x109)]['ok'])throw CliErrors[_0x5693de(0x118)](formatValidationFailure(_0x5dbed0[_0x5693de(0x109)]),_0x5693de(0x11a));if(_0x5dbed0[_0x5693de(0x11c)][_0x5693de(0x12a)]===0x0)throw CliErrors[_0x5693de(0x118)]('Service\x20registry\x20has\x20no\x20services\x20to\x20import.',_0x5693de(0x12b));const _0x35ba95=readServiceRegistry(_0x1a41e4),_0xee6739=(_0x1a41e4[_0x5693de(0x13c)]??(()=>new Date()))()[_0x5693de(0x123)](),_0x35a991=[];let _0x2cb359=0x0,_0x321a57=0x0;for(const _0x256ee0 of _0x5dbed0[_0x5693de(0x11c)]){if(!_0x256ee0[_0x5693de(0x146)])continue;const _0x273d2d=_0x256ee0['normalizedManifest']['service'][_0x5693de(0x125)],_0x25c0e8={'serviceCode':_0x273d2d,'version':_0x256ee0[_0x5693de(0x146)]['version'],'importedAt':_0xee6739,'source':{'type':_0x5693de(0x110),'path':_0x5dbed0[_0x5693de(0x150)],'hash':_0x256ee0[_0x5693de(0x130)]},'manifest':_0x256ee0['manifest'],'normalizedManifest':_0x256ee0[_0x5693de(0x146)]},_0x16d939=_0x35ba95[_0x5693de(0x12d)][_0x5693de(0x12c)](_0x82e106=>_0x82e106[_0x5693de(0x126)]===_0x273d2d);_0x16d939>=0x0?(_0x35ba95[_0x5693de(0x12d)][_0x16d939]=_0x25c0e8,_0x321a57++):(_0x35ba95[_0x5693de(0x12d)][_0x5693de(0x155)](_0x25c0e8),_0x2cb359++),_0x35a991['push'](_0x25c0e8);}_0x35ba95[_0x5693de(0x12d)]['sort']((_0x3dd86b,_0x4bbb3c)=>_0x3dd86b[_0x5693de(0x126)][_0x5693de(0x135)](_0x4bbb3c['serviceCode'])),_0x35ba95[_0x5693de(0x15a)]=_0xee6739;const _0x163b7a=writeServiceRegistry(_0x35ba95,_0x1a41e4);return{'registryPath':_0x163b7a,'entry':_0x35a991[0x0],'replaced':_0x35a991[_0x5693de(0x12a)]===0x1?_0x321a57===0x1:_0x321a57>0x0,'entries':_0x35a991,'imported':_0x2cb359,'updated':_0x321a57,'serviceCount':_0x35ba95[_0x5693de(0x12d)]['length']};}export function exportServiceManifest(_0x45669e,_0x36e642,_0x59906d={}){const _0x42eb85=a62_0x270a,_0x11e4c0=getServiceRegistryPath(_0x59906d),_0x42d8c3=getLocalServiceEntry(_0x45669e,_0x59906d);if(!_0x42d8c3)throw CliErrors['validation'](_0x42eb85(0x151)+_0x45669e,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x4a9734=resolve(_0x36e642),_0x27e475=dirname(_0x4a9734);return!existsSync(_0x27e475)&&mkdirSync(_0x27e475,{'recursive':!![]}),writeFileSync(_0x4a9734,JSON[_0x42eb85(0x102)](_0x42d8c3[_0x42eb85(0x13a)],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x11e4c0,'filePath':_0x4a9734,'entry':_0x42d8c3};}export function removeServiceManifest(_0x129e13,_0x1fca5d={}){const _0x3d0ee3=a62_0x270a,_0x5e4f25=readServiceRegistry(_0x1fca5d),_0x3e19c7=_0x129e13['trim'](),_0xa82222=_0x5e4f25[_0x3d0ee3(0x12d)][_0x3d0ee3(0x12c)](_0x361535=>_0x361535[_0x3d0ee3(0x126)]===_0x3e19c7);if(_0xa82222<0x0)throw CliErrors[_0x3d0ee3(0x118)]('Local\x20service\x20not\x20found:\x20'+_0x3e19c7,_0x3d0ee3(0x11f));const [_0x2ac06]=_0x5e4f25[_0x3d0ee3(0x12d)][_0x3d0ee3(0x104)](_0xa82222,0x1),_0x59f294=(_0x1fca5d[_0x3d0ee3(0x13c)]??(()=>new Date()))()[_0x3d0ee3(0x123)]();_0x5e4f25['updatedAt']=_0x59f294;const _0x45651a=writeServiceRegistry(_0x5e4f25,_0x1fca5d);return{'registryPath':_0x45651a,'entry':_0x2ac06,'serviceCount':_0x5e4f25[_0x3d0ee3(0x12d)][_0x3d0ee3(0x12a)]};}export function listLocalServices(_0x59c36f={}){const _0x21e750=a62_0x270a;return readServiceRegistry(_0x59c36f)[_0x21e750(0x12d)];}export function getLocalServiceEntry(_0x18eb9c,_0x3e9aee={}){const _0x38937f=a62_0x270a;return readServiceRegistry(_0x3e9aee)[_0x38937f(0x12d)][_0x38937f(0x139)](_0x4a0293=>_0x4a0293[_0x38937f(0x126)]===_0x18eb9c['trim']());}export function listLocalServiceTrees(_0x138ed8={}){const _0x1131db=a62_0x270a;return readServiceRegistry(_0x138ed8)[_0x1131db(0x12d)][_0x1131db(0x145)](_0x1c5322=>_0x1c5322[_0x1131db(0x146)]);}export function inspectServiceRegistry(_0x526711={}){const _0x48ecb3=a62_0x270a,_0x362706=getServiceRegistryPath(_0x526711);if(!existsSync(_0x362706))return emptyServiceRegistryInspection(_0x362706,_0x48ecb3(0x10b),![]);try{const _0x23e2b4=readFileSync(_0x362706,_0x48ecb3(0x128));if(!_0x23e2b4[_0x48ecb3(0x13d)]())return emptyServiceRegistryInspection(_0x362706,_0x48ecb3(0x113),!![]);const _0x2efde5=JSON[_0x48ecb3(0x112)](_0x23e2b4);if(_0x2efde5[_0x48ecb3(0x101)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x362706,_0x48ecb3(0x141),!![]),'schemaVersion':_0x2efde5['schemaVersion'],'message':_0x48ecb3(0x119)+String(_0x2efde5[_0x48ecb3(0x101)])};if(!Array[_0x48ecb3(0x137)](_0x2efde5[_0x48ecb3(0x12d)]))return{...emptyServiceRegistryInspection(_0x362706,_0x48ecb3(0x141),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2efde5[_0x48ecb3(0x15a)],'message':_0x48ecb3(0x122)};const _0x38d46f=_0x2efde5[_0x48ecb3(0x12d)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x362706,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2efde5[_0x48ecb3(0x15a)],'serviceCount':_0x38d46f[_0x48ecb3(0x12a)],'commandCount':_0x38d46f[_0x48ecb3(0x14a)]((_0x42a5c8,_0x55ad44)=>_0x42a5c8+_0x55ad44[_0x48ecb3(0x14e)],0x0),'services':_0x38d46f};}catch(_0x1c64d1){return{...emptyServiceRegistryInspection(_0x362706,_0x48ecb3(0x141),!![]),'message':_0x1c64d1 instanceof Error?_0x1c64d1[_0x48ecb3(0x117)]:String(_0x1c64d1)};}}function a62_0x5597(){const _0x3829ce=['registry','code','serviceCode','command','utf8','importedAt','length','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','findIndex','services','6URSpRP','Service\x20manifest\x20validation\x20failed:\x0a','sourceHash','.tmp','ENOENT','$.services[','Service\x20manifest\x20file\x20not\x20found:\x20','localeCompare','3361391pSUVDK','isArray','10WIqzso','find','manifest','description','now','trim','target','warnings','homeDirName','invalid','version','2444460SGsHus','918931TZrhui','map','normalizedManifest','15970488XBHSaA','flatMap','join','reduce','slice','kind','name','commandCount','Invalid\x20service\x20manifest\x20JSON:\x20','filePath','Local\x20service\x20not\x20found:\x20','Invalid\x20service\x20registry\x20JSON:\x20','78967gktsxs','startsWith','push','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','Remove\x20or\x20migrate\x20','20kXAoeX','registryIndex','updatedAt','schemaVersion','stringify','cliPath','splice','service','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','errors','46zcRVrr','report','CliError','missing','16YIfbms','].manifest','20442JzwuNc','path','file','source','parse','empty','digest','2505231osAJuY','update','message','validation','Unsupported\x20schemaVersion:\x20','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','manifests','Cannot\x20write\x20service\x20registry:\x20','homeDir','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','bff\x20target\x20requires\x20functionName.','hex','services\x20must\x20be\x20an\x20array','toISOString'];a62_0x5597=function(){return _0x3829ce;};return a62_0x5597();}export function formatValidationFailure(_0x521cb5){const _0x491586=a62_0x270a,_0x425022=_0x521cb5[_0x491586(0x107)][_0x491586(0x145)](_0x565b6e=>_0x565b6e[_0x491586(0x10f)]+':\x20'+_0x565b6e[_0x491586(0x117)]);return _0x491586(0x12f)+_0x425022[_0x491586(0x149)]('\x0a');}function extractLoadedServiceManifests(_0x38e325,_0x5d71e5){const _0x1e5e88=a62_0x270a;if(!isServiceRegistryLike(_0x38e325)){const _0x57390f=_0x38e325,{manifest:_0x2089de,errors:_0x418e65}=adaptServiceTreeManifestForLegacyFramework(_0x57390f),_0x43538f=validateServiceTreeManifest(_0x2089de),_0x46d36b=mergeValidationErrors(_0x43538f,_0x418e65);return[{'manifest':_0x57390f,'report':_0x46d36b,'normalizedManifest':_0x46d36b['ok']?normalizeServiceTreeManifest(_0x2089de):undefined,'sourceHash':_0x5d71e5}];}return _0x38e325[_0x1e5e88(0x12d)][_0x1e5e88(0x145)]((_0x4d7aef,_0x330e35)=>{const _0x45e10a=_0x1e5e88,_0xe70bca=isObjectRecord(_0x4d7aef)?_0x4d7aef[_0x45e10a(0x13a)]:undefined,{manifest:_0x1a6cd2,errors:_0x397bfe}=adaptServiceTreeManifestForLegacyFramework(_0xe70bca),_0x68f2e4=validateServiceTreeManifest(_0x1a6cd2),_0x360f6f=mergeValidationErrors(_0x68f2e4,_0x397bfe),_0x4684d2=isObjectRecord(_0x4d7aef)&&typeof _0x4d7aef['serviceCode']==='string'?_0x4d7aef[_0x45e10a(0x126)]:undefined;return{'manifest':_0xe70bca,'report':_0x360f6f,'normalizedManifest':_0x360f6f['ok']?normalizeServiceTreeManifest(_0x1a6cd2):undefined,'sourceHash':sha256(JSON['stringify'](_0xe70bca,null,0x2)+'\x0a'),'registryIndex':_0x330e35,'registryServiceCode':_0x4684d2};});}function mergeValidationErrors(_0x40893e,_0x413f28){const _0x5d6e81=a62_0x270a,_0x5147c3=_0x40893e[_0x5d6e81(0x107)][_0x5d6e81(0x145)](_0x388fbf=>_0x388fbf[_0x5d6e81(0x117)]===_0x5d6e81(0x106)?{..._0x388fbf,'message':_0x5d6e81(0x120)}:_0x388fbf),_0x2c2606=[..._0x413f28,..._0x5147c3];return{'ok':_0x2c2606['length']===0x0,'errors':_0x2c2606,'warnings':_0x40893e['warnings']};}function aggregateValidationReports(_0x2f3599){const _0x4b0829=a62_0x270a,_0x5419f8=_0x2f3599['flatMap'](_0x5c8294=>_0x5c8294[_0x4b0829(0x159)]===undefined?_0x5c8294['report'][_0x4b0829(0x107)]:_0x5c8294['report'][_0x4b0829(0x107)][_0x4b0829(0x145)](_0x43fbc6=>({..._0x43fbc6,'path':prefixRegistryIssuePath(_0x5c8294[_0x4b0829(0x159)],_0x43fbc6['path'])}))),_0x14283a=_0x2f3599[_0x4b0829(0x148)](_0x29014d=>_0x29014d[_0x4b0829(0x159)]===undefined?_0x29014d[_0x4b0829(0x109)][_0x4b0829(0x13f)]:_0x29014d[_0x4b0829(0x109)][_0x4b0829(0x13f)][_0x4b0829(0x145)](_0x12a88c=>({..._0x12a88c,'path':prefixRegistryIssuePath(_0x29014d[_0x4b0829(0x159)],_0x12a88c[_0x4b0829(0x10f)])})));return{'ok':_0x5419f8['length']===0x0,'errors':_0x5419f8,'warnings':_0x14283a};}function prefixRegistryIssuePath(_0x238ea9,_0x4a822){const _0x3d29c7=a62_0x270a;if(_0x4a822==='$')return'$.services['+_0x238ea9+_0x3d29c7(0x10d);if(_0x4a822[_0x3d29c7(0x154)]('$.'))return _0x3d29c7(0x133)+_0x238ea9+_0x3d29c7(0x10d)+_0x4a822[_0x3d29c7(0x14b)](0x1);if(_0x4a822[_0x3d29c7(0x154)]('$['))return _0x3d29c7(0x133)+_0x238ea9+_0x3d29c7(0x10d)+_0x4a822[_0x3d29c7(0x14b)](0x1);return _0x3d29c7(0x133)+_0x238ea9+'].manifest.'+_0x4a822;}function isServiceRegistryLike(_0x2c8813){const _0x121e0a=a62_0x270a;return isObjectRecord(_0x2c8813)&&_0x2c8813['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x121e0a(0x137)](_0x2c8813[_0x121e0a(0x12d)]);}function isObjectRecord(_0x42310f){const _0x24ab84=a62_0x270a;return Boolean(_0x42310f)&&typeof _0x42310f==='object'&&!Array[_0x24ab84(0x137)](_0x42310f);}function emptyServiceRegistryInspection(_0x430198,_0x322678,_0x57eb53){return{'registryPath':_0x430198,'exists':_0x57eb53,'status':_0x322678,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x666ff9){const _0x11fe1e=a62_0x270a,_0x3a06a3=_0x666ff9[_0x11fe1e(0x146)],_0x268c3e=_0x3a06a3['commands']['map'](_0x2e0d56=>({'path':_0x2e0d56[_0x11fe1e(0x103)],'description':_0x2e0d56[_0x11fe1e(0x13b)],'risk':_0x2e0d56['risk'],'targetKind':_0x2e0d56[_0x11fe1e(0x13e)][_0x11fe1e(0x14c)],'targetCommand':_0x2e0d56[_0x11fe1e(0x13e)][_0x11fe1e(0x127)]}));return{'serviceCode':_0x666ff9['serviceCode'],'name':_0x3a06a3[_0x11fe1e(0x105)][_0x11fe1e(0x14d)],'description':_0x3a06a3[_0x11fe1e(0x105)][_0x11fe1e(0x13b)],'version':_0x666ff9[_0x11fe1e(0x142)],'importedAt':_0x666ff9[_0x11fe1e(0x129)],'source':_0x666ff9[_0x11fe1e(0x111)],'commandCount':_0x268c3e['length'],'commands':_0x268c3e};}function sha256(_0x408c46){const _0x193890=a62_0x270a;return createHash('sha256')[_0x193890(0x116)](_0x408c46)[_0x193890(0x114)](_0x193890(0x121));}
@@ -1 +1 @@
1
- const a63_0x3794f6=a63_0x2993;(function(_0x526619,_0x50ad95){const _0x246d43=a63_0x2993,_0x141f36=_0x526619();while(!![]){try{const _0x5c029f=-parseInt(_0x246d43(0x1c8))/0x1+-parseInt(_0x246d43(0x1de))/0x2+-parseInt(_0x246d43(0x1db))/0x3*(-parseInt(_0x246d43(0x1ca))/0x4)+-parseInt(_0x246d43(0x1d6))/0x5*(parseInt(_0x246d43(0x1d8))/0x6)+-parseInt(_0x246d43(0x1cc))/0x7*(-parseInt(_0x246d43(0x1c7))/0x8)+-parseInt(_0x246d43(0x1cb))/0x9+-parseInt(_0x246d43(0x1cf))/0xa*(-parseInt(_0x246d43(0x1d4))/0xb);if(_0x5c029f===_0x50ad95)break;else _0x141f36['push'](_0x141f36['shift']());}catch(_0x2e71a0){_0x141f36['push'](_0x141f36['shift']());}}}(a63_0x4d6d,0x5348b));function a63_0x2993(_0x195c83,_0x2b9055){_0x195c83=_0x195c83-0x1c0;const _0x4d6d10=a63_0x4d6d();let _0x299352=_0x4d6d10[_0x195c83];return _0x299352;}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';function a63_0x4d6d(){const _0x2b18e0=['Skill\x20directory\x20already\x20exists:\x20','16934790JoEtnf','files','rendered','skillName','str','11pingNJ','create','106885CrdLYf','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','6pmZUXq','name','WRITE','276ojqkkY','target','Refusing\x20to\x20overwrite\x20symlink:\x20','1229910XhEDxN','skillDir','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','path','bool','map','trim','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','type','创建本地自包含的运行态\x20Skill\x20草稿','936JhsAmf','617566TlXllp','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','4844BybgMb','3618837vRlebJ','11501jzncQK','validation'];a63_0x4d6d=function(){return _0x2b18e0;};return a63_0x4d6d();}import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':'skill','command':a63_0x3794f6(0x1d5),'description':a63_0x3794f6(0x1c6),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x3b4fdb){const _0x5c9fc5=a63_0x3794f6,_0x494152=buildSkillCreatePlan(_0x3b4fdb[_0x5c9fc5(0x1d3)]('name'),_0x3b4fdb[_0x5c9fc5(0x1d3)]('type'),_0x3b4fdb[_0x5c9fc5(0x1d3)]('target'));return{'method':_0x5c9fc5(0x1da),'url':_0x494152[_0x5c9fc5(0x1df)],'body':{'skillName':_0x494152['rendered'][_0x5c9fc5(0x1d2)],'type':_0x494152['rendered'][_0x5c9fc5(0x1c5)],'selfContained':!![],'files':_0x494152[_0x5c9fc5(0x1d1)]['files'][_0x5c9fc5(0x1c2)](_0x3caf9c=>_0x3caf9c[_0x5c9fc5(0x1c0)])},'description':_0x5c9fc5(0x1d7)};},async 'execute'(_0x7f2d7a){const _0x8107c2=a63_0x3794f6,_0x59994d=buildSkillCreatePlan(_0x7f2d7a[_0x8107c2(0x1d3)](_0x8107c2(0x1d9)),_0x7f2d7a['str'](_0x8107c2(0x1c5)),_0x7f2d7a[_0x8107c2(0x1d3)](_0x8107c2(0x1dc)));return writeSkillDraft(_0x59994d,_0x7f2d7a[_0x8107c2(0x1c1)]('force')),{'ok':!![],'data':{'skillName':_0x59994d[_0x8107c2(0x1d1)][_0x8107c2(0x1d2)],'type':_0x59994d[_0x8107c2(0x1d1)]['type'],'dir':_0x59994d['skillDir'],'files':_0x59994d[_0x8107c2(0x1d1)][_0x8107c2(0x1d0)][_0x8107c2(0x1c2)](_0x3286bf=>_0x3286bf[_0x8107c2(0x1c0)])},'message':'Created\x20local\x20Skill\x20draft\x20'+_0x59994d[_0x8107c2(0x1d1)][_0x8107c2(0x1d2)]};}};function buildSkillCreatePlan(_0x406c2d,_0x3cbc20,_0x1b84f4){const _0x52a42c=a63_0x3794f6,_0x16c74d=_0x3cbc20[_0x52a42c(0x1c3)](),_0x259be4=renderSkillTemplate({'skillName':_0x406c2d,'type':_0x16c74d});!_0x16c74d&&writeCliSideChannelLine(_0x52a42c(0x1e0));const _0x45030e=resolve(normalizeSkillTarget(_0x1b84f4));return{'rendered':_0x259be4,'targetRoot':_0x45030e,'skillDir':resolve(_0x45030e,_0x259be4[_0x52a42c(0x1d2)])};}function normalizeSkillTarget(_0x59bcfc){const _0x244c7a=a63_0x3794f6;return(_0x59bcfc||DEFAULT_SKILL_TARGET)[_0x244c7a(0x1c3)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0xda3486,_0x376c47){const _0x23045c=a63_0x3794f6;if(existsSync(_0xda3486[_0x23045c(0x1df)])){const _0x397d54=lstatSync(_0xda3486[_0x23045c(0x1df)]);if(!_0x397d54['isDirectory']()||_0x397d54['isSymbolicLink']())throw CliErrors[_0x23045c(0x1cd)](_0x23045c(0x1c4)+_0xda3486[_0x23045c(0x1df)]);if(!_0x376c47)throw CliErrors[_0x23045c(0x1cd)](_0x23045c(0x1ce)+_0xda3486[_0x23045c(0x1df)],_0x23045c(0x1c9));}for(const _0x16dd91 of _0xda3486[_0x23045c(0x1d1)][_0x23045c(0x1d0)]){const _0x1d6969=resolve(_0xda3486[_0x23045c(0x1df)],_0x16dd91[_0x23045c(0x1c0)]),_0x5784ba=dirname(_0x1d6969);mkdirSync(_0x5784ba,{'recursive':!![]});if(existsSync(_0x1d6969)&&lstatSync(_0x1d6969)['isSymbolicLink']())throw CliErrors[_0x23045c(0x1cd)](_0x23045c(0x1dd)+_0x1d6969);writeFileSync(_0x1d6969,_0x16dd91['content'],'utf8');}}
1
+ function a63_0x4ad9(_0x13296e,_0x20ea93){_0x13296e=_0x13296e-0x1be;const _0x17a593=a63_0x17a5();let _0x4ad96f=_0x17a593[_0x13296e];return _0x4ad96f;}const a63_0x1f99e3=a63_0x4ad9;(function(_0xf7b3da,_0x1b6c4f){const _0x10c0d8=a63_0x4ad9,_0x51daf6=_0xf7b3da();while(!![]){try{const _0x513d74=-parseInt(_0x10c0d8(0x1cc))/0x1+-parseInt(_0x10c0d8(0x1d3))/0x2*(parseInt(_0x10c0d8(0x1e1))/0x3)+-parseInt(_0x10c0d8(0x1df))/0x4+parseInt(_0x10c0d8(0x1dc))/0x5*(-parseInt(_0x10c0d8(0x1ce))/0x6)+parseInt(_0x10c0d8(0x1da))/0x7*(-parseInt(_0x10c0d8(0x1be))/0x8)+-parseInt(_0x10c0d8(0x1cb))/0x9*(parseInt(_0x10c0d8(0x1d6))/0xa)+parseInt(_0x10c0d8(0x1c1))/0xb;if(_0x513d74===_0x1b6c4f)break;else _0x51daf6['push'](_0x51daf6['shift']());}catch(_0x34988c){_0x51daf6['push'](_0x51daf6['shift']());}}}(a63_0x17a5,0xedb87));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';function a63_0x17a5(){const _0x456c4f=['target','4518DQXvSe','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','Refusing\x20to\x20overwrite\x20symlink:\x20','skillName','validation','2ULDOwo','str','skillDir','1586540xKfFWQ','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','files','trim','112UCbtBQ','content','9965jBvwYK','name','isSymbolicLink','6177644SwbWMn','map','3754299RHLVil','type','341128nBqJRo','path','create','80518185wyioKY','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','isDirectory','Created\x20local\x20Skill\x20draft\x20','bool','force','Skill\x20directory\x20already\x20exists:\x20','skill','rendered','创建本地自包含的运行态\x20Skill\x20草稿','18JdgrwN','1049995VQhzSW'];a63_0x17a5=function(){return _0x456c4f;};return a63_0x17a5();}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_0x1f99e3(0x1c8),'command':a63_0x1f99e3(0x1c0),'description':a63_0x1f99e3(0x1ca),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x196082){const _0x25a8c2=a63_0x1f99e3,_0x417fac=buildSkillCreatePlan(_0x196082[_0x25a8c2(0x1d4)]('name'),_0x196082['str'](_0x25a8c2(0x1e2)),_0x196082[_0x25a8c2(0x1d4)](_0x25a8c2(0x1cd)));return{'method':'WRITE','url':_0x417fac[_0x25a8c2(0x1d5)],'body':{'skillName':_0x417fac[_0x25a8c2(0x1c9)][_0x25a8c2(0x1d1)],'type':_0x417fac['rendered']['type'],'selfContained':!![],'files':_0x417fac['rendered'][_0x25a8c2(0x1d8)][_0x25a8c2(0x1e0)](_0x139610=>_0x139610['path'])},'description':_0x25a8c2(0x1d7)};},async 'execute'(_0x3a601d){const _0x648686=a63_0x1f99e3,_0x57d975=buildSkillCreatePlan(_0x3a601d[_0x648686(0x1d4)](_0x648686(0x1dd)),_0x3a601d[_0x648686(0x1d4)](_0x648686(0x1e2)),_0x3a601d[_0x648686(0x1d4)]('target'));return writeSkillDraft(_0x57d975,_0x3a601d[_0x648686(0x1c5)](_0x648686(0x1c6))),{'ok':!![],'data':{'skillName':_0x57d975['rendered'][_0x648686(0x1d1)],'type':_0x57d975[_0x648686(0x1c9)][_0x648686(0x1e2)],'dir':_0x57d975[_0x648686(0x1d5)],'files':_0x57d975[_0x648686(0x1c9)]['files'][_0x648686(0x1e0)](_0x7a9388=>_0x7a9388[_0x648686(0x1bf)])},'message':_0x648686(0x1c4)+_0x57d975[_0x648686(0x1c9)][_0x648686(0x1d1)]};}};function buildSkillCreatePlan(_0x39337a,_0x2926d2,_0x30579f){const _0x49b8be=a63_0x1f99e3,_0x1ddc3b=_0x2926d2[_0x49b8be(0x1d9)](),_0xb4314a=renderSkillTemplate({'skillName':_0x39337a,'type':_0x1ddc3b});!_0x1ddc3b&&writeCliSideChannelLine(_0x49b8be(0x1c2));const _0x4aaf2b=resolve(normalizeSkillTarget(_0x30579f));return{'rendered':_0xb4314a,'targetRoot':_0x4aaf2b,'skillDir':resolve(_0x4aaf2b,_0xb4314a['skillName'])};}function normalizeSkillTarget(_0x5e85da){return(_0x5e85da||DEFAULT_SKILL_TARGET)['trim']()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x361c30,_0x476ab7){const _0x243046=a63_0x1f99e3;if(existsSync(_0x361c30[_0x243046(0x1d5)])){const _0x47fcc0=lstatSync(_0x361c30[_0x243046(0x1d5)]);if(!_0x47fcc0[_0x243046(0x1c3)]()||_0x47fcc0[_0x243046(0x1de)]())throw CliErrors[_0x243046(0x1d2)]('Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20'+_0x361c30['skillDir']);if(!_0x476ab7)throw CliErrors[_0x243046(0x1d2)](_0x243046(0x1c7)+_0x361c30[_0x243046(0x1d5)],_0x243046(0x1cf));}for(const _0x5f0a67 of _0x361c30[_0x243046(0x1c9)]['files']){const _0xb367dc=resolve(_0x361c30[_0x243046(0x1d5)],_0x5f0a67[_0x243046(0x1bf)]),_0x41e709=dirname(_0xb367dc);mkdirSync(_0x41e709,{'recursive':!![]});if(existsSync(_0xb367dc)&&lstatSync(_0xb367dc)[_0x243046(0x1de)]())throw CliErrors[_0x243046(0x1d2)](_0x243046(0x1d0)+_0xb367dc);writeFileSync(_0xb367dc,_0x5f0a67[_0x243046(0x1db)],'utf8');}}
@@ -1 +1 @@
1
- const a64_0x20d7b6=a64_0x4b53;(function(_0x5dec15,_0x54e981){const _0x4ca861=a64_0x4b53,_0x2e0fbe=_0x5dec15();while(!![]){try{const _0x366495=-parseInt(_0x4ca861(0xfa))/0x1*(parseInt(_0x4ca861(0x113))/0x2)+parseInt(_0x4ca861(0x11d))/0x3*(parseInt(_0x4ca861(0x119))/0x4)+parseInt(_0x4ca861(0xf7))/0x5+parseInt(_0x4ca861(0x107))/0x6+parseInt(_0x4ca861(0x122))/0x7*(-parseInt(_0x4ca861(0x10d))/0x8)+parseInt(_0x4ca861(0x129))/0x9*(parseInt(_0x4ca861(0x103))/0xa)+-parseInt(_0x4ca861(0x120))/0xb*(parseInt(_0x4ca861(0xf8))/0xc);if(_0x366495===_0x54e981)break;else _0x2e0fbe['push'](_0x2e0fbe['shift']());}catch(_0x341e45){_0x2e0fbe['push'](_0x2e0fbe['shift']());}}}(a64_0x4d93,0xbd62b));import{getRuntimeSkillVersionDiagram,putRuntimeSkillVersionDiagram,validateRuntimeSkillVersionDiagram}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';function a64_0x4d93(){const _0x2f7b4b=['Found\x20Skill\x20diagram\x20for\x20','unchanged','personal',';\x20first\x20write\x20expects\x20revision\x20','expected-diagram-revision','num','将为指定\x20Skill\x20的精确版本创建或替换\x20Mermaid\x20流程图;服务端版本已变化时会拒绝覆盖。确认界面不会展示图表正文。','20UJKuoa','version','No\x20Skill\x20diagram\x20is\x20stored\x20for\x20','company','3337440RgdfHm','skill-code','diagram-file','trim','Skill\x20diagram\x20validation\x20passed\x20for\x20','Updated','8BiYWPA','isInteger','test','diagram-push','Created','validation','96MgdjcK','--skill-code,\x20--version,\x20and\x20--scope\x20personal|company\x20are\x20required.','found',';\x20next\x20write\x20expects\x20revision\x20','appCode','scope','56SpJmyp','--source-fingerprint\x20must\x20be\x20lowercase\x20sha256:<64\x20hex\x20characters>.','write','diagram-validate','246405SuZzMW','\x20Skill\x20diagram\x20for\x20','diagram-show','11NfLfAF','source-fingerprint','2710694tpebUF','action','为指定版本的\x20Skill\x20创建或替换\x20Mermaid\x20图','str','\x20is\x20unchanged.','Skill\x20diagram\x20for\x20','expectedDiagramRevision','5774247BLwHwJ','Validate\x20a\x20Mermaid\x20diagram\x20replacement\x20for\x20one\x20exact\x20Skill\x20version','read','5597670IMNZvl','26914284uNQAqC','skillCode','14646Stvgtb','Show\x20the\x20current\x20Mermaid\x20diagram\x20for\x20one\x20exact\x20Skill\x20version'];a64_0x4d93=function(){return _0x2f7b4b;};return a64_0x4d93();}import{readRequiredSkillDiagram}from'../diagram.js';function a64_0x4b53(_0x12c3b4,_0x144c86){_0x12c3b4=_0x12c3b4-0xf5;const _0x4d931e=a64_0x4d93();let _0x4b53ef=_0x4d931e[_0x12c3b4];return _0x4b53ef;}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(_0x34f55b){const _0x2a024e=a64_0x4b53,_0x10450a=_0x34f55b[_0x2a024e(0x125)](_0x2a024e(0x108))[_0x2a024e(0x10a)](),_0xedf81a=_0x34f55b[_0x2a024e(0x125)](_0x2a024e(0x104))[_0x2a024e(0x10a)](),_0x280b45=_0x34f55b[_0x2a024e(0x125)](_0x2a024e(0x118));if(!_0x10450a||!_0xedf81a||_0x280b45!==_0x2a024e(0xfe)&&_0x280b45!==_0x2a024e(0x106))throw CliErrors['validation'](_0x2a024e(0x114));return{'skillCode':_0x10450a,'version':_0xedf81a,'scope':_0x280b45};}async function readDiagramWriteInput(_0x48f97e){const _0x2e9a8d=a64_0x4b53,_0x525008=_0x48f97e[_0x2e9a8d(0x101)](_0x2e9a8d(0x100)),_0x2cf69b=_0x48f97e[_0x2e9a8d(0x125)](_0x2e9a8d(0x121))[_0x2e9a8d(0x10a)]();if(!Number[_0x2e9a8d(0x10e)](_0x525008)||_0x525008<0x0)throw CliErrors[_0x2e9a8d(0x112)]('--expected-diagram-revision\x20must\x20be\x20a\x20non-negative\x20integer.');if(!/^sha256:[0-9a-f]{64}$/[_0x2e9a8d(0x10f)](_0x2cf69b))throw CliErrors[_0x2e9a8d(0x112)](_0x2e9a8d(0x11a));return{'expectedDiagramRevision':_0x525008,'sourceFingerprint':_0x2cf69b,'diagram':await readRequiredSkillDiagram(_0x48f97e[_0x2e9a8d(0x125)](_0x2e9a8d(0x109)))};}export const diagramValidateCommand={'service':'skill','command':a64_0x20d7b6(0x11c),'description':a64_0x20d7b6(0xf5),'risk':a64_0x20d7b6(0xf6),'flags':WRITE_FLAGS,async 'execute'(_0x7278a9){const _0x2b0d5d=a64_0x20d7b6,_0xa4b7d5=readDiagramTarget(_0x7278a9),_0x5639bb=await validateRuntimeSkillVersionDiagram(_0x7278a9[_0x2b0d5d(0x117)],_0xa4b7d5[_0x2b0d5d(0xf9)],_0xa4b7d5[_0x2b0d5d(0x104)],_0xa4b7d5[_0x2b0d5d(0x118)],await readDiagramWriteInput(_0x7278a9));return{'ok':!![],'data':_0x5639bb,'message':_0x2b0d5d(0x10b)+_0xa4b7d5['skillCode']+'@'+_0xa4b7d5['version']+'.'};}};export const diagramPushCommand={'service':'skill','command':a64_0x20d7b6(0x110),'description':a64_0x20d7b6(0x124),'risk':a64_0x20d7b6(0x11b),'confirmationDescription':a64_0x20d7b6(0x102),'flags':WRITE_FLAGS,async 'execute'(_0x400372){const _0x4c65f0=a64_0x20d7b6,_0x40f253=readDiagramTarget(_0x400372),_0x2a7229=await putRuntimeSkillVersionDiagram(_0x400372[_0x4c65f0(0x117)],_0x40f253['skillCode'],_0x40f253[_0x4c65f0(0x104)],_0x40f253[_0x4c65f0(0x118)],await readDiagramWriteInput(_0x400372));return{'ok':!![],'data':_0x2a7229,'message':_0x2a7229['action']===_0x4c65f0(0xfd)?_0x4c65f0(0x127)+_0x40f253[_0x4c65f0(0xf9)]+'@'+_0x40f253[_0x4c65f0(0x104)]+_0x4c65f0(0x126):(_0x2a7229[_0x4c65f0(0x123)]==='created'?_0x4c65f0(0x111):_0x4c65f0(0x10c))+_0x4c65f0(0x11e)+_0x40f253[_0x4c65f0(0xf9)]+'@'+_0x40f253['version']+'.'};}};export const diagramShowCommand={'service':'skill','command':a64_0x20d7b6(0x11f),'description':a64_0x20d7b6(0xfb),'risk':'read','flags':TARGET_FLAGS,async 'execute'(_0x3fa1cd){const _0xbd37df=a64_0x20d7b6,_0xbe2b72=readDiagramTarget(_0x3fa1cd),_0x2a75aa=await getRuntimeSkillVersionDiagram(_0x3fa1cd[_0xbd37df(0x117)],_0xbe2b72[_0xbd37df(0xf9)],_0xbe2b72[_0xbd37df(0x104)],_0xbe2b72[_0xbd37df(0x118)]);return{'ok':!![],'data':_0x2a75aa,'message':_0x2a75aa[_0xbd37df(0x115)]?_0xbd37df(0xfc)+_0xbe2b72[_0xbd37df(0xf9)]+'@'+_0xbe2b72[_0xbd37df(0x104)]+_0xbd37df(0x116)+_0x2a75aa[_0xbd37df(0x128)]+'.':_0xbd37df(0x105)+_0xbe2b72[_0xbd37df(0xf9)]+'@'+_0xbe2b72[_0xbd37df(0x104)]+_0xbd37df(0xff)+_0x2a75aa['expectedDiagramRevision']+'.'};}};
1
+ const a64_0x5926f6=a64_0x49be;(function(_0x130f1c,_0x1f7da3){const _0x13d22a=a64_0x49be,_0x27ccad=_0x130f1c();while(!![]){try{const _0x4dc39c=parseInt(_0x13d22a(0x125))/0x1+-parseInt(_0x13d22a(0x10c))/0x2*(parseInt(_0x13d22a(0x11c))/0x3)+-parseInt(_0x13d22a(0x10e))/0x4+-parseInt(_0x13d22a(0x120))/0x5*(-parseInt(_0x13d22a(0x102))/0x6)+-parseInt(_0x13d22a(0x119))/0x7+parseInt(_0x13d22a(0x10b))/0x8*(parseInt(_0x13d22a(0x106))/0x9)+parseInt(_0x13d22a(0x122))/0xa;if(_0x4dc39c===_0x1f7da3)break;else _0x27ccad['push'](_0x27ccad['shift']());}catch(_0x287548){_0x27ccad['push'](_0x27ccad['shift']());}}}(a64_0x36c0,0x83232));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_0x49be(_0x3cd646,_0x3b250d){_0x3cd646=_0x3cd646-0x101;const _0x36c055=a64_0x36c0();let _0x49be9d=_0x36c055[_0x3cd646];return _0x49be9d;}function readDiagramTarget(_0x289d60){const _0x172009=a64_0x49be,_0x192a59=_0x289d60['str'](_0x172009(0x104))[_0x172009(0x112)](),_0x9024c5=_0x289d60[_0x172009(0x10d)]('version')[_0x172009(0x112)](),_0x5605d9=_0x289d60[_0x172009(0x10d)]('scope');if(!_0x192a59||!_0x9024c5||_0x5605d9!==_0x172009(0x12a)&&_0x5605d9!=='company')throw CliErrors['validation']('--skill-code,\x20--version,\x20and\x20--scope\x20personal|company\x20are\x20required.');return{'skillCode':_0x192a59,'version':_0x9024c5,'scope':_0x5605d9};}async function readDiagramWriteInput(_0x23d026){const _0xcba6fc=a64_0x49be,_0x1cf3dd=_0x23d026[_0xcba6fc(0x124)]('expected-diagram-revision'),_0x4830df=_0x23d026['str'](_0xcba6fc(0x10f))[_0xcba6fc(0x112)]();if(!Number[_0xcba6fc(0x12c)](_0x1cf3dd)||_0x1cf3dd<0x0)throw CliErrors[_0xcba6fc(0x103)](_0xcba6fc(0x126));if(!/^sha256:[0-9a-f]{64}$/[_0xcba6fc(0x111)](_0x4830df))throw CliErrors[_0xcba6fc(0x103)](_0xcba6fc(0x115));return{'expectedDiagramRevision':_0x1cf3dd,'sourceFingerprint':_0x4830df,'diagram':await readRequiredSkillDiagram(_0x23d026[_0xcba6fc(0x10d)]('diagram-file'))};}export const diagramValidateCommand={'service':'skill','command':'diagram-validate','description':a64_0x5926f6(0x116),'risk':a64_0x5926f6(0x10a),'flags':WRITE_FLAGS,async 'execute'(_0x5e4da1){const _0x581e70=a64_0x5926f6,_0x497c5d=readDiagramTarget(_0x5e4da1),_0x5ccd22=await validateRuntimeSkillVersionDiagram(_0x5e4da1[_0x581e70(0x110)],_0x497c5d[_0x581e70(0x123)],_0x497c5d[_0x581e70(0x128)],_0x497c5d[_0x581e70(0x129)],await readDiagramWriteInput(_0x5e4da1));return{'ok':!![],'data':_0x5ccd22,'message':_0x581e70(0x101)+_0x497c5d[_0x581e70(0x123)]+'@'+_0x497c5d[_0x581e70(0x128)]+'.'};}};export const diagramPushCommand={'service':a64_0x5926f6(0x118),'command':a64_0x5926f6(0x107),'description':'为指定版本的\x20Skill\x20创建或替换\x20Mermaid\x20图','risk':a64_0x5926f6(0x11f),'confirmationDescription':'将为指定\x20Skill\x20的精确版本创建或替换\x20Mermaid\x20流程图;服务端版本已变化时会拒绝覆盖。确认界面不会展示图表正文。','flags':WRITE_FLAGS,async 'execute'(_0x1032ff){const _0x31bd68=a64_0x5926f6,_0xba6383=readDiagramTarget(_0x1032ff),_0x313b6d=await putRuntimeSkillVersionDiagram(_0x1032ff[_0x31bd68(0x110)],_0xba6383[_0x31bd68(0x123)],_0xba6383['version'],_0xba6383['scope'],await readDiagramWriteInput(_0x1032ff));return{'ok':!![],'data':_0x313b6d,'message':_0x313b6d[_0x31bd68(0x11d)]===_0x31bd68(0x11b)?_0x31bd68(0x108)+_0xba6383[_0x31bd68(0x123)]+'@'+_0xba6383[_0x31bd68(0x128)]+_0x31bd68(0x105):(_0x313b6d[_0x31bd68(0x11d)]===_0x31bd68(0x121)?'Created':_0x31bd68(0x11a))+_0x31bd68(0x12b)+_0xba6383[_0x31bd68(0x123)]+'@'+_0xba6383['version']+'.'};}};export const diagramShowCommand={'service':a64_0x5926f6(0x118),'command':'diagram-show','description':'Show\x20the\x20current\x20Mermaid\x20diagram\x20for\x20one\x20exact\x20Skill\x20version','risk':a64_0x5926f6(0x10a),'flags':TARGET_FLAGS,async 'execute'(_0x2be7b2){const _0x126daa=a64_0x5926f6,_0x41d008=readDiagramTarget(_0x2be7b2),_0x44eea1=await getRuntimeSkillVersionDiagram(_0x2be7b2['appCode'],_0x41d008[_0x126daa(0x123)],_0x41d008[_0x126daa(0x128)],_0x41d008['scope']);return{'ok':!![],'data':_0x44eea1,'message':_0x44eea1[_0x126daa(0x11e)]?_0x126daa(0x127)+_0x41d008['skillCode']+'@'+_0x41d008[_0x126daa(0x128)]+_0x126daa(0x114)+_0x44eea1['expectedDiagramRevision']+'.':_0x126daa(0x109)+_0x41d008['skillCode']+'@'+_0x41d008[_0x126daa(0x128)]+_0x126daa(0x117)+_0x44eea1[_0x126daa(0x113)]+'.'};}};function a64_0x36c0(){const _0x492c0d=['str','3296564SOQrIB','source-fingerprint','appCode','test','trim','expectedDiagramRevision',';\x20next\x20write\x20expects\x20revision\x20','--source-fingerprint\x20must\x20be\x20lowercase\x20sha256:<64\x20hex\x20characters>.','Validate\x20a\x20Mermaid\x20diagram\x20replacement\x20for\x20one\x20exact\x20Skill\x20version',';\x20first\x20write\x20expects\x20revision\x20','skill','2983071WpjEtP','Updated','unchanged','48435VxBHlm','action','found','write','577975xhBNPK','created','20973090jpTGvx','skillCode','num','386127vbfcis','--expected-diagram-revision\x20must\x20be\x20a\x20non-negative\x20integer.','Found\x20Skill\x20diagram\x20for\x20','version','scope','personal','\x20Skill\x20diagram\x20for\x20','isInteger','Skill\x20diagram\x20validation\x20passed\x20for\x20','6RhrvSL','validation','skill-code','\x20is\x20unchanged.','9njFIxa','diagram-push','Skill\x20diagram\x20for\x20','No\x20Skill\x20diagram\x20is\x20stored\x20for\x20','read','223528JINAfp','104yESZbD'];a64_0x36c0=function(){return _0x492c0d;};return a64_0x36c0();}
@@ -1 +1 @@
1
- const a65_0x11f0bb=a65_0x13e6;(function(_0xd1479f,_0x5b9e15){const _0x42ddaa=a65_0x13e6,_0x1b4d14=_0xd1479f();while(!![]){try{const _0x4a1920=parseInt(_0x42ddaa(0x1ae))/0x1+parseInt(_0x42ddaa(0x1bc))/0x2*(parseInt(_0x42ddaa(0x1b7))/0x3)+parseInt(_0x42ddaa(0x1c3))/0x4*(parseInt(_0x42ddaa(0x1c5))/0x5)+-parseInt(_0x42ddaa(0x1cf))/0x6+parseInt(_0x42ddaa(0x1ce))/0x7+parseInt(_0x42ddaa(0x1c6))/0x8*(-parseInt(_0x42ddaa(0x1bb))/0x9)+parseInt(_0x42ddaa(0x1b5))/0xa;if(_0x4a1920===_0x5b9e15)break;else _0x1b4d14['push'](_0x1b4d14['shift']());}catch(_0x293a18){_0x1b4d14['push'](_0x1b4d14['shift']());}}}(a65_0x37b5,0xebb60));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';function a65_0x13e6(_0x4d1a62,_0xd26253){_0x4d1a62=_0x4d1a62-0x1ad;const _0x37b595=a65_0x37b5();let _0x13e64b=_0x37b595[_0x4d1a62];return _0x13e64b;}function a65_0x37b5(){const _0x5400c2=['../../../skills/runtime-skill-sync.js','2036605GyGIUx','376nfFRXO','force','global','all','created','production','trim','skillRoots','9183202OuXAxx','8138616tSwSZV','min','authRequired','../../../core/api-client.js','from','length','map','includes','appCode','skillCode','filter','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','unchanged','str','removed','scope','553128OApoyf','code','install','updated','Installed\x20','skill','reduce','631230WHLlQV','envName','3OEiBQk','accessKey','skipped','company','15732OKLLYe','137212znwShV','\x20personal\x20and\x20','bool','personal','project','action','read','4WZTltq'];a65_0x37b5=function(){return _0x5400c2;};return a65_0x37b5();}import{summarizeRuntimeSkill}from'../summary.js';const PACKAGE_DOWNLOAD_CONCURRENCY=0x4;export const installCommand={'service':a65_0x11f0bb(0x1b3),'command':a65_0x11f0bb(0x1b0),'description':'Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','risk':a65_0x11f0bb(0x1c2),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x3d363f){return syncRuntimeSkills(_0x3d363f);}};async function syncRuntimeSkills(_0xbd7ca1){const _0x21c36d=a65_0x11f0bb,{downloadRuntimeSkillPackage:_0x52ce85,listRuntimeSkills:_0x392280}=await import(_0x21c36d(0x1d2)),{linkEffectiveRuntimeSkills:_0xc62313,materializeRuntimeSkill:_0x226cb5,pruneStaleRuntimeSkillCache:_0x355969,pruneStaleRuntimeSkillLinks:_0xee6e97,resolveRuntimeSkillInstallTarget:_0x41f235,reuseMaterializedRuntimeSkill:_0x308f08}=await import(_0x21c36d(0x1c4)),_0xdea09b=_0xbd7ca1[_0x21c36d(0x1dc)](_0x21c36d(0x1af)),_0x2440c6=normalizeSyncScopes(_0xbd7ca1[_0x21c36d(0x1dc)](_0x21c36d(0x1ad))),_0x29bc37=_0xbd7ca1[_0x21c36d(0x1b6)]??_0x21c36d(0x1cb),_0x1667c5=_0xbd7ca1[_0x21c36d(0x1b8)],_0x47aada=_0xbd7ca1[_0x21c36d(0x1be)](_0x21c36d(0x1c7));if(!_0x1667c5)throw CliErrors[_0x21c36d(0x1d1)](_0x21c36d(0x1da));const _0x441dad=_0x41f235(_0xbd7ca1[_0x21c36d(0x1d7)],_0xbd7ca1[_0x21c36d(0x1be)](_0x21c36d(0x1c0))?_0x21c36d(0x1c0):_0x21c36d(0x1c8)),_0x193ba3=_0x41f235(_0xbd7ca1[_0x21c36d(0x1d7)],_0x441dad[_0x21c36d(0x1ad)]===_0x21c36d(0x1c0)?'global':_0x21c36d(0x1c0)),_0x503d4d=await _0x392280({'appCode':_0xbd7ca1[_0x21c36d(0x1d7)],'scope':_0x2440c6['length']===0x1?_0x2440c6[0x0]:_0x21c36d(0x1c9),'code':_0xdea09b[_0x21c36d(0x1cc)]()||undefined}),_0x48415d=_0x2440c6['includes'](_0x21c36d(0x1bf))?_0x503d4d[_0x21c36d(0x1bf)]:[],_0x21f27a=_0x2440c6[_0x21c36d(0x1d6)](_0x21c36d(0x1ba))?_0x503d4d['company']:[],_0x3ad880=new Set([..._0x48415d[_0x21c36d(0x1d5)](_0x423f48=>_0x423f48['skillCode']?.[_0x21c36d(0x1cc)]())[_0x21c36d(0x1d9)](_0x402c6e=>Boolean(_0x402c6e)),..._0x21f27a[_0x21c36d(0x1d5)](_0x56604b=>_0x56604b[_0x21c36d(0x1d8)]?.[_0x21c36d(0x1cc)]())['filter'](_0x3f9302=>Boolean(_0x3f9302))]),_0x305c49=_0xdea09b[_0x21c36d(0x1cc)]()?[_0xdea09b[_0x21c36d(0x1cc)]()]:undefined,_0x2a5ca2=_0x2440c6[_0x21c36d(0x1d4)]===0x2&&_0x2440c6[_0x21c36d(0x1d6)](_0x21c36d(0x1bf))&&_0x2440c6['includes'](_0x21c36d(0x1ba)),_0x1d5585=_0x2a5ca2?_0xee6e97(_0x441dad,_0x3ad880,_0x305c49):[],_0x43033e=_0x355969({'env':_0x29bc37,'accessKey':_0x1667c5,'appCode':_0xbd7ca1['appCode'],'activeSkillCodes':_0x3ad880,'pruneSkillCodes':_0x305c49,'scopes':_0x2440c6,'protectedLinkRoots':_0x193ba3[_0x21c36d(0x1cd)]}),_0x366d86=[..._0x48415d[_0x21c36d(0x1d5)](_0x1ebbc3=>({'skill':_0x1ebbc3,'scope':_0x21c36d(0x1bf)})),..._0x21f27a['map'](_0x12651d=>({'skill':_0x12651d,'scope':_0x21c36d(0x1ba)}))],_0x238e47=await mapConcurrent(_0x366d86,PACKAGE_DOWNLOAD_CONCURRENCY,async({skill:_0xf05ecb,scope:_0xc6a442})=>{const _0x12ed13=_0x21c36d,_0x32ad91=_0x308f08(_0xf05ecb,_0xc6a442,{'env':_0x29bc37,'accessKey':_0x1667c5,'appCode':_0xbd7ca1[_0x12ed13(0x1d7)]});if(_0x32ad91)return _0x32ad91;return _0x226cb5(_0xf05ecb,_0xc6a442,{'env':_0x29bc37,'accessKey':_0x1667c5,'appCode':_0xbd7ca1['appCode'],'force':_0x47aada,'packageBytes':await downloadSkillPackage(_0xf05ecb,_0xc6a442,_0xbd7ca1[_0x12ed13(0x1d7)],_0x52ce85)});}),_0x4a1906=_0xc62313(_0x238e47,_0x441dad),_0x5da4b5=countLinkActions(_0x4a1906);return{'ok':!![],'data':{'appCode':_0xbd7ca1[_0x21c36d(0x1d7)],..._0x441dad[_0x21c36d(0x1ad)]===_0x21c36d(0x1c0)?{'installTarget':{'scope':_0x441dad[_0x21c36d(0x1ad)],'skillRoots':[..._0x441dad['skillRoots']]}}:{},'personal':_0x48415d[_0x21c36d(0x1d4)],'company':_0x21f27a[_0x21c36d(0x1d4)],'materialized':_0x238e47[_0x21c36d(0x1d4)],'links':{'total':_0x4a1906[_0x21c36d(0x1d4)],'created':_0x5da4b5[_0x21c36d(0x1ca)]??0x0,'updated':_0x5da4b5[_0x21c36d(0x1b1)]??0x0,'unchanged':_0x5da4b5[_0x21c36d(0x1db)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x1d5585[_0x21c36d(0x1d9)](_0x1866d2=>_0x1866d2['action']===_0x21c36d(0x1dd))[_0x21c36d(0x1d4)],'cacheDirs':_0x43033e[_0x21c36d(0x1d9)](_0x2c30c4=>_0x2c30c4['action']==='removed')[_0x21c36d(0x1d4)],'skipped':[..._0x1d5585,..._0x43033e][_0x21c36d(0x1d9)](_0x516db3=>_0x516db3['action']===_0x21c36d(0x1b9))[_0x21c36d(0x1d4)]},'skills':{'personal':_0x48415d[_0x21c36d(0x1d5)](summarizeRuntimeSkill),'company':_0x21f27a[_0x21c36d(0x1d5)](summarizeRuntimeSkill)}},'message':_0x21c36d(0x1b2)+_0x48415d['length']+_0x21c36d(0x1bd)+_0x21f27a['length']+'\x20company\x20Skill(s).'};}async function mapConcurrent(_0x111998,_0x461f14,_0x3de8dc){const _0x56a900=a65_0x11f0bb,_0x311ec4=new Array(_0x111998['length']);let _0x575108=0x0;const _0xc0ad2c=Array[_0x56a900(0x1d3)]({'length':Math[_0x56a900(0x1d0)](_0x461f14,_0x111998['length'])},async()=>{const _0x3718f8=_0x56a900;while(_0x575108<_0x111998[_0x3718f8(0x1d4)]){const _0x29e9c1=_0x575108;_0x575108+=0x1,_0x311ec4[_0x29e9c1]=await _0x3de8dc(_0x111998[_0x29e9c1]);}});return await Promise[_0x56a900(0x1c9)](_0xc0ad2c),_0x311ec4;}async function downloadSkillPackage(_0x1b4cbe,_0x2df3a4,_0x150e19,_0x541ac3){const _0x2c6c21=a65_0x11f0bb,_0xe6b251=_0x1b4cbe['version']?.[_0x2c6c21(0x1cc)]();return _0xe6b251?_0x541ac3(_0x2df3a4,_0x1b4cbe[_0x2c6c21(0x1d8)],_0x150e19,_0xe6b251):_0x541ac3(_0x2df3a4,_0x1b4cbe[_0x2c6c21(0x1d8)],_0x150e19);}function countLinkActions(_0x1aaa49){const _0x211472=a65_0x11f0bb;return _0x1aaa49[_0x211472(0x1b4)]((_0x323419,_0x6c7058)=>{const _0x353dd3=_0x211472;return _0x323419[_0x6c7058[_0x353dd3(0x1c1)]]=(_0x323419[_0x6c7058[_0x353dd3(0x1c1)]]??0x0)+0x1,_0x323419;},{});}
1
+ function a65_0xa773(_0x1e6185,_0x2c04cd){_0x1e6185=_0x1e6185-0x18a;const _0x1a94ab=a65_0x1a94();let _0xa77374=_0x1a94ab[_0x1e6185];return _0xa77374;}const a65_0xdb1cc4=a65_0xa773;(function(_0x3f9347,_0x416350){const _0x48c1e6=a65_0xa773,_0x4ee3e2=_0x3f9347();while(!![]){try{const _0x3320c7=-parseInt(_0x48c1e6(0x192))/0x1*(-parseInt(_0x48c1e6(0x1a9))/0x2)+parseInt(_0x48c1e6(0x193))/0x3+parseInt(_0x48c1e6(0x1ae))/0x4+parseInt(_0x48c1e6(0x1af))/0x5+-parseInt(_0x48c1e6(0x19b))/0x6*(-parseInt(_0x48c1e6(0x1a1))/0x7)+parseInt(_0x48c1e6(0x1a2))/0x8*(parseInt(_0x48c1e6(0x18c))/0x9)+-parseInt(_0x48c1e6(0x194))/0xa;if(_0x3320c7===_0x416350)break;else _0x4ee3e2['push'](_0x4ee3e2['shift']());}catch(_0x33f1b9){_0x4ee3e2['push'](_0x4ee3e2['shift']());}}}(a65_0x1a94,0xb4d2a));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_0xdb1cc4(0x1ac),'command':a65_0xdb1cc4(0x1b3),'description':a65_0xdb1cc4(0x1b0),'risk':'read','requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x49ec3a){return syncRuntimeSkills(_0x49ec3a);}};async function syncRuntimeSkills(_0x42c24e){const _0x5bc49e=a65_0xdb1cc4,{downloadRuntimeSkillPackage:_0x25f495,listRuntimeSkills:_0x138b94}=await import(_0x5bc49e(0x190)),{linkEffectiveRuntimeSkills:_0x4497ff,materializeRuntimeSkill:_0x29ef73,pruneStaleRuntimeSkillCache:_0x53db19,pruneStaleRuntimeSkillLinks:_0x1bb196,resolveRuntimeSkillInstallTarget:_0x412194,reuseMaterializedRuntimeSkill:_0x141615}=await import(_0x5bc49e(0x19e)),_0x2b9194=_0x42c24e['str']('code'),_0x35cd9a=normalizeSyncScopes(_0x42c24e[_0x5bc49e(0x191)](_0x5bc49e(0x199))),_0x2cb695=_0x42c24e['envName']??'production',_0x618d8b=_0x42c24e['accessKey'],_0x583511=_0x42c24e[_0x5bc49e(0x19d)]('force');if(!_0x618d8b)throw CliErrors['authRequired'](_0x5bc49e(0x1b4));const _0x28a98f=_0x412194(_0x42c24e[_0x5bc49e(0x1a6)],_0x42c24e['bool'](_0x5bc49e(0x18b))?_0x5bc49e(0x18b):_0x5bc49e(0x1a7)),_0x765670=_0x412194(_0x42c24e[_0x5bc49e(0x1a6)],_0x28a98f[_0x5bc49e(0x199)]===_0x5bc49e(0x18b)?_0x5bc49e(0x1a7):_0x5bc49e(0x18b)),_0x513003=await _0x138b94({'appCode':_0x42c24e[_0x5bc49e(0x1a6)],'scope':_0x35cd9a[_0x5bc49e(0x198)]===0x1?_0x35cd9a[0x0]:_0x5bc49e(0x18a),'code':_0x2b9194[_0x5bc49e(0x195)]()||undefined}),_0x436f7b=_0x35cd9a['includes'](_0x5bc49e(0x1a0))?_0x513003['personal']:[],_0x502844=_0x35cd9a[_0x5bc49e(0x19f)](_0x5bc49e(0x18f))?_0x513003[_0x5bc49e(0x18f)]:[],_0x25f222=new Set([..._0x436f7b[_0x5bc49e(0x1a5)](_0x7361a9=>_0x7361a9[_0x5bc49e(0x1a3)]?.[_0x5bc49e(0x195)]())[_0x5bc49e(0x1b2)](_0x3951d5=>Boolean(_0x3951d5)),..._0x502844['map'](_0xc1a5e=>_0xc1a5e['skillCode']?.[_0x5bc49e(0x195)]())[_0x5bc49e(0x1b2)](_0x206d08=>Boolean(_0x206d08))]),_0x27fe63=_0x2b9194['trim']()?[_0x2b9194[_0x5bc49e(0x195)]()]:undefined,_0x3836a1=_0x35cd9a[_0x5bc49e(0x198)]===0x2&&_0x35cd9a[_0x5bc49e(0x19f)](_0x5bc49e(0x1a0))&&_0x35cd9a['includes'](_0x5bc49e(0x18f)),_0xdd308c=_0x3836a1?_0x1bb196(_0x28a98f,_0x25f222,_0x27fe63):[],_0x55cf74=_0x53db19({'env':_0x2cb695,'accessKey':_0x618d8b,'appCode':_0x42c24e[_0x5bc49e(0x1a6)],'activeSkillCodes':_0x25f222,'pruneSkillCodes':_0x27fe63,'scopes':_0x35cd9a,'protectedLinkRoots':_0x765670[_0x5bc49e(0x1a8)]}),_0x1bdf67=[..._0x436f7b[_0x5bc49e(0x1a5)](_0xab2659=>({'skill':_0xab2659,'scope':_0x5bc49e(0x1a0)})),..._0x502844[_0x5bc49e(0x1a5)](_0x55584f=>({'skill':_0x55584f,'scope':_0x5bc49e(0x18f)}))],_0x58ea0b=await mapConcurrent(_0x1bdf67,PACKAGE_DOWNLOAD_CONCURRENCY,async({skill:_0x211892,scope:_0x5e1368})=>{const _0x5cf9fc=_0x5bc49e,_0x237910=_0x141615(_0x211892,_0x5e1368,{'env':_0x2cb695,'accessKey':_0x618d8b,'appCode':_0x42c24e[_0x5cf9fc(0x1a6)]});if(_0x237910)return _0x237910;return _0x29ef73(_0x211892,_0x5e1368,{'env':_0x2cb695,'accessKey':_0x618d8b,'appCode':_0x42c24e[_0x5cf9fc(0x1a6)],'force':_0x583511,'packageBytes':await downloadSkillPackage(_0x211892,_0x5e1368,_0x42c24e[_0x5cf9fc(0x1a6)],_0x25f495)});}),_0x568f1e=_0x4497ff(_0x58ea0b,_0x28a98f),_0x596477=countLinkActions(_0x568f1e);return{'ok':!![],'data':{'appCode':_0x42c24e[_0x5bc49e(0x1a6)],..._0x28a98f[_0x5bc49e(0x199)]==='project'?{'installTarget':{'scope':_0x28a98f[_0x5bc49e(0x199)],'skillRoots':[..._0x28a98f[_0x5bc49e(0x1a8)]]}}:{},'personal':_0x436f7b[_0x5bc49e(0x198)],'company':_0x502844[_0x5bc49e(0x198)],'materialized':_0x58ea0b['length'],'links':{'total':_0x568f1e['length'],'created':_0x596477[_0x5bc49e(0x1a4)]??0x0,'updated':_0x596477[_0x5bc49e(0x196)]??0x0,'unchanged':_0x596477[_0x5bc49e(0x19a)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0xdd308c[_0x5bc49e(0x1b2)](_0x2e5d8a=>_0x2e5d8a[_0x5bc49e(0x1b1)]===_0x5bc49e(0x18d))['length'],'cacheDirs':_0x55cf74[_0x5bc49e(0x1b2)](_0x47a6b1=>_0x47a6b1['action']===_0x5bc49e(0x18d))[_0x5bc49e(0x198)],'skipped':[..._0xdd308c,..._0x55cf74][_0x5bc49e(0x1b2)](_0x35acc7=>_0x35acc7['action']===_0x5bc49e(0x1ab))['length']},'skills':{'personal':_0x436f7b['map'](summarizeRuntimeSkill),'company':_0x502844['map'](summarizeRuntimeSkill)}},'message':_0x5bc49e(0x1ad)+_0x436f7b['length']+'\x20personal\x20and\x20'+_0x502844[_0x5bc49e(0x198)]+_0x5bc49e(0x197)};}async function mapConcurrent(_0x468eaa,_0x256406,_0x58176d){const _0x5e13c7=a65_0xdb1cc4,_0x25ee10=new Array(_0x468eaa[_0x5e13c7(0x198)]);let _0x5070c9=0x0;const _0x5bde44=Array[_0x5e13c7(0x19c)]({'length':Math[_0x5e13c7(0x18e)](_0x256406,_0x468eaa[_0x5e13c7(0x198)])},async()=>{const _0x1316a9=_0x5e13c7;while(_0x5070c9<_0x468eaa[_0x1316a9(0x198)]){const _0x2d75b4=_0x5070c9;_0x5070c9+=0x1,_0x25ee10[_0x2d75b4]=await _0x58176d(_0x468eaa[_0x2d75b4]);}});return await Promise[_0x5e13c7(0x18a)](_0x5bde44),_0x25ee10;}function a65_0x1a94(){const _0x5056bd=['Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','all','project','1065249ITXLiV','removed','min','company','../../../core/api-client.js','str','61316biftcw','976533aInQNh','44945210XemFPN','trim','updated','\x20company\x20Skill(s).','length','scope','unchanged','62754urPKnc','from','bool','../../../skills/runtime-skill-sync.js','includes','personal','917iEIaUK','40ZyChKW','skillCode','created','map','appCode','global','skillRoots','32dLfCBd','version','skipped','skill','Installed\x20','3323672IIhhrT','5678760WjELOv','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','action','filter','install'];a65_0x1a94=function(){return _0x5056bd;};return a65_0x1a94();}async function downloadSkillPackage(_0x3417c7,_0x2643c9,_0xd7400a,_0x4f917c){const _0x349064=a65_0xdb1cc4,_0x285573=_0x3417c7[_0x349064(0x1aa)]?.[_0x349064(0x195)]();return _0x285573?_0x4f917c(_0x2643c9,_0x3417c7[_0x349064(0x1a3)],_0xd7400a,_0x285573):_0x4f917c(_0x2643c9,_0x3417c7[_0x349064(0x1a3)],_0xd7400a);}function countLinkActions(_0x562b7a){return _0x562b7a['reduce']((_0xa0f706,_0x3fd051)=>{const _0x379dbc=a65_0xa773;return _0xa0f706[_0x3fd051[_0x379dbc(0x1b1)]]=(_0xa0f706[_0x3fd051[_0x379dbc(0x1b1)]]??0x0)+0x1,_0xa0f706;},{});}
@@ -1 +1 @@
1
- const a66_0x4c6bf7=a66_0x4463;(function(_0x56e02,_0x253500){const _0x443b8e=a66_0x4463,_0x423f21=_0x56e02();while(!![]){try{const _0x4f0ecf=parseInt(_0x443b8e(0x151))/0x1*(parseInt(_0x443b8e(0x159))/0x2)+parseInt(_0x443b8e(0x161))/0x3*(-parseInt(_0x443b8e(0x15f))/0x4)+-parseInt(_0x443b8e(0x14d))/0x5+-parseInt(_0x443b8e(0x144))/0x6+parseInt(_0x443b8e(0x157))/0x7+parseInt(_0x443b8e(0x156))/0x8*(-parseInt(_0x443b8e(0x14c))/0x9)+parseInt(_0x443b8e(0x158))/0xa;if(_0x4f0ecf===_0x253500)break;else _0x423f21['push'](_0x423f21['shift']());}catch(_0x59e169){_0x423f21['push'](_0x423f21['shift']());}}}(a66_0x4778,0x35031));function a66_0x4463(_0x4bd057,_0x149750){_0x4bd057=_0x4bd057-0x142;const _0x47788d=a66_0x4778();let _0x446343=_0x47788d[_0x4bd057];return _0x446343;}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';function a66_0x4778(){const _0x30e967=['filter','company','673236jEgszs','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','length','project','map','\x20local\x20Skill(s).','envName','personal','612mSbcOM','1989055NhWJup','../../../skills/runtime-skill-sync.js','bool','Listed\x20','180101ivzmqz','authRequired','trim','scope','code','25208KBsqVe','1475292hrXmFq','9279620oIBFzF','2oziOPt','skill','local','read','list','\x20remote\x20Skill(s).','76PYrBUp','builtin','59589ZcmxnG','appCode','str','accessKey'];a66_0x4778=function(){return _0x30e967;};return a66_0x4778();}import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a66_0x4c6bf7(0x15a),'command':a66_0x4c6bf7(0x15d),'description':a66_0x4c6bf7(0x145),'risk':a66_0x4c6bf7(0x15c),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x1eab0c){const _0x2d6a02=a66_0x4c6bf7,_0x2d1719=_0x1eab0c['str'](_0x2d6a02(0x155)),_0x4c5b24=normalizeListScope(_0x1eab0c[_0x2d6a02(0x163)]('scope'));if(_0x1eab0c[_0x2d6a02(0x14f)](_0x2d6a02(0x15b))){const _0x196a0b=_0x1eab0c[_0x2d6a02(0x164)];if(!_0x196a0b)throw CliErrors[_0x2d6a02(0x152)]();const {listLocalRuntimeSkills:_0x25bd34,resolveRuntimeSkillInstallTarget:_0xc468da}=await import(_0x2d6a02(0x14e)),_0x456124=_0xc468da(_0x1eab0c[_0x2d6a02(0x162)],_0x1eab0c[_0x2d6a02(0x14f)](_0x2d6a02(0x147))?_0x2d6a02(0x147):'global'),_0x43cac=_0x25bd34({'env':_0x1eab0c[_0x2d6a02(0x14a)]??'production','accessKey':_0x196a0b,'appCode':_0x1eab0c['appCode'],'scopes':listScopeToRuntimeScopes(_0x4c5b24),'code':_0x2d1719[_0x2d6a02(0x153)]()||undefined},_0x456124),_0x5da519=groupLocalRuntimeSkills(_0x43cac);return{'ok':!![],'data':{'appCode':_0x1eab0c[_0x2d6a02(0x162)],'source':'local',..._0x456124[_0x2d6a02(0x154)]===_0x2d6a02(0x147)?{'installScope':_0x456124['scope']}:{},'scope':_0x4c5b24,'total':_0x43cac[_0x2d6a02(0x146)],'personal':_0x5da519[_0x2d6a02(0x14b)]['length'],'company':_0x5da519[_0x2d6a02(0x143)][_0x2d6a02(0x146)],'items':_0x43cac[_0x2d6a02(0x148)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x5da519[_0x2d6a02(0x14b)][_0x2d6a02(0x148)](summarizeLocalRuntimeSkill),'company':_0x5da519['company'][_0x2d6a02(0x148)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x43cac[_0x2d6a02(0x146)]+_0x2d6a02(0x149)};}const {listRuntimeSkills:_0x343316}=await import('../../../core/api-client.js'),_0x792239=await _0x343316({'appCode':_0x1eab0c[_0x2d6a02(0x162)],'scope':listScopeToRemoteScope(_0x4c5b24),'code':_0x2d1719[_0x2d6a02(0x153)]()||undefined}),_0xa2b234=shouldListScope(_0x4c5b24,'personal')?_0x792239[_0x2d6a02(0x14b)]??[]:[],_0x3a54b4=shouldListScope(_0x4c5b24,'company')?_0x792239['company']??[]:[],_0x13b36d=[..._0xa2b234,..._0x3a54b4];return{'ok':!![],'data':{'appCode':_0x1eab0c[_0x2d6a02(0x162)],'source':'remote','scope':_0x4c5b24,'total':_0x13b36d[_0x2d6a02(0x146)],'personal':_0xa2b234[_0x2d6a02(0x146)],'company':_0x3a54b4[_0x2d6a02(0x146)],'items':_0x13b36d['map'](summarizeRuntimeSkill),'skills':{'personal':_0xa2b234[_0x2d6a02(0x148)](summarizeRuntimeSkill),'company':_0x3a54b4[_0x2d6a02(0x148)](summarizeRuntimeSkill)}},'message':_0x2d6a02(0x150)+_0x13b36d['length']+_0x2d6a02(0x15e)};}};function groupLocalRuntimeSkills(_0x3e119e){const _0x3bd7ad=a66_0x4c6bf7;return{'personal':_0x3e119e[_0x3bd7ad(0x142)](_0x337129=>_0x337129[_0x3bd7ad(0x154)]===_0x3bd7ad(0x14b)),'company':_0x3e119e['filter'](_0x3987cd=>_0x3987cd[_0x3bd7ad(0x154)]===_0x3bd7ad(0x143)),'builtin':_0x3e119e[_0x3bd7ad(0x142)](_0x2ade2d=>_0x2ade2d[_0x3bd7ad(0x154)]===_0x3bd7ad(0x160))};}
1
+ function a66_0xf0c7(){const _0x5ea95e=['global','trim','personal','\x20local\x20Skill(s).','331362TugQSc','2665728jrzUfO','project','appCode','scope','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','25663sLOdnM','3411155jrfeOq','list','7044nkmRIl','production','../../../core/api-client.js','49188MSNcVC','map','1QHyfgy','length','filter','9NAUiIS','bool','8cphYjT','Listed\x20','4132220NWvInW','595pMRjnY','accessKey','725018LHGIEG','\x20remote\x20Skill(s).','local','company','remote','envName','skill','str'];a66_0xf0c7=function(){return _0x5ea95e;};return a66_0xf0c7();}const a66_0x34f11c=a66_0x1025;(function(_0x1ec0c0,_0x25236a){const _0x4cc1d9=a66_0x1025,_0x4d5062=_0x1ec0c0();while(!![]){try{const _0x537c5b=-parseInt(_0x4cc1d9(0x92))/0x1*(parseInt(_0x4cc1d9(0x78))/0x2)+parseInt(_0x4cc1d9(0x84))/0x3*(parseInt(_0x4cc1d9(0x73))/0x4)+parseInt(_0x4cc1d9(0x8b))/0x5+-parseInt(_0x4cc1d9(0x90))/0x6*(parseInt(_0x4cc1d9(0x76))/0x7)+-parseInt(_0x4cc1d9(0x85))/0x8+-parseInt(_0x4cc1d9(0x95))/0x9*(parseInt(_0x4cc1d9(0x75))/0xa)+-parseInt(_0x4cc1d9(0x8a))/0xb*(-parseInt(_0x4cc1d9(0x8d))/0xc);if(_0x537c5b===_0x25236a)break;else _0x4d5062['push'](_0x4d5062['shift']());}catch(_0x4e2251){_0x4d5062['push'](_0x4d5062['shift']());}}}(a66_0xf0c7,0x71f91));import{CliErrors}from'../../../errors.js';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';function a66_0x1025(_0x2e7974,_0x3d3f14){_0x2e7974=_0x2e7974-0x73;const _0xf0c771=a66_0xf0c7();let _0x102594=_0xf0c771[_0x2e7974];return _0x102594;}export const listCommand={'service':a66_0x34f11c(0x7e),'command':a66_0x34f11c(0x8c),'description':a66_0x34f11c(0x89),'risk':'read','flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x4f6c6c){const _0x36d296=a66_0x34f11c,_0x122002=_0x4f6c6c[_0x36d296(0x7f)]('code'),_0x1a0ac8=normalizeListScope(_0x4f6c6c[_0x36d296(0x7f)](_0x36d296(0x88)));if(_0x4f6c6c[_0x36d296(0x96)](_0x36d296(0x7a))){const _0x4b7f12=_0x4f6c6c[_0x36d296(0x77)];if(!_0x4b7f12)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x396276,resolveRuntimeSkillInstallTarget:_0x49ddfb}=await import('../../../skills/runtime-skill-sync.js'),_0xf67891=_0x49ddfb(_0x4f6c6c['appCode'],_0x4f6c6c[_0x36d296(0x96)](_0x36d296(0x86))?_0x36d296(0x86):_0x36d296(0x80)),_0x3ff8f9=_0x396276({'env':_0x4f6c6c[_0x36d296(0x7d)]??_0x36d296(0x8e),'accessKey':_0x4b7f12,'appCode':_0x4f6c6c[_0x36d296(0x87)],'scopes':listScopeToRuntimeScopes(_0x1a0ac8),'code':_0x122002[_0x36d296(0x81)]()||undefined},_0xf67891),_0x2a52cb=groupLocalRuntimeSkills(_0x3ff8f9);return{'ok':!![],'data':{'appCode':_0x4f6c6c[_0x36d296(0x87)],'source':'local',..._0xf67891[_0x36d296(0x88)]===_0x36d296(0x86)?{'installScope':_0xf67891[_0x36d296(0x88)]}:{},'scope':_0x1a0ac8,'total':_0x3ff8f9['length'],'personal':_0x2a52cb[_0x36d296(0x82)]['length'],'company':_0x2a52cb[_0x36d296(0x7b)]['length'],'items':_0x3ff8f9[_0x36d296(0x91)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x2a52cb[_0x36d296(0x82)][_0x36d296(0x91)](summarizeLocalRuntimeSkill),'company':_0x2a52cb[_0x36d296(0x7b)][_0x36d296(0x91)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x3ff8f9[_0x36d296(0x93)]+_0x36d296(0x83)};}const {listRuntimeSkills:_0x272a40}=await import(_0x36d296(0x8f)),_0x4dfe6b=await _0x272a40({'appCode':_0x4f6c6c[_0x36d296(0x87)],'scope':listScopeToRemoteScope(_0x1a0ac8),'code':_0x122002[_0x36d296(0x81)]()||undefined}),_0x38c50a=shouldListScope(_0x1a0ac8,_0x36d296(0x82))?_0x4dfe6b[_0x36d296(0x82)]??[]:[],_0x12b633=shouldListScope(_0x1a0ac8,'company')?_0x4dfe6b['company']??[]:[],_0x1e185d=[..._0x38c50a,..._0x12b633];return{'ok':!![],'data':{'appCode':_0x4f6c6c[_0x36d296(0x87)],'source':_0x36d296(0x7c),'scope':_0x1a0ac8,'total':_0x1e185d[_0x36d296(0x93)],'personal':_0x38c50a['length'],'company':_0x12b633['length'],'items':_0x1e185d[_0x36d296(0x91)](summarizeRuntimeSkill),'skills':{'personal':_0x38c50a[_0x36d296(0x91)](summarizeRuntimeSkill),'company':_0x12b633[_0x36d296(0x91)](summarizeRuntimeSkill)}},'message':_0x36d296(0x74)+_0x1e185d[_0x36d296(0x93)]+_0x36d296(0x79)};}};function groupLocalRuntimeSkills(_0x2bf583){const _0x2a2cbb=a66_0x34f11c;return{'personal':_0x2bf583[_0x2a2cbb(0x94)](_0x1fa8ce=>_0x1fa8ce[_0x2a2cbb(0x88)]===_0x2a2cbb(0x82)),'company':_0x2bf583['filter'](_0xf38613=>_0xf38613[_0x2a2cbb(0x88)]===_0x2a2cbb(0x7b)),'builtin':_0x2bf583[_0x2a2cbb(0x94)](_0x304131=>_0x304131['scope']==='builtin')};}
@@ -1 +1 @@
1
- const a67_0x4019e8=a67_0x1579;function a67_0x30af(){const _0x484283=['2149hcIIHW','将本地\x20Skill\x20目录推送到个人范围,或提交公司范围版本审核','324682DtNhNh','626572QMGaUX','475386PHjbaC','将读取本地\x20Skill\x20内容:个人范围会立即保存并生效,公司范围会提交一个新版本进入审核。确认界面不会展示目录路径或\x20Skill\x20正文。','1211784NYnYGn','push','9zJpllj','1815uZmHEy','718600EasHLp','5634RooDIv','300FXQEJi','skill'];a67_0x30af=function(){return _0x484283;};return a67_0x30af();}function a67_0x1579(_0x5e08bb,_0x46e5e3){_0x5e08bb=_0x5e08bb-0xb1;const _0x30af08=a67_0x30af();let _0x1579e7=_0x30af08[_0x5e08bb];return _0x1579e7;}(function(_0x54a1af,_0x37a02b){const _0x266d39=a67_0x1579,_0xbd1705=_0x54a1af();while(!![]){try{const _0x363fc0=-parseInt(_0x266d39(0xbb))/0x1+parseInt(_0x266d39(0xbc))/0x2+parseInt(_0x266d39(0xbd))/0x3+parseInt(_0x266d39(0xb7))/0x4*(-parseInt(_0x266d39(0xb4))/0x5)+-parseInt(_0x266d39(0xb6))/0x6*(-parseInt(_0x266d39(0xb9))/0x7)+-parseInt(_0x266d39(0xb1))/0x8*(parseInt(_0x266d39(0xb3))/0x9)+-parseInt(_0x266d39(0xb5))/0xa;if(_0x363fc0===_0x37a02b)break;else _0xbd1705['push'](_0xbd1705['shift']());}catch(_0x22d4f5){_0xbd1705['push'](_0xbd1705['shift']());}}}(a67_0x30af,0x2d1cd));import{CONFIRM_WARNINGS_FLAG,DIAGRAM_FILE_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a67_0x4019e8(0xb8),'command':a67_0x4019e8(0xb2),'description':a67_0x4019e8(0xba),'risk':'write','confirmationDescription':a67_0x4019e8(0xbe),'flags':[DIR_FLAG,DIAGRAM_FILE_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
1
+ function a67_0x53d7(){const _0x270186=['2804421oxmIVU','2Lhhuze','897018XHREjT','write','6289884pBXymJ','将读取本地\x20Skill\x20内容:个人范围会立即保存并生效,公司范围会提交一个新版本进入审核。确认界面不会展示目录路径或\x20Skill\x20正文。','将本地\x20Skill\x20目录推送到个人范围,或提交公司范围版本审核','231208cUPDMo','3968868Husvcw','952xwEvlt','20MyjcBB','25SiDGDe','39403lYrbak','8912849pxhdWE','push','skill'];a67_0x53d7=function(){return _0x270186;};return a67_0x53d7();}const a67_0x4c28d1=a67_0x5d1f;(function(_0x206655,_0x38b1f5){const _0x41776b=a67_0x5d1f,_0x2d4e4c=_0x206655();while(!![]){try{const _0x5c0ba5=parseInt(_0x41776b(0x1bd))/0x1*(parseInt(_0x41776b(0x1c3))/0x2)+-parseInt(_0x41776b(0x1bc))/0x3+parseInt(_0x41776b(0x1c4))/0x4+-parseInt(_0x41776b(0x1c7))/0x5*(-parseInt(_0x41776b(0x1be))/0x6)+-parseInt(_0x41776b(0x1c8))/0x7*(-parseInt(_0x41776b(0x1c5))/0x8)+parseInt(_0x41776b(0x1c0))/0x9+parseInt(_0x41776b(0x1c6))/0xa*(-parseInt(_0x41776b(0x1c9))/0xb);if(_0x5c0ba5===_0x38b1f5)break;else _0x2d4e4c['push'](_0x2d4e4c['shift']());}catch(_0x8d39a8){_0x2d4e4c['push'](_0x2d4e4c['shift']());}}}(a67_0x53d7,0xbf7d6));function a67_0x5d1f(_0x3bab09,_0x5b019e){_0x3bab09=_0x3bab09-0x1bc;const _0x53d75c=a67_0x53d7();let _0x5d1fba=_0x53d75c[_0x3bab09];return _0x5d1fba;}import{CONFIRM_WARNINGS_FLAG,DIAGRAM_FILE_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a67_0x4c28d1(0x1cb),'command':a67_0x4c28d1(0x1ca),'description':a67_0x4c28d1(0x1c2),'risk':a67_0x4c28d1(0x1bf),'confirmationDescription':a67_0x4c28d1(0x1c1),'flags':[DIR_FLAG,DIAGRAM_FILE_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};