@lovrabet/lovrabet-cli 2.1.22-beta.5 → 2.1.22

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 (131) 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/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/diagram.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/diagram.js +1 -1
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/workspace/index.js +1 -1
  66. package/lib/config/schema.js +1 -1
  67. package/lib/constant/app.js +1 -1
  68. package/lib/constant/auth-mode.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/defaults.js +1 -1
  71. package/lib/constant/distribution.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/constant/output.js +1 -1
  75. package/lib/constant/product.js +1 -1
  76. package/lib/constant/risk.js +1 -1
  77. package/lib/constant/url.js +1 -1
  78. package/lib/context.js +1 -1
  79. package/lib/core/api-client.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sdk-client.js +1 -1
  82. package/lib/errors.js +1 -1
  83. package/lib/framework/build-all-flags.js +1 -1
  84. package/lib/framework/dryrun.js +1 -1
  85. package/lib/framework/flags.js +1 -1
  86. package/lib/framework/help.js +1 -1
  87. package/lib/framework/index.js +1 -1
  88. package/lib/framework/output.js +1 -1
  89. package/lib/framework/preparse.js +1 -1
  90. package/lib/framework/rate-limit.js +1 -1
  91. package/lib/framework/raw-flags.js +1 -1
  92. package/lib/framework/response.js +1 -1
  93. package/lib/framework/runner-confirmation.js +1 -1
  94. package/lib/framework/runner-error.js +1 -1
  95. package/lib/framework/runner.js +1 -1
  96. package/lib/framework/schema-export.js +1 -1
  97. package/lib/framework/service-order.js +1 -1
  98. package/lib/framework/types.js +1 -1
  99. package/lib/generated/build-info.d.ts +4 -4
  100. package/lib/generated/build-info.js +1 -1
  101. package/lib/help.js +1 -1
  102. package/lib/runtime/confirmation.js +1 -1
  103. package/lib/runtime/event.js +1 -1
  104. package/lib/runtime/index.js +1 -1
  105. package/lib/runtime/queue.js +1 -1
  106. package/lib/runtime/resolve.js +1 -1
  107. package/lib/skills/npx-skills-add.js +1 -1
  108. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  109. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  110. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  111. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  112. package/lib/skills/runtime-skill-sync/links.js +1 -1
  113. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  114. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  115. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  116. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  117. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  118. package/lib/skills/runtime-skill-sync/push.js +1 -1
  119. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  120. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  121. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  122. package/lib/skills/runtime-skill-sync.js +1 -1
  123. package/lib/utils/apply-jq-filter.js +1 -1
  124. package/lib/utils/logger.js +1 -1
  125. package/lib/utils/lossless-json.js +1 -1
  126. package/lib/utils/params.js +1 -1
  127. package/lib/utils/platform.js +1 -1
  128. package/lib/utils/update-notice.js +1 -1
  129. package/lib/utils/version.js +1 -1
  130. package/lib/utils/write-cli-side-channel.js +1 -1
  131. package/package.json +1 -1
@@ -1 +1 @@
1
- const a28_0x303102=a28_0x8915;function a28_0x1fac(){const _0x2223f7=['35070412gOzQmr','117SLwAEH','5iddeDK','appCode','read','9gsARzO','string','9262122EGhPtJ','12rOGnYk','76634mHiCcc','str','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','1145342vTkRkC','trim','18rRbZYR','sdk-doc','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','110048FhLIft','80FQzcBy','1235596xEFmWM','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','2766666EtcfvM'];a28_0x1fac=function(){return _0x2223f7;};return a28_0x1fac();}(function(_0x23dcaa,_0x22f2d7){const _0x26c60e=a28_0x8915,_0x47c98c=_0x23dcaa();while(!![]){try{const _0xcbcaac=parseInt(_0x26c60e(0xc8))/0x1*(-parseInt(_0x26c60e(0xcd))/0x2)+parseInt(_0x26c60e(0xda))/0x3*(parseInt(_0x26c60e(0xd2))/0x4)+parseInt(_0x26c60e(0xd7))/0x5*(-parseInt(_0x26c60e(0xc6))/0x6)+parseInt(_0x26c60e(0xd4))/0x7+parseInt(_0x26c60e(0xd0))/0x8*(-parseInt(_0x26c60e(0xd6))/0x9)+-parseInt(_0x26c60e(0xd1))/0xa*(parseInt(_0x26c60e(0xcb))/0xb)+parseInt(_0x26c60e(0xc7))/0xc*(parseInt(_0x26c60e(0xd5))/0xd);if(_0xcbcaac===_0x22f2d7)break;else _0x47c98c['push'](_0x47c98c['shift']());}catch(_0x21a7e6){_0x47c98c['push'](_0x47c98c['shift']());}}}(a28_0x1fac,0xbd13e));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x8915(_0xb99cde,_0x1214e8){_0xb99cde=_0xb99cde-0xc6;const _0x1fac0a=a28_0x1fac();let _0x89151d=_0x1fac0a[_0xb99cde];return _0x89151d;}const DEFAULT_MARKDOWN=a28_0x303102(0xd3);export function formatDatasetSdkMarkdown(_0x1a13bc){const _0x267968=a28_0x303102,_0x36960d=typeof _0x1a13bc===_0x267968(0xdb)?_0x1a13bc[_0x267968(0xcc)]():'';return _0x36960d||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a28_0x303102(0xce),'description':a28_0x303102(0xca),'risk':a28_0x303102(0xd9),'flags':[{...CODE_FLAG,'description':a28_0x303102(0xcf)}],async 'execute'(_0x34aaff){const _0x3cbb6b=a28_0x303102,_0x1a3635=_0x34aaff[_0x3cbb6b(0xc9)]('code'),_0x3252d2=await getDatasetSdkUsageDoc(_0x1a3635,_0x34aaff['appCode']);return{'ok':!![],'data':{'code':_0x1a3635,'appCode':_0x34aaff[_0x3cbb6b(0xd8)],'markdown':formatDatasetSdkMarkdown(_0x3252d2)}};}};
1
+ const a28_0x6f0743=a28_0x4b10;(function(_0x20a57b,_0x3f576b){const _0x124ef1=a28_0x4b10,_0x195201=_0x20a57b();while(!![]){try{const _0x40e0f9=parseInt(_0x124ef1(0x10f))/0x1*(-parseInt(_0x124ef1(0x115))/0x2)+-parseInt(_0x124ef1(0x108))/0x3+-parseInt(_0x124ef1(0x10d))/0x4*(-parseInt(_0x124ef1(0x10c))/0x5)+-parseInt(_0x124ef1(0x103))/0x6*(parseInt(_0x124ef1(0x102))/0x7)+parseInt(_0x124ef1(0x112))/0x8*(-parseInt(_0x124ef1(0x111))/0x9)+-parseInt(_0x124ef1(0x109))/0xa*(-parseInt(_0x124ef1(0x107))/0xb)+parseInt(_0x124ef1(0x104))/0xc*(parseInt(_0x124ef1(0x110))/0xd);if(_0x40e0f9===_0x3f576b)break;else _0x195201['push'](_0x195201['shift']());}catch(_0xe548e){_0x195201['push'](_0x195201['shift']());}}}(a28_0xe106,0x65f30));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0xe106(){const _0x36c9ac=['7lPMwph','1590702SddSot','8421288EpNfQI','appCode','read','33SCEdRd','2313267hHBifB','1753770xDpjhK','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','56720iCxtpf','152sLMcaY','str','8175atEfEh','26ABhvHz','55116KoSYgb','512fJecWR','sdk-doc','code','126izQHJZ','string'];a28_0xe106=function(){return _0x36c9ac;};return a28_0xe106();}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';function a28_0x4b10(_0x512d68,_0x9d178c){_0x512d68=_0x512d68-0x101;const _0xe10673=a28_0xe106();let _0x4b1092=_0xe10673[_0x512d68];return _0x4b1092;}export function formatDatasetSdkMarkdown(_0x53fb50){const _0x4c0e1b=a28_0x4b10,_0x3544e5=typeof _0x53fb50===_0x4c0e1b(0x101)?_0x53fb50['trim']():'';return _0x3544e5||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a28_0x6f0743(0x113),'description':a28_0x6f0743(0x10b),'risk':a28_0x6f0743(0x106),'flags':[{...CODE_FLAG,'description':a28_0x6f0743(0x10a)}],async 'execute'(_0x179728){const _0x10cd74=a28_0x6f0743,_0x59e55e=_0x179728[_0x10cd74(0x10e)](_0x10cd74(0x114)),_0x35789f=await getDatasetSdkUsageDoc(_0x59e55e,_0x179728[_0x10cd74(0x105)]);return{'ok':!![],'data':{'code':_0x59e55e,'appCode':_0x179728['appCode'],'markdown':formatDatasetSdkMarkdown(_0x35789f)}};}};
@@ -1 +1 @@
1
- function a29_0x6e2b(_0x4211ff,_0x1ad0ff){_0x4211ff=_0x4211ff-0x177;const _0x2f3927=a29_0x2f39();let _0x6e2b12=_0x2f3927[_0x4211ff];return _0x6e2b12;}const a29_0x583d7c=a29_0x6e2b;(function(_0x209b0a,_0x26402e){const _0x203058=a29_0x6e2b,_0x4086db=_0x209b0a();while(!![]){try{const _0x53a08a=parseInt(_0x203058(0x17f))/0x1+parseInt(_0x203058(0x1c4))/0x2+-parseInt(_0x203058(0x1c8))/0x3+parseInt(_0x203058(0x1b7))/0x4*(parseInt(_0x203058(0x19f))/0x5)+parseInt(_0x203058(0x192))/0x6*(parseInt(_0x203058(0x1ab))/0x7)+parseInt(_0x203058(0x1a9))/0x8+-parseInt(_0x203058(0x18d))/0x9*(parseInt(_0x203058(0x189))/0xa);if(_0x53a08a===_0x26402e)break;else _0x4086db['push'](_0x4086db['shift']());}catch(_0x5baeac){_0x4086db['push'](_0x4086db['shift']());}}}(a29_0x2f39,0x83e0e));import a29_0x34370b from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';function a29_0x2f39(){const _0x2a523f=['serviceCount','(default)','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Service\x20Tree','doctor','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(unnamed)','empty','876276gprwPY','length','platform','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','2973951kraCvW','(not\x20found)','✗\x20Invalid','(none)','(not\x20set)','\x20\x20Merged\x20Config','appCode','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','status','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','\x20\x20─','484803YoCenU','message','version','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','red','ClientAk','defaultApp','riskLevel','3890paIhzU','yellow','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(legacy/compat\x20only)','8478hhetAk','✗\x20Invalid\x20JSON','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Config\x20JSON','env','12niEqgu','\x20\x20runtimeDomain:\x20\x20\x20','bold','registryPath','repeat','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','log','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','format','⚠\x20Empty','source','locale','5HtJLTw','pageSize','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','missing','\x20(accessKey)','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','gray','read','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','5504312BjhCDY','\x20doctor','843248MrkpQq','commandCount','services','check','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','✓\x20Loaded','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','serviceCode','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','184084rKHyUW','green','Global','verbose','\x20Imported\x20from:\x20'];a29_0x2f39=function(){return _0x2a523f;};return a29_0x2f39();}import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x421111){const _0x569f64=a29_0x6e2b,_0x178996=getCliVersion(),_0x5f506d=buildConfigFromFlags({});await initGlobalEnvironment(_0x5f506d),console['log'](),console[_0x569f64(0x199)](a29_0x34370b['bold'](CLI_BIN_NAME+_0x569f64(0x1aa))),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x1a6)]('─'[_0x569f64(0x196)](0x32))),console[_0x569f64(0x199)](_0x569f64(0x1c1)+_0x178996),console[_0x569f64(0x199)](_0x569f64(0x1b0)+process[_0x569f64(0x181)]),console[_0x569f64(0x199)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x569f64(0x1c6)]+'\x20'+process['arch']),console[_0x569f64(0x199)](),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x194)]('\x20\x20Config\x20Files')),console[_0x569f64(0x199)](a29_0x34370b['gray']('\x20\x20─'[_0x569f64(0x196)](0x1e)));const _0x370693=getGlobalConfigPath(),_0x584f2e=getProjectConfigPath();console[_0x569f64(0x199)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x370693||a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x1c9)))),console[_0x569f64(0x199)](_0x569f64(0x17c)+(_0x584f2e||a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x1c9)))),console[_0x569f64(0x199)](),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x194)](_0x569f64(0x190))),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x1a6)]('\x20\x20─'[_0x569f64(0x196)](0x1e)));const _0x4e5814=(_0x2f9f9c,_0x391735)=>{const _0x3be928=_0x569f64;if(!_0x391735){console[_0x3be928(0x199)]('\x20\x20'+_0x2f9f9c[_0x3be928(0x198)](0x11)+'\x20'+a29_0x34370b['gray']('(no\x20file)'));return;}const _0x2cab95=inspectCliConfigJsonFile(_0x391735);if(_0x2cab95['status']==='ok')console[_0x3be928(0x199)]('\x20\x20'+_0x2f9f9c[_0x3be928(0x198)](0x11)+'\x20'+a29_0x34370b[_0x3be928(0x1b8)]('✓\x20Valid\x20JSON'));else{if(_0x2cab95[_0x3be928(0x17b)]===_0x3be928(0x1c3))console[_0x3be928(0x199)]('\x20\x20'+_0x2f9f9c[_0x3be928(0x198)](0x11)+'\x20'+a29_0x34370b['yellow'](_0x3be928(0x182)));else _0x2cab95[_0x3be928(0x17b)]===_0x3be928(0x1a3)?console[_0x3be928(0x199)]('\x20\x20'+_0x2f9f9c[_0x3be928(0x198)](0x11)+'\x20'+a29_0x34370b[_0x3be928(0x1a6)](_0x3be928(0x1a2))):(console[_0x3be928(0x199)]('\x20\x20'+_0x2f9f9c['padEnd'](0x11)+'\x20'+a29_0x34370b[_0x3be928(0x185)](_0x3be928(0x18e))),console[_0x3be928(0x199)]('\x20\x20'+''[_0x3be928(0x198)](0x11)+'\x20'+a29_0x34370b['red'](_0x2cab95[_0x3be928(0x180)])));}};_0x4e5814(_0x569f64(0x1b9),_0x370693),_0x4e5814('Project',_0x584f2e),console[_0x569f64(0x199)](),console['log'](a29_0x34370b[_0x569f64(0x194)](_0x569f64(0x178))),console['log'](a29_0x34370b['gray'](_0x569f64(0x17e)[_0x569f64(0x196)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5f506d[_0x569f64(0x179)]||a29_0x34370b[_0x569f64(0x185)](_0x569f64(0x177)))),console[_0x569f64(0x199)](_0x569f64(0x197)+_0x5f506d[_0x569f64(0x191)]);const _0x889ca2=isLegacyCompatConfigKey(_0x569f64(0x19e))?a29_0x34370b[_0x569f64(0x1a6)](_0x5f506d['locale']+_0x569f64(0x18c)):_0x5f506d[_0x569f64(0x19e)];console[_0x569f64(0x199)](_0x569f64(0x183)+_0x889ca2),console[_0x569f64(0x199)](_0x569f64(0x19a)+(_0x5f506d[_0x569f64(0x187)]||a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x1cb)))),console[_0x569f64(0x199)](_0x569f64(0x1b4)+(_0x5f506d['currentApp']||a29_0x34370b['gray'](_0x569f64(0x1cb)))),console[_0x569f64(0x199)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x5f506d[_0x569f64(0x19b)]||a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x17d)+DEFAULT_CONFIG_VALUES[_0x569f64(0x19b)]+')'))),console['log'](_0x569f64(0x1b6)+(_0x5f506d[_0x569f64(0x1a0)]??a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x1bd)))),console[_0x569f64(0x199)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x5f506d[_0x569f64(0x188)]),console['log'](_0x569f64(0x18b)+_0x5f506d[_0x569f64(0x1ba)]),console[_0x569f64(0x199)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x569f64(0x186)]),console[_0x569f64(0x199)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x5f506d[_0x569f64(0x184)]?a29_0x34370b[_0x569f64(0x1b8)]('(set,\x20length='+_0x5f506d[_0x569f64(0x184)][_0x569f64(0x1c5)]+')'):a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x1cb)))),console[_0x569f64(0x199)](),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x194)]('\x20\x20API\x20Endpoints')),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x17e)[_0x569f64(0x196)](0x1e))),console[_0x569f64(0x199)](_0x569f64(0x1a5)+getApiDomain()),console[_0x569f64(0x199)](_0x569f64(0x17a)+getUserDomain()),console[_0x569f64(0x199)](_0x569f64(0x193)+getRuntimeDomain()),console['log'](),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x194)](_0x569f64(0x1bf))),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x17e)[_0x569f64(0x196)](0x1e)));const _0x34e74a=inspectServiceRegistry();console[_0x569f64(0x199)](_0x569f64(0x1c7)+_0x34e74a[_0x569f64(0x195)]),console[_0x569f64(0x199)](_0x569f64(0x1b1)+formatServiceRegistryStatus(_0x34e74a)),console[_0x569f64(0x199)](_0x569f64(0x1a8)+_0x34e74a[_0x569f64(0x1bc)]),console[_0x569f64(0x199)](_0x569f64(0x1af)+_0x34e74a['commandCount']);for(const _0x2c3462 of _0x34e74a[_0x569f64(0x1ad)]){console[_0x569f64(0x199)]('\x20\x20'+(_0x2c3462[_0x569f64(0x1b5)]+':')['padEnd'](0x11)+'\x20'+(_0x2c3462['name']||a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x1c2)))+'\x20('+_0x2c3462[_0x569f64(0x1ac)]+'\x20commands)'),console[_0x569f64(0x199)]('\x20\x20'+''[_0x569f64(0x198)](0x11)+_0x569f64(0x1bb)+_0x2c3462[_0x569f64(0x19d)]['path']);}return console[_0x569f64(0x199)](),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x194)](_0x569f64(0x1b2))),console[_0x569f64(0x199)](a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x17e)[_0x569f64(0x196)](0x1e))),console[_0x569f64(0x199)](_0x569f64(0x1a1)+a29_0x34370b[_0x569f64(0x1b8)](AUTH_MODE['ClientAk']+_0x569f64(0x1a4))),console[_0x569f64(0x199)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x34370b[_0x569f64(0x1a6)](_0x569f64(0x1be))),console[_0x569f64(0x199)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1a35a7){const _0x1b41ef=a29_0x6e2b;if(_0x1a35a7['status']==='ok')return a29_0x34370b['green'](_0x1b41ef(0x1b3));if(_0x1a35a7[_0x1b41ef(0x17b)]==='missing')return a29_0x34370b[_0x1b41ef(0x1a6)](_0x1b41ef(0x1c9));if(_0x1a35a7[_0x1b41ef(0x17b)]===_0x1b41ef(0x1c3))return a29_0x34370b[_0x1b41ef(0x18a)](_0x1b41ef(0x19c));return a29_0x34370b[_0x1b41ef(0x185)](_0x1b41ef(0x1ca)+(_0x1a35a7[_0x1b41ef(0x180)]?':\x20'+_0x1a35a7['message']:''));}export const doctorDefinition={'service':a29_0x583d7c(0x1c0),'command':a29_0x583d7c(0x1ae),'description':a29_0x583d7c(0x18f),'risk':a29_0x583d7c(0x1a7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ function a29_0x41e2(){const _0x492e4f=['422903djXtFk','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','green','Global','274xqxYZH','gray','✓\x20Loaded','locale','status','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','✗\x20Invalid','\x20\x20Auth','yellow','platform','\x20\x20Session\x20check:\x20\x20\x20','missing','repeat','bold','12mgyqSu','⚠\x20Empty','3966498hahnVc','\x20\x20auth\x20(effective):\x20','\x20\x20Service\x20Tree','pageSize','ClientAk','46755rhpTUF','Diagnose\x20CLI\x20configuration\x20and\x20environment','accessKey','env','serviceCount','defaultApp','30sXzMnI','commandCount','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(not\x20found)','6618xJFylX','✓\x20Valid\x20JSON','704DpmIZE','currentApp','doctor','read','3628285aAlTcn','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','format','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','836896IVtVJM','log','\x20\x20Merged\x20Config','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','empty','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','14OFeSbY','\x20Imported\x20from:\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Config\x20JSON','(none)','\x20commands)','\x20(legacy/compat\x20only)','1360403jIvMYA','services','padEnd','path','\x20(accessKey)','252mCSZoA','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','red','registryPath','\x20doctor','(default)','(not\x20set)','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','version','verbose','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x41e2=function(){return _0x492e4f;};return a29_0x41e2();}const a29_0x2d79b8=a29_0x231c;(function(_0x4bd502,_0x27b6ab){const _0x596cff=a29_0x231c,_0x22f56c=_0x4bd502();while(!![]){try{const _0x462978=parseInt(_0x596cff(0x1b5))/0x1*(-parseInt(_0x596cff(0x182))/0x2)+parseInt(_0x596cff(0x1c8))/0x3*(parseInt(_0x596cff(0x18e))/0x4)+-parseInt(_0x596cff(0x188))/0x5+-parseInt(_0x596cff(0x1ca))/0x6*(-parseInt(_0x596cff(0x194))/0x7)+-parseInt(_0x596cff(0x184))/0x8*(-parseInt(_0x596cff(0x1cf))/0x9)+parseInt(_0x596cff(0x1d5))/0xa*(parseInt(_0x596cff(0x19b))/0xb)+parseInt(_0x596cff(0x1a0))/0xc*(-parseInt(_0x596cff(0x1af))/0xd);if(_0x462978===_0x27b6ab)break;else _0x22f56c['push'](_0x22f56c['shift']());}catch(_0x52acd0){_0x22f56c['push'](_0x22f56c['shift']());}}}(a29_0x41e2,0xa4017));import a29_0x462eeb from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';function a29_0x231c(_0xd3c3f3,_0x307946){_0xd3c3f3=_0xd3c3f3-0x17e;const _0x41e26c=a29_0x41e2();let _0x231c51=_0x41e26c[_0xd3c3f3];return _0x231c51;}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x13f217){const _0x3e82c2=a29_0x231c,_0xd8bda8=getCliVersion(),_0x515526=buildConfigFromFlags({});await initGlobalEnvironment(_0x515526),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb['bold'](CLI_BIN_NAME+_0x3e82c2(0x1a5))),console['log'](a29_0x462eeb[_0x3e82c2(0x1b6)]('─'['repeat'](0x32))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x180)+_0xd8bda8),console['log'](_0x3e82c2(0x1aa)+process[_0x3e82c2(0x1ac)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1b0)+process[_0x3e82c2(0x1c3)]+'\x20'+process[_0x3e82c2(0x1a2)]),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)]('\x20\x20Config\x20Files')),console[_0x3e82c2(0x18f)](a29_0x462eeb['gray'](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e)));const _0x10494f=getGlobalConfigPath(),_0x23def1=getProjectConfigPath();console[_0x3e82c2(0x18f)](_0x3e82c2(0x1bb)+(_0x10494f||a29_0x462eeb['gray'](_0x3e82c2(0x181)))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x18c)+(_0x23def1||a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x181)))),console[_0x3e82c2(0x18f)](),console['log'](a29_0x462eeb['bold'](_0x3e82c2(0x197))),console[_0x3e82c2(0x18f)](a29_0x462eeb['gray'](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e)));const _0x1f68ad=(_0x5a1ed1,_0x449108)=>{const _0x383c11=_0x3e82c2;if(!_0x449108){console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1b6)](_0x383c11(0x1ab)));return;}const _0x5b1cc8=inspectCliConfigJsonFile(_0x449108);if(_0x5b1cc8[_0x383c11(0x1b9)]==='ok')console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1b3)](_0x383c11(0x183)));else{if(_0x5b1cc8['status']===_0x383c11(0x192))console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1['padEnd'](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1c2)](_0x383c11(0x196)));else _0x5b1cc8['status']===_0x383c11(0x1c5)?console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1b6)]('(missing)')):(console[_0x383c11(0x18f)]('\x20\x20'+_0x5a1ed1['padEnd'](0x11)+'\x20'+a29_0x462eeb[_0x383c11(0x1a3)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x383c11(0x19d)](0x11)+'\x20'+a29_0x462eeb['red'](_0x5b1cc8['message'])));}};_0x1f68ad(_0x3e82c2(0x1b4),_0x10494f),_0x1f68ad('Project',_0x23def1),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)](_0x3e82c2(0x190))),console[_0x3e82c2(0x18f)](a29_0x462eeb['gray']('\x20\x20─'[_0x3e82c2(0x1c6)](0x1e))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1a1)+(_0x515526[_0x3e82c2(0x18a)]||a29_0x462eeb[_0x3e82c2(0x1a3)](_0x3e82c2(0x1a7)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x515526[_0x3e82c2(0x1d2)]);const _0x4e12bc=isLegacyCompatConfigKey(_0x3e82c2(0x1b8))?a29_0x462eeb[_0x3e82c2(0x1b6)](_0x515526['locale']+_0x3e82c2(0x19a)):_0x515526[_0x3e82c2(0x1b8)];console[_0x3e82c2(0x18f)](_0x3e82c2(0x1b1)+_0x4e12bc),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1a8)+(_0x515526[_0x3e82c2(0x1d4)]||a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x198)))),console['log'](_0x3e82c2(0x1ba)+(_0x515526[_0x3e82c2(0x185)]||a29_0x462eeb['gray'](_0x3e82c2(0x198)))),console[_0x3e82c2(0x18f)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x515526['format']||a29_0x462eeb['gray'](_0x3e82c2(0x1be)+DEFAULT_CONFIG_VALUES[_0x3e82c2(0x18b)]+')'))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x189)+(_0x515526[_0x3e82c2(0x1cd)]??a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1a6)))),console[_0x3e82c2(0x18f)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x515526['riskLevel']),console[_0x3e82c2(0x18f)](_0x3e82c2(0x18d)+_0x515526[_0x3e82c2(0x1ad)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1cb)+AUTH_MODE['ClientAk']),console[_0x3e82c2(0x18f)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x515526[_0x3e82c2(0x1d1)]?a29_0x462eeb[_0x3e82c2(0x1b3)]('(set,\x20length='+_0x515526[_0x3e82c2(0x1d1)]['length']+')'):a29_0x462eeb[_0x3e82c2(0x1b6)]('(none)'))),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)]('\x20\x20API\x20Endpoints')),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log'](_0x3e82c2(0x1bc)+getUserDomain()),console['log'](_0x3e82c2(0x1a9)+getRuntimeDomain()),console[_0x3e82c2(0x18f)](),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1c7)](_0x3e82c2(0x1cc))),console[_0x3e82c2(0x18f)](a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e)));const _0x32d3c9=inspectServiceRegistry();console[_0x3e82c2(0x18f)](_0x3e82c2(0x1ae)+_0x32d3c9[_0x3e82c2(0x1a4)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x193)+formatServiceRegistryStatus(_0x32d3c9)),console[_0x3e82c2(0x18f)](_0x3e82c2(0x191)+_0x32d3c9[_0x3e82c2(0x1d3)]),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1bd)+_0x32d3c9[_0x3e82c2(0x17e)]);for(const _0x502ac5 of _0x32d3c9[_0x3e82c2(0x19c)]){console['log']('\x20\x20'+(_0x502ac5['serviceCode']+':')[_0x3e82c2(0x19d)](0x11)+'\x20'+(_0x502ac5['name']||a29_0x462eeb['gray']('(unnamed)'))+'\x20('+_0x502ac5['commandCount']+_0x3e82c2(0x199)),console[_0x3e82c2(0x18f)]('\x20\x20'+''[_0x3e82c2(0x19d)](0x11)+_0x3e82c2(0x195)+_0x502ac5['source'][_0x3e82c2(0x19e)]);}return console[_0x3e82c2(0x18f)](),console['log'](a29_0x462eeb[_0x3e82c2(0x1c7)](_0x3e82c2(0x1c1))),console['log'](a29_0x462eeb['gray'](_0x3e82c2(0x1b2)[_0x3e82c2(0x1c6)](0x1e))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x17f)+a29_0x462eeb[_0x3e82c2(0x1b3)](AUTH_MODE[_0x3e82c2(0x1ce)]+_0x3e82c2(0x19f))),console[_0x3e82c2(0x18f)](_0x3e82c2(0x1c4)+a29_0x462eeb[_0x3e82c2(0x1b6)](_0x3e82c2(0x1bf))),console[_0x3e82c2(0x18f)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x167156){const _0x290950=a29_0x231c;if(_0x167156[_0x290950(0x1b9)]==='ok')return a29_0x462eeb[_0x290950(0x1b3)](_0x290950(0x1b7));if(_0x167156[_0x290950(0x1b9)]===_0x290950(0x1c5))return a29_0x462eeb[_0x290950(0x1b6)]('(not\x20found)');if(_0x167156[_0x290950(0x1b9)]===_0x290950(0x192))return a29_0x462eeb[_0x290950(0x1c2)](_0x290950(0x1c9));return a29_0x462eeb[_0x290950(0x1a3)](_0x290950(0x1c0)+(_0x167156['message']?':\x20'+_0x167156['message']:''));}export const doctorDefinition={'service':a29_0x2d79b8(0x186),'command':'check','description':a29_0x2d79b8(0x1d0),'risk':a29_0x2d79b8(0x187),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x56f2be=a30_0x4c4f;(function(_0x46626c,_0x43f0be){const _0x2e7b33=a30_0x4c4f,_0x843e7e=_0x46626c();while(!![]){try{const _0x3f6874=parseInt(_0x2e7b33(0x185))/0x1*(parseInt(_0x2e7b33(0x1a1))/0x2)+-parseInt(_0x2e7b33(0x193))/0x3*(-parseInt(_0x2e7b33(0x192))/0x4)+-parseInt(_0x2e7b33(0x18d))/0x5*(-parseInt(_0x2e7b33(0x184))/0x6)+parseInt(_0x2e7b33(0x19b))/0x7+parseInt(_0x2e7b33(0x194))/0x8*(parseInt(_0x2e7b33(0x191))/0x9)+-parseInt(_0x2e7b33(0x19c))/0xa+parseInt(_0x2e7b33(0x183))/0xb;if(_0x3f6874===_0x43f0be)break;else _0x843e7e['push'](_0x843e7e['shift']());}catch(_0x332e37){_0x843e7e['push'](_0x843e7e['shift']());}}}(a30_0x4d86,0xdf98d));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x4d86(){const _0x1f13bd=['\x20to\x20runtime\x20app\x20','long-term','4753540PUHBXu','36RNDdrh','5zBUjDJ','filepath','str','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','trim','body','filePath','bool','359105IbsbUl','query-url','build','filePath\x20is\x20required.','71577pUrKza','8988cephSb','261xtpOTj','56wjkDlw','read','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','upload','description','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','appCode','2126012jaLCdS','11325940ovrkXz','download','POST','path','file','252202IzKSDy','validation','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','boolean','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','Path\x20to\x20the\x20local\x20file\x20to\x20upload','string'];a30_0x4d86=function(){return _0x1f13bd;};return a30_0x4d86();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':'string','required':!![],'description':a30_0x56f2be(0x1a6)},FILEPATH_FLAG={'name':a30_0x56f2be(0x186),'type':a30_0x56f2be(0x180),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x56f2be(0x19d),'type':a30_0x56f2be(0x1a4),'description':a30_0x56f2be(0x199)},LONG_TERM_FLAG={'name':a30_0x56f2be(0x182),'type':a30_0x56f2be(0x1a4),'description':a30_0x56f2be(0x1a5)};function a30_0x4c4f(_0x50d0c3,_0x3f8c3c){_0x50d0c3=_0x50d0c3-0x180;const _0x4d8617=a30_0x4d86();let _0x4c4f3b=_0x4d8617[_0x50d0c3];return _0x4c4f3b;}function requireFilePath(_0x2d8944){const _0x148b55=a30_0x56f2be,_0x785a6b=_0x2d8944[_0x148b55(0x189)]();if(!_0x785a6b)throw CliErrors[_0x148b55(0x1a2)](_0x148b55(0x190));return _0x785a6b;}const fileUpload={'service':a30_0x56f2be(0x1a0),'command':a30_0x56f2be(0x197),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x56f2be(0x195),'flags':[FILE_FLAG],async 'dryRun'(_0x44de98){const _0x248514=a30_0x56f2be,_0x4c833b=requireRuntimeUploadFile(_0x44de98['str'](_0x248514(0x1a0)),'File');return dryRun(_0x248514(0x19e),'/client/uploadFile')[_0x248514(0x18a)]({'appCode':_0x44de98['appCode'],'multipart':{'file':_0x4c833b}})[_0x248514(0x198)]('Preview:\x20upload\x20'+_0x4c833b[_0x248514(0x19f)]+_0x248514(0x181)+_0x44de98[_0x248514(0x19a)])[_0x248514(0x18f)]();},async 'execute'(_0x3e98b4){const _0x4debf8=a30_0x56f2be,_0x2d98d8=requireRuntimeUploadFile(_0x3e98b4[_0x4debf8(0x187)](_0x4debf8(0x1a0)),'File'),_0x3c40fd=await uploadRuntimeFile(_0x3e98b4[_0x4debf8(0x19a)],_0x2d98d8[_0x4debf8(0x19f)]);return{'ok':!![],'data':_0x3c40fd,'message':_0x3c40fd[_0x4debf8(0x18b)]?'Uploaded\x20file:\x20'+_0x3c40fd[_0x4debf8(0x18b)]+_0x4debf8(0x196):_0x4debf8(0x188)};}},fileQueryUrl={'service':a30_0x56f2be(0x1a0),'command':a30_0x56f2be(0x18e),'description':a30_0x56f2be(0x1a3),'risk':a30_0x56f2be(0x195),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x2d6d00){const _0x536a13=a30_0x56f2be,_0x3d8160=requireFilePath(_0x2d6d00[_0x536a13(0x187)](_0x536a13(0x186))),_0x4841d8=await queryRuntimeFileUrl(_0x3d8160,{'download':_0x2d6d00[_0x536a13(0x18c)](_0x536a13(0x19d)),'longTerm':_0x2d6d00[_0x536a13(0x18c)](_0x536a13(0x182))});return{'ok':!![],'data':_0x4841d8};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x3eaa47=a30_0x2464;function a30_0x2464(_0x118f04,_0x454cad){_0x118f04=_0x118f04-0x65;const _0x11e38d=a30_0x11e3();let _0x246472=_0x11e38d[_0x118f04];return _0x246472;}(function(_0x592077,_0x469683){const _0x277300=a30_0x2464,_0x4dc046=_0x592077();while(!![]){try{const _0x2825c1=parseInt(_0x277300(0x7e))/0x1*(-parseInt(_0x277300(0x68))/0x2)+parseInt(_0x277300(0x76))/0x3+parseInt(_0x277300(0x82))/0x4+-parseInt(_0x277300(0x7a))/0x5*(-parseInt(_0x277300(0x72))/0x6)+-parseInt(_0x277300(0x75))/0x7+-parseInt(_0x277300(0x80))/0x8+parseInt(_0x277300(0x6f))/0x9;if(_0x2825c1===_0x469683)break;else _0x4dc046['push'](_0x4dc046['shift']());}catch(_0x35a98f){_0x4dc046['push'](_0x4dc046['shift']());}}}(a30_0x11e3,0x9e630));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x11e3(){const _0x1bbfef=['appCode','\x20to\x20runtime\x20app\x20','10823841BWkfoZ','download','bool','254454pPxzbS','Preview:\x20upload\x20','trim','2267405zgyhbd','937872RSewid','string','read','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','115DxJiBD','POST','upload','File','662dBeliq','file','3963608HcbvWb','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','196864PjYOwT','filepath','Path\x20to\x20the\x20local\x20file\x20to\x20upload','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','body','str','validation','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','build','3238kItWht','boolean','path','filePath','long-term'];a30_0x11e3=function(){return _0x1bbfef;};return a30_0x11e3();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':a30_0x3eaa47(0x77),'required':!![],'description':a30_0x3eaa47(0x84)},FILEPATH_FLAG={'name':a30_0x3eaa47(0x83),'type':a30_0x3eaa47(0x77),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x3eaa47(0x70),'type':a30_0x3eaa47(0x69),'description':a30_0x3eaa47(0x66)},LONG_TERM_FLAG={'name':a30_0x3eaa47(0x6c),'type':'boolean','description':a30_0x3eaa47(0x81)};function requireFilePath(_0x453fa1){const _0x2e2674=a30_0x3eaa47,_0x1cc2c1=_0x453fa1[_0x2e2674(0x74)]();if(!_0x1cc2c1)throw CliErrors[_0x2e2674(0x88)]('filePath\x20is\x20required.');return _0x1cc2c1;}const fileUpload={'service':a30_0x3eaa47(0x7f),'command':a30_0x3eaa47(0x7c),'description':a30_0x3eaa47(0x65),'risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x22f8da){const _0x557fc0=a30_0x3eaa47,_0x4033ea=requireRuntimeUploadFile(_0x22f8da[_0x557fc0(0x87)](_0x557fc0(0x7f)),_0x557fc0(0x7d));return dryRun(_0x557fc0(0x7b),'/client/uploadFile')[_0x557fc0(0x86)]({'appCode':_0x22f8da['appCode'],'multipart':{'file':_0x4033ea}})['description'](_0x557fc0(0x73)+_0x4033ea[_0x557fc0(0x6a)]+_0x557fc0(0x6e)+_0x22f8da[_0x557fc0(0x6d)])[_0x557fc0(0x67)]();},async 'execute'(_0x236526){const _0x4051e8=a30_0x3eaa47,_0x2017e0=requireRuntimeUploadFile(_0x236526[_0x4051e8(0x87)](_0x4051e8(0x7f)),_0x4051e8(0x7d)),_0x5c2c1e=await uploadRuntimeFile(_0x236526['appCode'],_0x2017e0[_0x4051e8(0x6a)]);return{'ok':!![],'data':_0x5c2c1e,'message':_0x5c2c1e[_0x4051e8(0x6b)]?'Uploaded\x20file:\x20'+_0x5c2c1e[_0x4051e8(0x6b)]+_0x4051e8(0x85):_0x4051e8(0x79)};}},fileQueryUrl={'service':'file','command':'query-url','description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x3eaa47(0x78),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x29018d){const _0x3f8d80=a30_0x3eaa47,_0x53c8c2=requireFilePath(_0x29018d[_0x3f8d80(0x87)](_0x3f8d80(0x83))),_0x45fa9f=await queryRuntimeFileUrl(_0x53c8c2,{'download':_0x29018d[_0x3f8d80(0x71)](_0x3f8d80(0x70)),'longTerm':_0x29018d[_0x3f8d80(0x71)](_0x3f8d80(0x6c))});return{'ok':!![],'data':_0x45fa9f};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x565c14=a31_0x27d5;(function(_0x546696,_0x1073c0){const _0x3e511b=a31_0x27d5,_0x43ce41=_0x546696();while(!![]){try{const _0x24c9ed=-parseInt(_0x3e511b(0x97))/0x1+-parseInt(_0x3e511b(0x9c))/0x2+parseInt(_0x3e511b(0xaa))/0x3*(-parseInt(_0x3e511b(0xb1))/0x4)+parseInt(_0x3e511b(0x88))/0x5+parseInt(_0x3e511b(0xa3))/0x6+parseInt(_0x3e511b(0xad))/0x7+parseInt(_0x3e511b(0x9a))/0x8;if(_0x24c9ed===_0x1073c0)break;else _0x43ce41['push'](_0x43ce41['shift']());}catch(_0x2a4c85){_0x43ce41['push'](_0x43ce41['shift']());}}}(a31_0x1997,0x5033b));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a31_0x565c14(0x8d),'description':'App\x20code\x20for\x20the\x20project'},{'name':a31_0x565c14(0x91),'type':'string','description':a31_0x565c14(0x74)+DEFAULT_CONFIG_VALUES[a31_0x565c14(0x91)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x565c14(0xab),'type':a31_0x565c14(0xa0),'description':a31_0x565c14(0x98)+PRODUCT_CONFIG[a31_0x565c14(0x78)]+a31_0x565c14(0xa4),'default':![]},{'name':a31_0x565c14(0x84),'type':a31_0x565c14(0xa0),'description':a31_0x565c14(0x71),'default':![]}];function a31_0x1997(){const _0x17239c=['join','name','App\x20code','newConfigFileName','log','defaultApp','\x20init\x20—\x20Create\x20','entries','trim','appcode','close','Aborted.','message','stdin','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','yes','once','\x20\x20env:\x20\x20\x20\x20\x20','Imported\x20from\x20','3005390FUckPU','apiDir','app','Usage:\x20','User\x20aborted\x20prompt','string','stdout','\x20\x20config:\x20\x20','\x20already\x20exists.\x20Overwrite?','env','parse','[Y/n]','):\x20','cancelled','removeListener','309628NmpyEK','Write\x20to\x20global\x20(~/','\x20\x20default:\x20','4092792AIOxor','\x20\x20appcode:\x20','1133214pmXFeS','object','App\x20code\x20cannot\x20be\x20empty.','riskLevel','boolean','apps','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','2493522bklWjr',')\x20instead\x20of\x20project','[y/N]','File\x20','Initialized\x20','question','validation','54sGCRFE','global','Override\x20imported\x20default\x20env','1037302KdnVwK','includes','Override\x20imported\x20default\x20appcode','file','104824YaoLyZ','utf8','SIGINT','project','Skip\x20confirmation\x20when\x20overwriting','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Source\x20file\x20not\x20found:\x20','Target\x20environment\x20(default\x20'];a31_0x1997=function(){return _0x17239c;};return a31_0x1997();}export const initImportFlagDefs=[{'name':'file','type':a31_0x565c14(0x8d),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x565c14(0x7e),'type':a31_0x565c14(0x8d),'description':a31_0x565c14(0xaf)},{'name':a31_0x565c14(0x91),'type':a31_0x565c14(0x8d),'description':a31_0x565c14(0xac),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a31_0x565c14(0x98)+PRODUCT_CONFIG[a31_0x565c14(0x78)]+a31_0x565c14(0xa4),'default':![]},{'name':a31_0x565c14(0x84),'type':'boolean','description':a31_0x565c14(0x71),'default':![]}];export async function runInit(_0x3e8b91){const _0x5c750d=a31_0x565c14,_0x23140b=isNonInteractiveMode(_0x3e8b91),_0x347e12=_0x3e8b91[_0x5c750d(0xab)]?_0x5c750d(0xab):_0x5c750d(0xb4),_0x3c4378=resolveWriteConfigPath(_0x347e12);try{_0x23140b?await runNonInteractive(_0x3e8b91,_0x3c4378):await runInteractive(_0x3e8b91,_0x3c4378);}catch(_0x42603b){if(_0x42603b instanceof AbortPrompt)throw CliErrors[_0x5c750d(0x95)]();throw _0x42603b;}}export async function runInitImport(_0x26b105){const _0x5d48ef=a31_0x565c14,_0x4c575e=_0x26b105[_0x5d48ef(0xab)]?_0x5d48ef(0xab):_0x5d48ef(0xb4),_0x442bae=resolveWriteConfigPath(_0x4c575e);await runFromImport(_0x26b105,_0x442bae);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x565c14(0x89)]);async function runFromImport(_0x44d308,_0xab779e){const _0x447bd5=a31_0x565c14,_0xda465f=resolveFilePath(_0x44d308[_0x447bd5(0xb0)]);if(!existsSync(_0xda465f))throw CliErrors[_0x447bd5(0xa9)](_0x447bd5(0x73)+_0xda465f);const _0x5f1086=readSourceFile(_0xda465f),_0x5e9e76=convertToRuntimeConfig(_0x5f1086);_0x44d308[_0x447bd5(0x7e)]&&(_0x5e9e76[_0x447bd5(0x7e)]=String(_0x44d308['appcode']));_0x44d308['env']&&(_0x5e9e76[_0x447bd5(0x91)]=resolveInitEnv(_0x44d308));if(!_0x5e9e76[_0x447bd5(0x7e)])throw CliErrors[_0x447bd5(0xa9)](_0x447bd5(0x83),_0x447bd5(0xa2));await writeInitConfig(_0xab779e,_0x5e9e76,_0x44d308),console[_0x447bd5(0x79)](_0x447bd5(0x87)+_0xda465f),console[_0x447bd5(0x79)](_0x447bd5(0x8f)+_0xab779e),console[_0x447bd5(0x79)]('\x20\x20appcode:\x20'+_0x5e9e76[_0x447bd5(0x7e)]);if(_0x5e9e76['defaultApp'])console[_0x447bd5(0x79)](_0x447bd5(0x99)+_0x5e9e76[_0x447bd5(0x7a)]);}function convertToRuntimeConfig(_0x191186){const _0x434c54=a31_0x565c14;if(_0x191186['apps']&&typeof _0x191186[_0x434c54(0xa1)]===_0x434c54(0x9d))throw CliErrors[_0x434c54(0xa9)](_0x434c54(0x72),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0xa3295={};for(const _0x366063 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x191186[_0x366063]!==undefined&&(_0xa3295[_0x366063]=_0x191186[_0x366063]);}return!_0xa3295[_0x434c54(0x9f)]&&(_0xa3295['riskLevel']=DEFAULT_CONFIG_VALUES[_0x434c54(0x9f)]),_0xa3295;}async function runNonInteractive(_0x530d8b,_0x95088c){const _0x19c038=a31_0x565c14,_0x1c1dc2=_0x530d8b['appcode'];if(!_0x1c1dc2)throw CliErrors['flagMissing'](_0x19c038(0x7e),_0x19c038(0x8b)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x1dfa00=resolveInitEnv(_0x530d8b);await writeInitConfig(_0x95088c,{'appcode':_0x1c1dc2,'env':_0x1dfa00},_0x530d8b),console[_0x19c038(0x79)](_0x19c038(0xa7)+_0x95088c),console['log'](_0x19c038(0x9b)+_0x1c1dc2),console[_0x19c038(0x79)](_0x19c038(0x86)+_0x1dfa00);}async function runInteractive(_0x42be04,_0x22a2be){const _0x1c3aa4=a31_0x565c14,_0x1eca3d=loadExisting(_0x22a2be),_0x292679=typeof _0x1eca3d?.[_0x1c3aa4(0x7e)]===_0x1c3aa4(0x8d)?_0x1eca3d[_0x1c3aa4(0x7e)]:'',_0x5e9543=resolveInitEnv(_0x42be04);console[_0x1c3aa4(0x79)](CLI_BIN_NAME+_0x1c3aa4(0x7b)+PRODUCT_CONFIG[_0x1c3aa4(0x78)]+'\x0a');if(existsSync(_0x22a2be)&&!_0x42be04[_0x1c3aa4(0x84)]){const _0x11a07e=await promptYesNo(_0x1c3aa4(0xa6)+_0x22a2be+_0x1c3aa4(0x90),![]);if(!_0x11a07e){console[_0x1c3aa4(0x79)](_0x1c3aa4(0x80));return;}}const _0x1cc886=typeof _0x42be04[_0x1c3aa4(0x7e)]==='string'?_0x42be04['appcode']['trim']():'';let _0x146da=_0x1cc886;!_0x146da&&(_0x146da=await promptInput(_0x1c3aa4(0x77),_0x292679));if(!_0x146da['trim']())throw CliErrors[_0x1c3aa4(0xa9)](_0x1c3aa4(0x9e));await writeInitConfig(_0x22a2be,{'appcode':_0x146da[_0x1c3aa4(0x7d)](),'env':_0x5e9543},_0x42be04),console[_0x1c3aa4(0x79)]('\x0aInitialized\x20'+_0x22a2be),console[_0x1c3aa4(0x79)](_0x1c3aa4(0x9b)+_0x146da[_0x1c3aa4(0x7d)]()),console[_0x1c3aa4(0x79)](_0x1c3aa4(0x86)+_0x5e9543);}async function writeInitConfig(_0x327845,_0x16cb9f,_0x5f14b0){const _0x53ef44=a31_0x565c14;let _0xf9a65c={};existsSync(_0x327845)&&!_0x5f14b0[_0x53ef44(0x84)]&&(_0xf9a65c=readConfigFile(_0x327845));for(const [_0x243c18,_0x29157f]of Object[_0x53ef44(0x7c)](_0x16cb9f)){_0x29157f!==undefined&&(_0xf9a65c[_0x243c18]=_0x29157f);}if(_0xf9a65c[_0x53ef44(0x8a)])delete _0xf9a65c[_0x53ef44(0x8a)];writeConfigFile(_0x327845,_0xf9a65c);}class AbortPrompt extends Error{constructor(){const _0x47c438=a31_0x565c14;super(_0x47c438(0x8c)),this[_0x47c438(0x76)]='AbortPrompt';}}function createSafeRl(){const _0x1f742e=a31_0x565c14,_0x360dd2=createInterface({'input':process[_0x1f742e(0x82)],'output':process[_0x1f742e(0x8e)]});let _0x456232;const _0x167cc7=new Promise((_0x5a8fed,_0x59f975)=>{const _0x4019ec=_0x1f742e;_0x456232=()=>{const _0x2062a0=a31_0x27d5;_0x456232&&(_0x360dd2[_0x2062a0(0x96)](_0x2062a0(0xb3),_0x456232),_0x456232=undefined);try{_0x360dd2[_0x2062a0(0x7f)]();}catch{}_0x59f975(new AbortPrompt());},_0x360dd2[_0x4019ec(0x85)]('SIGINT',_0x456232);}),_0x251f96=()=>{const _0x1b6a8d=_0x1f742e;_0x456232&&(_0x360dd2[_0x1b6a8d(0x96)](_0x1b6a8d(0xb3),_0x456232),_0x456232=undefined);try{_0x360dd2[_0x1b6a8d(0x7f)]();}catch{}};return{'rl':_0x360dd2,'abortPromise':_0x167cc7,'disposeSuccess':_0x251f96};}async function promptInput(_0x4782ae,_0x2d9c8f){const {rl:_0x50250c,abortPromise:_0x539613,disposeSuccess:_0x44d8e2}=createSafeRl(),_0x8ae4b5=new Promise(_0x198d45=>{const _0x2f2fcb=a31_0x27d5,_0x359f97=_0x2d9c8f?'\x20\x20'+_0x4782ae+'\x20('+_0x2d9c8f+_0x2f2fcb(0x94):'\x20\x20'+_0x4782ae+':\x20';_0x50250c[_0x2f2fcb(0xa8)](_0x359f97,_0x5a69dc=>{const _0x48c779=_0x2f2fcb;_0x44d8e2(),_0x198d45(_0x5a69dc[_0x48c779(0x7d)]()||_0x2d9c8f);});});return Promise['race']([_0x8ae4b5,_0x539613]);}async function promptYesNo(_0x4b6580,_0x4f7b0e){const {rl:_0x4d92c9,abortPromise:_0x2ceec1,disposeSuccess:_0x44c430}=createSafeRl(),_0x3e773a=new Promise(_0x52fd95=>{const _0x1dc4c4=a31_0x27d5,_0x2debd8=_0x4f7b0e?_0x1dc4c4(0x93):_0x1dc4c4(0xa5);_0x4d92c9[_0x1dc4c4(0xa8)]('\x20\x20'+_0x4b6580+'\x20'+_0x2debd8+':\x20',_0x925c6f=>{const _0x117179=_0x1dc4c4;_0x44c430();const _0x156958=_0x925c6f[_0x117179(0x7d)]()['toLowerCase']();if(_0x156958==='y'||_0x156958===_0x117179(0x84))_0x52fd95(!![]);else{if(_0x156958==='n'||_0x156958==='no')_0x52fd95(![]);else _0x52fd95(_0x4f7b0e);}});});return Promise['race']([_0x3e773a,_0x2ceec1]);}function loadExisting(_0x19205a){if(!existsSync(_0x19205a))return null;return readConfigFile(_0x19205a);}function a31_0x27d5(_0x24aaa9,_0x299fb3){_0x24aaa9=_0x24aaa9-0x71;const _0x1997d0=a31_0x1997();let _0x27d590=_0x1997d0[_0x24aaa9];return _0x27d590;}function resolveFilePath(_0x17f297){return isAbsolute(_0x17f297)?_0x17f297:resolve(process['cwd'](),_0x17f297);}function readSourceFile(_0x20097e){const _0x1ebfec=a31_0x565c14;try{const _0xc6e21a=readFileSync(_0x20097e,{'encoding':_0x1ebfec(0xb2)});return JSON[_0x1ebfec(0x92)](_0xc6e21a);}catch(_0x1f5cbe){throw CliErrors[_0x1ebfec(0xa9)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x1f5cbe[_0x1ebfec(0x81)]);}}function resolveInitEnv(_0x3f6b4d){const _0x4e910e=a31_0x565c14,_0x831a28=_0x3f6b4d[_0x4e910e(0x91)];if(_0x831a28===undefined||_0x831a28==='')return DEFAULT_CONFIG_VALUES[_0x4e910e(0x91)];if(!RUNTIME_ENV_VALUES[_0x4e910e(0xae)](_0x831a28))throw CliErrors[_0x4e910e(0xa9)]('Invalid\x20env\x20\x22'+_0x831a28+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x4e910e(0x75)](',\x20'));return _0x831a28;}
1
+ const a31_0x4d5bae=a31_0x8f5d;(function(_0x46a591,_0x5ef3b4){const _0x2d7de4=a31_0x8f5d,_0x3c8b08=_0x46a591();while(!![]){try{const _0x305c28=parseInt(_0x2d7de4(0x177))/0x1*(parseInt(_0x2d7de4(0x17f))/0x2)+-parseInt(_0x2d7de4(0x1b5))/0x3+-parseInt(_0x2d7de4(0x1a4))/0x4*(-parseInt(_0x2d7de4(0x19b))/0x5)+parseInt(_0x2d7de4(0x1a6))/0x6*(parseInt(_0x2d7de4(0x187))/0x7)+parseInt(_0x2d7de4(0x1a7))/0x8*(parseInt(_0x2d7de4(0x1b2))/0x9)+-parseInt(_0x2d7de4(0x1a5))/0xa+-parseInt(_0x2d7de4(0x18e))/0xb;if(_0x305c28===_0x5ef3b4)break;else _0x3c8b08['push'](_0x3c8b08['shift']());}catch(_0x971c9){_0x3c8b08['push'](_0x3c8b08['shift']());}}}(a31_0x3f9a,0xeffdb));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a31_0x3f9a(){const _0x5d2f6c=['file','race','cwd','22966ETtpPM','[y/N]','apiDir','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','User\x20aborted\x20prompt','\x20\x20default:\x20','entries','yes','1876cxORIU','\x20\x20env:\x20\x20\x20\x20\x20','Usage:\x20','object','trim','global','close','16611067XIBNSQ','SIGINT','once','boolean','defaultApp','Override\x20imported\x20default\x20appcode','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','[Y/n]','newConfigFileName','Write\x20to\x20global\x20(~/','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','string','app','920lHXnTc','Aborted.','name','\x20\x20config:\x20\x20','):\x20','Invalid\x20env\x20\x22','stdin','App\x20code','message','41804BeUkhV','18825230eZYQio','38562xWBAOV','19752mGdAdN','appcode','riskLevel','File\x20','join','toLowerCase','App\x20code\x20for\x20the\x20project','AbortPrompt','\x20\x20appcode:\x20','Imported\x20from\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','657CeDJcf','validation','log','3069615pBxxYc','apps','Target\x20environment\x20(default\x20','env','Initialized\x20','\x20already\x20exists.\x20Overwrite?','137mWOaBE','question','flagMissing','removeListener','\x22.\x20Allowed:\x20'];a31_0x3f9a=function(){return _0x5d2f6c;};return a31_0x3f9a();}import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x4d5bae(0x1a8),'type':a31_0x4d5bae(0x199),'description':a31_0x4d5bae(0x1ad)},{'name':'env','type':a31_0x4d5bae(0x199),'description':a31_0x4d5bae(0x1b7)+DEFAULT_CONFIG_VALUES[a31_0x4d5bae(0x1b8)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x4d5bae(0x18c),'type':'boolean','description':a31_0x4d5bae(0x197)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x4d5bae(0x186),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x4d5bae(0x17c),'type':a31_0x4d5bae(0x199),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':'appcode','type':a31_0x4d5bae(0x199),'description':a31_0x4d5bae(0x193)},{'name':a31_0x4d5bae(0x1b8),'type':'string','description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x4d5bae(0x18c),'type':'boolean','description':a31_0x4d5bae(0x197)+PRODUCT_CONFIG[a31_0x4d5bae(0x196)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x4d5bae(0x186),'type':a31_0x4d5bae(0x191),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x3b272c){const _0x516dfe=a31_0x4d5bae,_0x1d2afc=isNonInteractiveMode(_0x3b272c),_0x1a7634=_0x3b272c[_0x516dfe(0x18c)]?_0x516dfe(0x18c):'project',_0x416eca=resolveWriteConfigPath(_0x1a7634);try{_0x1d2afc?await runNonInteractive(_0x3b272c,_0x416eca):await runInteractive(_0x3b272c,_0x416eca);}catch(_0x1ca070){if(_0x1ca070 instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x1ca070;}}export async function runInitImport(_0x41698f){const _0x113290=a31_0x4d5bae,_0x3bea0e=_0x41698f[_0x113290(0x18c)]?_0x113290(0x18c):'project',_0x1c23b6=resolveWriteConfigPath(_0x3bea0e);await runFromImport(_0x41698f,_0x1c23b6);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x4d5bae(0x181)]);async function runFromImport(_0x54b7f8,_0x12f09e){const _0x2731b3=a31_0x4d5bae,_0xe4901b=resolveFilePath(_0x54b7f8['file']);if(!existsSync(_0xe4901b))throw CliErrors[_0x2731b3(0x1b3)]('Source\x20file\x20not\x20found:\x20'+_0xe4901b);const _0x4cc5fa=readSourceFile(_0xe4901b),_0xb70ecf=convertToRuntimeConfig(_0x4cc5fa);_0x54b7f8[_0x2731b3(0x1a8)]&&(_0xb70ecf[_0x2731b3(0x1a8)]=String(_0x54b7f8[_0x2731b3(0x1a8)]));_0x54b7f8['env']&&(_0xb70ecf[_0x2731b3(0x1b8)]=resolveInitEnv(_0x54b7f8));if(!_0xb70ecf[_0x2731b3(0x1a8)])throw CliErrors[_0x2731b3(0x1b3)](_0x2731b3(0x1b1),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x12f09e,_0xb70ecf,_0x54b7f8),console['log'](_0x2731b3(0x1b0)+_0xe4901b),console['log'](_0x2731b3(0x19e)+_0x12f09e),console[_0x2731b3(0x1b4)](_0x2731b3(0x1af)+_0xb70ecf[_0x2731b3(0x1a8)]);if(_0xb70ecf[_0x2731b3(0x192)])console[_0x2731b3(0x1b4)](_0x2731b3(0x184)+_0xb70ecf['defaultApp']);}function convertToRuntimeConfig(_0x9637e0){const _0x12eadc=a31_0x4d5bae;if(_0x9637e0[_0x12eadc(0x1b6)]&&typeof _0x9637e0[_0x12eadc(0x1b6)]===_0x12eadc(0x18a))throw CliErrors[_0x12eadc(0x1b3)](_0x12eadc(0x194),_0x12eadc(0x182));const _0x1c0da8={};for(const _0xa3115f of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x9637e0[_0xa3115f]!==undefined&&(_0x1c0da8[_0xa3115f]=_0x9637e0[_0xa3115f]);}return!_0x1c0da8[_0x12eadc(0x1a9)]&&(_0x1c0da8[_0x12eadc(0x1a9)]=DEFAULT_CONFIG_VALUES[_0x12eadc(0x1a9)]),_0x1c0da8;}async function runNonInteractive(_0x4fa154,_0x52a8b4){const _0x4f0892=a31_0x4d5bae,_0x4096ff=_0x4fa154[_0x4f0892(0x1a8)];if(!_0x4096ff)throw CliErrors[_0x4f0892(0x179)](_0x4f0892(0x1a8),_0x4f0892(0x189)+CLI_BIN_NAME+_0x4f0892(0x198));const _0x43e035=resolveInitEnv(_0x4fa154);await writeInitConfig(_0x52a8b4,{'appcode':_0x4096ff,'env':_0x43e035},_0x4fa154),console[_0x4f0892(0x1b4)](_0x4f0892(0x1b9)+_0x52a8b4),console[_0x4f0892(0x1b4)]('\x20\x20appcode:\x20'+_0x4096ff),console[_0x4f0892(0x1b4)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x43e035);}async function runInteractive(_0x5c0567,_0x132d2e){const _0x2191e7=a31_0x4d5bae,_0x493187=loadExisting(_0x132d2e),_0x160fd4=typeof _0x493187?.['appcode']===_0x2191e7(0x199)?_0x493187[_0x2191e7(0x1a8)]:'',_0x3d6e48=resolveInitEnv(_0x5c0567);console[_0x2191e7(0x1b4)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x2191e7(0x196)]+'\x0a');if(existsSync(_0x132d2e)&&!_0x5c0567[_0x2191e7(0x186)]){const _0x4964c1=await promptYesNo(_0x2191e7(0x1aa)+_0x132d2e+_0x2191e7(0x1ba),![]);if(!_0x4964c1){console[_0x2191e7(0x1b4)](_0x2191e7(0x19c));return;}}const _0x2c4736=typeof _0x5c0567['appcode']===_0x2191e7(0x199)?_0x5c0567[_0x2191e7(0x1a8)][_0x2191e7(0x18b)]():'';let _0x31ebd7=_0x2c4736;!_0x31ebd7&&(_0x31ebd7=await promptInput(_0x2191e7(0x1a2),_0x160fd4));if(!_0x31ebd7['trim']())throw CliErrors[_0x2191e7(0x1b3)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x132d2e,{'appcode':_0x31ebd7[_0x2191e7(0x18b)](),'env':_0x3d6e48},_0x5c0567),console['log']('\x0aInitialized\x20'+_0x132d2e),console[_0x2191e7(0x1b4)](_0x2191e7(0x1af)+_0x31ebd7[_0x2191e7(0x18b)]()),console[_0x2191e7(0x1b4)](_0x2191e7(0x188)+_0x3d6e48);}async function writeInitConfig(_0x5b03b7,_0x513197,_0x19d834){const _0x9411c1=a31_0x4d5bae;let _0x577d5d={};existsSync(_0x5b03b7)&&!_0x19d834[_0x9411c1(0x186)]&&(_0x577d5d=readConfigFile(_0x5b03b7));for(const [_0x18bd40,_0x35b438]of Object[_0x9411c1(0x185)](_0x513197)){_0x35b438!==undefined&&(_0x577d5d[_0x18bd40]=_0x35b438);}if(_0x577d5d[_0x9411c1(0x19a)])delete _0x577d5d[_0x9411c1(0x19a)];writeConfigFile(_0x5b03b7,_0x577d5d);}class AbortPrompt extends Error{constructor(){const _0x5f3954=a31_0x4d5bae;super(_0x5f3954(0x183)),this[_0x5f3954(0x19d)]=_0x5f3954(0x1ae);}}function createSafeRl(){const _0x1201c1=a31_0x4d5bae,_0x4f8418=createInterface({'input':process[_0x1201c1(0x1a1)],'output':process['stdout']});let _0x33940e;const _0x39cafa=new Promise((_0xbc072d,_0x36deeb)=>{const _0x2a3b0a=_0x1201c1;_0x33940e=()=>{const _0x12385c=a31_0x8f5d;_0x33940e&&(_0x4f8418[_0x12385c(0x17a)](_0x12385c(0x18f),_0x33940e),_0x33940e=undefined);try{_0x4f8418[_0x12385c(0x18d)]();}catch{}_0x36deeb(new AbortPrompt());},_0x4f8418[_0x2a3b0a(0x190)](_0x2a3b0a(0x18f),_0x33940e);}),_0x49cf49=()=>{const _0x21a236=_0x1201c1;_0x33940e&&(_0x4f8418[_0x21a236(0x17a)](_0x21a236(0x18f),_0x33940e),_0x33940e=undefined);try{_0x4f8418[_0x21a236(0x18d)]();}catch{}};return{'rl':_0x4f8418,'abortPromise':_0x39cafa,'disposeSuccess':_0x49cf49};}async function promptInput(_0x35e328,_0x4ef636){const _0x234c07=a31_0x4d5bae,{rl:_0x125f7a,abortPromise:_0x10a2c1,disposeSuccess:_0x4131f6}=createSafeRl(),_0x6fce11=new Promise(_0x5655d7=>{const _0x42cfca=a31_0x8f5d,_0x15e93a=_0x4ef636?'\x20\x20'+_0x35e328+'\x20('+_0x4ef636+_0x42cfca(0x19f):'\x20\x20'+_0x35e328+':\x20';_0x125f7a[_0x42cfca(0x178)](_0x15e93a,_0x1d88ce=>{const _0x5e9b40=_0x42cfca;_0x4131f6(),_0x5655d7(_0x1d88ce[_0x5e9b40(0x18b)]()||_0x4ef636);});});return Promise[_0x234c07(0x17d)]([_0x6fce11,_0x10a2c1]);}async function promptYesNo(_0x49a06d,_0x9f6db5){const _0x2f7c80=a31_0x4d5bae,{rl:_0x4a7df3,abortPromise:_0x430dca,disposeSuccess:_0x5e3e2f}=createSafeRl(),_0x46e432=new Promise(_0x346fb0=>{const _0x36acc3=a31_0x8f5d,_0x5cdc12=_0x9f6db5?_0x36acc3(0x195):_0x36acc3(0x180);_0x4a7df3[_0x36acc3(0x178)]('\x20\x20'+_0x49a06d+'\x20'+_0x5cdc12+':\x20',_0x1475b0=>{const _0xf24b21=_0x36acc3;_0x5e3e2f();const _0x507631=_0x1475b0[_0xf24b21(0x18b)]()[_0xf24b21(0x1ac)]();if(_0x507631==='y'||_0x507631===_0xf24b21(0x186))_0x346fb0(!![]);else{if(_0x507631==='n'||_0x507631==='no')_0x346fb0(![]);else _0x346fb0(_0x9f6db5);}});});return Promise[_0x2f7c80(0x17d)]([_0x46e432,_0x430dca]);}function loadExisting(_0x3f1616){if(!existsSync(_0x3f1616))return null;return readConfigFile(_0x3f1616);}function resolveFilePath(_0xd8ef77){const _0x42c058=a31_0x4d5bae;return isAbsolute(_0xd8ef77)?_0xd8ef77:resolve(process[_0x42c058(0x17e)](),_0xd8ef77);}function a31_0x8f5d(_0x42b843,_0x17ae4a){_0x42b843=_0x42b843-0x177;const _0x3f9af3=a31_0x3f9a();let _0x8f5d94=_0x3f9af3[_0x42b843];return _0x8f5d94;}function readSourceFile(_0x4bf85a){const _0x107e54=a31_0x4d5bae;try{const _0x124a08=readFileSync(_0x4bf85a,{'encoding':'utf8'});return JSON['parse'](_0x124a08);}catch(_0x2fee29){throw CliErrors[_0x107e54(0x1b3)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x2fee29[_0x107e54(0x1a3)]);}}function resolveInitEnv(_0x41d7cd){const _0x55c60e=a31_0x4d5bae,_0x108dec=_0x41d7cd[_0x55c60e(0x1b8)];if(_0x108dec===undefined||_0x108dec==='')return DEFAULT_CONFIG_VALUES[_0x55c60e(0x1b8)];if(!RUNTIME_ENV_VALUES['includes'](_0x108dec))throw CliErrors[_0x55c60e(0x1b3)](_0x55c60e(0x1a0)+_0x108dec+_0x55c60e(0x17b)+RUNTIME_ENV_VALUES[_0x55c60e(0x1ab)](',\x20'));return _0x108dec;}
@@ -1 +1 @@
1
- const a32_0x58e34f=a32_0x1389;(function(_0x50c582,_0x1833c8){const _0x40d281=a32_0x1389,_0x2fa3be=_0x50c582();while(!![]){try{const _0x1d2b97=-parseInt(_0x40d281(0xe8))/0x1*(-parseInt(_0x40d281(0xc9))/0x2)+parseInt(_0x40d281(0xab))/0x3*(-parseInt(_0x40d281(0xcd))/0x4)+parseInt(_0x40d281(0xa6))/0x5*(parseInt(_0x40d281(0xad))/0x6)+-parseInt(_0x40d281(0xdc))/0x7*(-parseInt(_0x40d281(0xd8))/0x8)+parseInt(_0x40d281(0xa9))/0x9*(parseInt(_0x40d281(0xe5))/0xa)+-parseInt(_0x40d281(0xb2))/0xb+-parseInt(_0x40d281(0xbc))/0xc*(parseInt(_0x40d281(0xd3))/0xd);if(_0x1d2b97===_0x1833c8)break;else _0x2fa3be['push'](_0x2fa3be['shift']());}catch(_0x1a78ae){_0x2fa3be['push'](_0x2fa3be['shift']());}}}(a32_0x2802,0x9ffdd));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a32_0x1389(_0x4b63b0,_0x5efcaf){_0x4b63b0=_0x4b63b0-0xa3;const _0x280260=a32_0x2802();let _0x1389e0=_0x280260[_0x4b63b0];return _0x1389e0;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a32_0x2802(){const _0x570f93=['Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','flag','userId','bool','list','根据本地文件更新个人知识库条目','appCode','33144PDJyDq','Created\x20KB\x20entry\x20','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','scope','Updated\x20KB\x20entry\x20','根据本地文件创建个人知识库条目','number','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','body','updateTime','version','File\x20is\x20not\x20a\x20regular\x20file:\x20','10454XfopOp','isFinite','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','string','10852YoNhlu','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','/update','POST','content','Personal\x20knowledge-base\x20entry\x20title','962VyQSAC','Personal\x20knowledge-base\x20entry\x20ID','write','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','validation','2488wQxmVd','description','read','query','25655NnsdYY','Override\x20the\x20existing\x20entry\x20title','title','create','File\x20path\x20is\x20required.','ragStatus','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','docId','--topk\x20must\x20be\x20a\x20positive\x20number.','46370wDMBgR','utf8','/client/knowledge-base/personal/create','241xnmtja','length','search','num','942020WOrEzP','trim','metadata','693YGMgHd','build','1347LBdQiH','isFile','12BOXAfI','file','createTime','str','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','11610819UVTaQs','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','topk'];a32_0x2802=function(){return _0x570f93;};return a32_0x2802();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x58e34f(0xde),'type':a32_0x58e34f(0xcc),'required':!![],'description':a32_0x58e34f(0xd2)},FILE_FLAG={'name':a32_0x58e34f(0xae),'type':'string','required':!![],'description':a32_0x58e34f(0xb3)},QUERY_FLAG={'name':a32_0x58e34f(0xdb),'type':'string','required':!![],'description':a32_0x58e34f(0xcb)},TOPK_FLAG={'name':a32_0x58e34f(0xb4),'type':a32_0x58e34f(0xc2),'description':a32_0x58e34f(0xb1)};function readKnowledgeFile(_0x1bc474){const _0x55981b=a32_0x58e34f;if(!_0x1bc474)throw CliErrors[_0x55981b(0xd7)](_0x55981b(0xe0));if(!existsSync(_0x1bc474))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x1bc474);if(!statSync(_0x1bc474)[_0x55981b(0xac)]())throw CliErrors[_0x55981b(0xd7)](_0x55981b(0xc8)+_0x1bc474);return readFileSync(_0x1bc474,_0x55981b(0xe6));}function summarizePersonalItem(_0x40f5a3){const _0x19d23e=a32_0x58e34f;return{'id':_0x40f5a3['id'],'title':_0x40f5a3[_0x19d23e(0xde)],'version':_0x40f5a3[_0x19d23e(0xc7)],'ragStatus':_0x40f5a3['ragStatus'],'ragErrorMessage':_0x40f5a3['ragErrorMessage'],'updateTime':_0x40f5a3[_0x19d23e(0xc6)]};}function detailPersonalItem(_0x1d11af){const _0xb87c28=a32_0x58e34f;return{'id':_0x1d11af['id'],'appCode':_0x1d11af[_0xb87c28(0xbb)],'scope':_0x1d11af[_0xb87c28(0xbf)],'userId':_0x1d11af[_0xb87c28(0xb7)],'title':_0x1d11af['title'],'content':_0x1d11af[_0xb87c28(0xd1)]??'','version':_0x1d11af[_0xb87c28(0xc7)],'ragStatus':_0x1d11af[_0xb87c28(0xe1)],'ragErrorMessage':_0x1d11af['ragErrorMessage'],'createTime':_0x1d11af[_0xb87c28(0xaf)],'updateTime':_0x1d11af['updateTime']};}function summarizeSearchHit(_0x523c02){const _0x2e42b3=a32_0x58e34f;return{'scope':_0x523c02[_0x2e42b3(0xbf)],'title':_0x523c02[_0x2e42b3(0xde)],'docId':_0x523c02[_0x2e42b3(0xe3)],'score':_0x523c02['score'],'weightedScore':_0x523c02['weightedScore'],'content':_0x523c02['content'],'metadata':_0x523c02[_0x2e42b3(0xa8)]};}function readTopK(_0x1b6a89){const _0x104f30=a32_0x58e34f,_0x5b5156=_0x1b6a89[_0x104f30(0xb6)](_0x104f30(0xb4));if(_0x5b5156===undefined||_0x5b5156===null||_0x5b5156==='')return undefined;const _0x28d4e3=_0x1b6a89[_0x104f30(0xa5)](_0x104f30(0xb4));if(!Number[_0x104f30(0xca)](_0x28d4e3)||_0x28d4e3<0x1)throw CliErrors[_0x104f30(0xd7)](_0x104f30(0xe4));return _0x28d4e3;}const kbList={'service':'kb','command':a32_0x58e34f(0xb9),'description':a32_0x58e34f(0xc3),'risk':a32_0x58e34f(0xda),'flags':[VERBOSE_FLAG],async 'execute'(_0x2307c6){const _0x5993c3=a32_0x58e34f,_0x5ef447=await listPersonalKnowledgeBaseItems(_0x2307c6[_0x5993c3(0xbb)]);if(_0x2307c6[_0x5993c3(0xb8)]('verbose'))return{'ok':!![],'data':{'total':_0x5ef447[_0x5993c3(0xa3)],'items':_0x5ef447}};return{'ok':!![],'data':{'total':_0x5ef447['length'],'items':_0x5ef447['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x58e34f(0xe2),'risk':a32_0x58e34f(0xda),'flags':[{...ID_FLAG,'description':a32_0x58e34f(0xd4)}],async 'execute'(_0x4d7615){const _0x39ca16=a32_0x58e34f,_0x58880d=await getPersonalKnowledgeBaseItem(_0x4d7615[_0x39ca16(0xa5)]('id'),_0x4d7615['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x58880d)};}},kbCreate={'service':'kb','command':a32_0x58e34f(0xdf),'description':a32_0x58e34f(0xc1),'risk':a32_0x58e34f(0xd5),'confirmationDescription':a32_0x58e34f(0xbe),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x339098){const _0x3795d6=a32_0x58e34f,_0x2c4d33=_0x339098['str'](_0x3795d6(0xde)),_0x50aebd=readKnowledgeFile(_0x339098[_0x3795d6(0xb0)](_0x3795d6(0xae))),_0x4e4f40=await createPersonalKnowledgeBaseItem(_0x339098[_0x3795d6(0xbb)],{'title':_0x2c4d33,'content':_0x50aebd});return{'ok':!![],'data':summarizePersonalItem(_0x4e4f40),'message':_0x3795d6(0xbd)+_0x4e4f40['id']+'\x20('+_0x4e4f40[_0x3795d6(0xde)]+')'};},async 'dryRun'(_0x500b6c){const _0xec9569=a32_0x58e34f,_0x344255=_0x500b6c[_0xec9569(0xb0)](_0xec9569(0xde)),_0x5d797a=readKnowledgeFile(_0x500b6c['str'](_0xec9569(0xae)));return dryRun(_0xec9569(0xd0),_0xec9569(0xe7))[_0xec9569(0xc5)]({'appCode':_0x500b6c['appCode'],'title':_0x344255,'content':_0x5d797a})['description'](_0xec9569(0xb5)+_0x344255+'\x22')[_0xec9569(0xaa)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x58e34f(0xba),'risk':'write','confirmationDescription':a32_0x58e34f(0xd6),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x58e34f(0xdd)},FILE_FLAG],async 'execute'(_0xe41251){const _0x5d8c0b=a32_0x58e34f,_0xd953de=_0xe41251[_0x5d8c0b(0xa5)]('id'),_0xf0f6b5=readKnowledgeFile(_0xe41251[_0x5d8c0b(0xb0)](_0x5d8c0b(0xae))),_0x3529d4=_0xe41251[_0x5d8c0b(0xb0)]('title')||(await getPersonalKnowledgeBaseItem(_0xd953de,_0xe41251[_0x5d8c0b(0xbb)]))[_0x5d8c0b(0xde)],_0x196861=await updatePersonalKnowledgeBaseItem(_0xd953de,_0xe41251[_0x5d8c0b(0xbb)],{'title':_0x3529d4,'content':_0xf0f6b5});return{'ok':!![],'data':summarizePersonalItem(_0x196861),'message':_0x5d8c0b(0xc0)+_0x196861['id']+'\x20('+_0x196861[_0x5d8c0b(0xde)]+')'};},async 'dryRun'(_0x4e26d8){const _0x510e8c=a32_0x58e34f,_0x5b6bf8=_0x4e26d8['num']('id'),_0x489981=readKnowledgeFile(_0x4e26d8[_0x510e8c(0xb0)](_0x510e8c(0xae))),_0x2aa78b=_0x4e26d8[_0x510e8c(0xb0)](_0x510e8c(0xde))||(await getPersonalKnowledgeBaseItem(_0x5b6bf8,_0x4e26d8[_0x510e8c(0xbb)]))[_0x510e8c(0xde)];return dryRun(_0x510e8c(0xd0),'/client/knowledge-base/personal/'+_0x5b6bf8+_0x510e8c(0xcf))['body']({'appCode':_0x4e26d8[_0x510e8c(0xbb)],'title':_0x2aa78b,'content':_0x489981})[_0x510e8c(0xd9)](_0x510e8c(0xc4)+_0x5b6bf8)[_0x510e8c(0xaa)]();}},kbSearch={'service':'kb','command':a32_0x58e34f(0xa4),'description':a32_0x58e34f(0xce),'risk':a32_0x58e34f(0xda),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x397cba){const _0x4ad7dc=a32_0x58e34f;if(!_0x397cba[_0x4ad7dc(0xb0)]('query')[_0x4ad7dc(0xa7)]())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x397cba);},async 'execute'(_0x43d61a){const _0x4c5399=a32_0x58e34f,_0x2c87ce=_0x43d61a[_0x4c5399(0xb0)](_0x4c5399(0xdb))[_0x4c5399(0xa7)](),_0x5d26f5=readTopK(_0x43d61a),_0x17ec67=await searchKnowledgeBase(_0x43d61a[_0x4c5399(0xbb)],{'query':_0x2c87ce,'topK':_0x5d26f5});return{'ok':!![],'data':{'total':_0x17ec67['length'],'hits':_0x17ec67['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ function a32_0x5997(){const _0x138142=['write','score','/update','query','map','verbose','title','/client/knowledge-base/personal/create','createTime','8203563DvclOT','metadata','2244473tuvXgU','string','read','Personal\x20knowledge-base\x20entry\x20ID','build','713823KLxLje','File\x20path\x20is\x20required.','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','validation','topk','search','1208643QKmNCd','bool','20oOJdaY','create','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','flag','isFinite','POST','content','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','578515mKCBbz','description','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','18yxyBZF','userId','Override\x20the\x20existing\x20entry\x20title','/client/knowledge-base/personal/','weightedScore','num','utf8','appCode','str','updateTime','23520nvWWfC','isFile','4QCbfrN','file','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','--topk\x20must\x20be\x20a\x20positive\x20number.','ragStatus','number','docId','ragErrorMessage','4014796qylvqw','8OYgKuL','version','scope','body','File\x20not\x20found:\x20','detail','length','update','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id'];a32_0x5997=function(){return _0x138142;};return a32_0x5997();}const a32_0x55c939=a32_0x5317;(function(_0x33920f,_0x542c21){const _0x17d342=a32_0x5317,_0x1328a7=_0x33920f();while(!![]){try{const _0x55a557=parseInt(_0x17d342(0x1f7))/0x1+-parseInt(_0x17d342(0x206))/0x2*(parseInt(_0x17d342(0x1ed))/0x3)+-parseInt(_0x17d342(0x20e))/0x4+-parseInt(_0x17d342(0x204))/0x5+-parseInt(_0x17d342(0x1fa))/0x6*(-parseInt(_0x17d342(0x223))/0x7)+-parseInt(_0x17d342(0x20f))/0x8*(-parseInt(_0x17d342(0x221))/0x9)+-parseInt(_0x17d342(0x1ef))/0xa*(parseInt(_0x17d342(0x1e7))/0xb);if(_0x55a557===_0x542c21)break;else _0x1328a7['push'](_0x1328a7['shift']());}catch(_0x44abde){_0x1328a7['push'](_0x1328a7['shift']());}}}(a32_0x5997,0x7c054));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a32_0x5317(_0x21ea04,_0x1ea9af){_0x21ea04=_0x21ea04-0x1e4;const _0x599784=a32_0x5997();let _0x53175a=_0x599784[_0x21ea04];return _0x53175a;}const TITLE_FLAG={'name':a32_0x55c939(0x21e),'type':a32_0x55c939(0x224),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x55c939(0x207),'type':'string','required':!![],'description':a32_0x55c939(0x1f9)},QUERY_FLAG={'name':a32_0x55c939(0x21b),'type':a32_0x55c939(0x224),'required':!![],'description':a32_0x55c939(0x1f6)},TOPK_FLAG={'name':a32_0x55c939(0x1eb),'type':a32_0x55c939(0x20b),'description':a32_0x55c939(0x208)};function readKnowledgeFile(_0x449259){const _0x265164=a32_0x55c939;if(!_0x449259)throw CliErrors['validation'](_0x265164(0x1e8));if(!existsSync(_0x449259))throw CliErrors['validation'](_0x265164(0x213)+_0x449259);if(!statSync(_0x449259)[_0x265164(0x205)]())throw CliErrors[_0x265164(0x1ea)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x449259);return readFileSync(_0x449259,_0x265164(0x200));}function summarizePersonalItem(_0x2f0ad3){const _0x51ed3b=a32_0x55c939;return{'id':_0x2f0ad3['id'],'title':_0x2f0ad3[_0x51ed3b(0x21e)],'version':_0x2f0ad3['version'],'ragStatus':_0x2f0ad3['ragStatus'],'ragErrorMessage':_0x2f0ad3['ragErrorMessage'],'updateTime':_0x2f0ad3[_0x51ed3b(0x203)]};}function detailPersonalItem(_0x24d278){const _0x1f8257=a32_0x55c939;return{'id':_0x24d278['id'],'appCode':_0x24d278['appCode'],'scope':_0x24d278[_0x1f8257(0x211)],'userId':_0x24d278[_0x1f8257(0x1fb)],'title':_0x24d278['title'],'content':_0x24d278[_0x1f8257(0x1f5)]??'','version':_0x24d278[_0x1f8257(0x210)],'ragStatus':_0x24d278[_0x1f8257(0x20a)],'ragErrorMessage':_0x24d278[_0x1f8257(0x20d)],'createTime':_0x24d278[_0x1f8257(0x220)],'updateTime':_0x24d278['updateTime']};}function summarizeSearchHit(_0x1c3a9b){const _0x393bc7=a32_0x55c939;return{'scope':_0x1c3a9b[_0x393bc7(0x211)],'title':_0x1c3a9b['title'],'docId':_0x1c3a9b[_0x393bc7(0x20c)],'score':_0x1c3a9b[_0x393bc7(0x219)],'weightedScore':_0x1c3a9b[_0x393bc7(0x1fe)],'content':_0x1c3a9b[_0x393bc7(0x1f5)],'metadata':_0x1c3a9b[_0x393bc7(0x222)]};}function readTopK(_0x3090d2){const _0x21e0d9=a32_0x55c939,_0x1e7a2d=_0x3090d2[_0x21e0d9(0x1f2)](_0x21e0d9(0x1eb));if(_0x1e7a2d===undefined||_0x1e7a2d===null||_0x1e7a2d==='')return undefined;const _0x325858=_0x3090d2[_0x21e0d9(0x1ff)]('topk');if(!Number[_0x21e0d9(0x1f3)](_0x325858)||_0x325858<0x1)throw CliErrors[_0x21e0d9(0x1ea)](_0x21e0d9(0x209));return _0x325858;}const kbList={'service':'kb','command':'list','description':a32_0x55c939(0x1f1),'risk':a32_0x55c939(0x1e4),'flags':[VERBOSE_FLAG],async 'execute'(_0x44109b){const _0x27748c=a32_0x55c939,_0x230350=await listPersonalKnowledgeBaseItems(_0x44109b[_0x27748c(0x201)]);if(_0x44109b[_0x27748c(0x1ee)](_0x27748c(0x21d)))return{'ok':!![],'data':{'total':_0x230350['length'],'items':_0x230350}};return{'ok':!![],'data':{'total':_0x230350['length'],'items':_0x230350[_0x27748c(0x21c)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x55c939(0x214),'description':a32_0x55c939(0x217),'risk':'read','flags':[{...ID_FLAG,'description':a32_0x55c939(0x1e5)}],async 'execute'(_0x3d4961){const _0x206904=a32_0x55c939,_0x4a85f7=await getPersonalKnowledgeBaseItem(_0x3d4961[_0x206904(0x1ff)]('id'),_0x3d4961[_0x206904(0x201)]);return{'ok':!![],'data':detailPersonalItem(_0x4a85f7)};}},kbCreate={'service':'kb','command':a32_0x55c939(0x1f0),'description':'根据本地文件创建个人知识库条目','risk':a32_0x55c939(0x218),'confirmationDescription':'把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x272f62){const _0x1399fc=a32_0x55c939,_0xaea9c8=_0x272f62['str'](_0x1399fc(0x21e)),_0x482d9f=readKnowledgeFile(_0x272f62[_0x1399fc(0x202)]('file')),_0x6bdedd=await createPersonalKnowledgeBaseItem(_0x272f62[_0x1399fc(0x201)],{'title':_0xaea9c8,'content':_0x482d9f});return{'ok':!![],'data':summarizePersonalItem(_0x6bdedd),'message':'Created\x20KB\x20entry\x20'+_0x6bdedd['id']+'\x20('+_0x6bdedd[_0x1399fc(0x21e)]+')'};},async 'dryRun'(_0x3ee94f){const _0x43f1e8=a32_0x55c939,_0x4a0fc8=_0x3ee94f[_0x43f1e8(0x202)]('title'),_0x2e1495=readKnowledgeFile(_0x3ee94f['str'](_0x43f1e8(0x207)));return dryRun(_0x43f1e8(0x1f4),_0x43f1e8(0x21f))[_0x43f1e8(0x212)]({'appCode':_0x3ee94f['appCode'],'title':_0x4a0fc8,'content':_0x2e1495})[_0x43f1e8(0x1f8)](_0x43f1e8(0x1e9)+_0x4a0fc8+'\x22')['build']();}},kbUpdate={'service':'kb','command':a32_0x55c939(0x216),'description':'根据本地文件更新个人知识库条目','risk':a32_0x55c939(0x218),'confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x55c939(0x1fc)},FILE_FLAG],async 'execute'(_0x249733){const _0x393fe5=a32_0x55c939,_0x407824=_0x249733[_0x393fe5(0x1ff)]('id'),_0x326051=readKnowledgeFile(_0x249733['str']('file')),_0x2159c6=_0x249733[_0x393fe5(0x202)](_0x393fe5(0x21e))||(await getPersonalKnowledgeBaseItem(_0x407824,_0x249733[_0x393fe5(0x201)]))[_0x393fe5(0x21e)],_0x1bc721=await updatePersonalKnowledgeBaseItem(_0x407824,_0x249733['appCode'],{'title':_0x2159c6,'content':_0x326051});return{'ok':!![],'data':summarizePersonalItem(_0x1bc721),'message':'Updated\x20KB\x20entry\x20'+_0x1bc721['id']+'\x20('+_0x1bc721['title']+')'};},async 'dryRun'(_0x705d22){const _0x5218fd=a32_0x55c939,_0x4bb0d3=_0x705d22[_0x5218fd(0x1ff)]('id'),_0x195582=readKnowledgeFile(_0x705d22[_0x5218fd(0x202)](_0x5218fd(0x207))),_0xa64a5=_0x705d22[_0x5218fd(0x202)](_0x5218fd(0x21e))||(await getPersonalKnowledgeBaseItem(_0x4bb0d3,_0x705d22['appCode']))['title'];return dryRun('POST',_0x5218fd(0x1fd)+_0x4bb0d3+_0x5218fd(0x21a))[_0x5218fd(0x212)]({'appCode':_0x705d22[_0x5218fd(0x201)],'title':_0xa64a5,'content':_0x195582})[_0x5218fd(0x1f8)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x4bb0d3)[_0x5218fd(0x1e6)]();}},kbSearch={'service':'kb','command':a32_0x55c939(0x1ec),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a32_0x55c939(0x1e4),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x19c9cb){const _0x331790=a32_0x55c939;if(!_0x19c9cb[_0x331790(0x202)](_0x331790(0x21b))['trim']())throw CliErrors[_0x331790(0x1ea)]('Search\x20query\x20is\x20required.');readTopK(_0x19c9cb);},async 'execute'(_0x41b16f){const _0x14ad97=a32_0x55c939,_0x7a39fa=_0x41b16f[_0x14ad97(0x202)](_0x14ad97(0x21b))['trim'](),_0x537ea8=readTopK(_0x41b16f),_0x2ff74d=await searchKnowledgeBase(_0x41b16f[_0x14ad97(0x201)],{'query':_0x7a39fa,'topK':_0x537ea8});return{'ok':!![],'data':{'total':_0x2ff74d[_0x14ad97(0x215)],'hits':_0x2ff74d[_0x14ad97(0x21c)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x12abe9=a33_0x285c;(function(_0xf8bcde,_0x23ee76){const _0x3fcd8e=a33_0x285c,_0x56f515=_0xf8bcde();while(!![]){try{const _0x7f47ee=-parseInt(_0x3fcd8e(0x11b))/0x1+-parseInt(_0x3fcd8e(0x120))/0x2+-parseInt(_0x3fcd8e(0x11c))/0x3*(parseInt(_0x3fcd8e(0x126))/0x4)+parseInt(_0x3fcd8e(0x124))/0x5*(-parseInt(_0x3fcd8e(0x119))/0x6)+-parseInt(_0x3fcd8e(0x12a))/0x7*(-parseInt(_0x3fcd8e(0x12f))/0x8)+parseInt(_0x3fcd8e(0x127))/0x9+parseInt(_0x3fcd8e(0x123))/0xa*(parseInt(_0x3fcd8e(0x13a))/0xb);if(_0x7f47ee===_0x23ee76)break;else _0x56f515['push'](_0x56f515['shift']());}catch(_0x5e8559){_0x56f515['push'](_0x56f515['shift']());}}}(a33_0x15cc,0xc0816));import{logger}from'../../utils/logger.js';function a33_0x285c(_0x2eaaa2,_0x4ce0c1){_0x2eaaa2=_0x2eaaa2-0x118;const _0x15cccd=a33_0x15cc();let _0x285c40=_0x15cccd[_0x2eaaa2];return _0x285c40;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x15cc(){const _0x15fef2=['\x20\x20\x20Time:\x20','20EbUWqV','25liBpun','readLogs','1468DWjmCK','11882367Wacirz','warn','en-US','427YeTlaK','error','level','clear','logs','121896rMyzPu','清除命令历史日志','将永久清空当前工作目录下的\x20Lovrabet\x20CLI\x20本地诊断日志;不会影响平台业务数据。','length','View\x20command\x20history\x20logs','write','duration','success','stringify','keys','command','5704303tLQxXZ','message','show','*\x20Logs\x20cleared','198162qeUGih','read','86762NHMheb','5487jOrEgL','*\x20No\x20logs\x20found','timestamp','details','3150448cZBmQn','log'];a33_0x15cc=function(){return _0x15fef2;};return a33_0x15cc();}function printLogs(_0x45c1cd){const _0x4fdd3d=a33_0x285c;if(_0x45c1cd[_0x4fdd3d(0x132)]===0x0){console[_0x4fdd3d(0x121)](_0x4fdd3d(0x11d));return;}console[_0x4fdd3d(0x121)]('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x45c1cd['forEach']((_0xff88db,_0x3b9e0a)=>{const _0x3b45c9=_0x4fdd3d,_0x164b12=new Date(_0xff88db[_0x3b45c9(0x11e)])['toLocaleString'](_0x3b45c9(0x129)),_0x3661a8=_0xff88db[_0x3b45c9(0x12c)]===_0x3b45c9(0x136)?'√':_0xff88db['level']===_0x3b45c9(0x12b)?'×':_0xff88db[_0x3b45c9(0x12c)]===_0x3b45c9(0x128)?'!':'i';console[_0x3b45c9(0x121)](_0x3b9e0a+0x1+'.\x20'+_0x3661a8+'\x20['+_0xff88db[_0x3b45c9(0x139)]+']\x20'+_0xff88db[_0x3b45c9(0x13b)]),console['log'](_0x3b45c9(0x122)+_0x164b12),_0xff88db[_0x3b45c9(0x135)]&&console['log']('\x20\x20\x20Duration:\x20'+_0xff88db[_0x3b45c9(0x135)]+'ms'),_0xff88db['details']&&Object[_0x3b45c9(0x138)](_0xff88db[_0x3b45c9(0x11f)])[_0x3b45c9(0x132)]>0x0&&console[_0x3b45c9(0x121)]('\x20\x20\x20Details:\x20'+JSON[_0x3b45c9(0x137)](_0xff88db['details'],null,0x2)),console[_0x3b45c9(0x121)]('');});}export const logsDefinitions=[{'service':'logs','command':a33_0x12abe9(0x13c),'description':a33_0x12abe9(0x133),'risk':a33_0x12abe9(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x347d78){const _0x10819=a33_0x12abe9;return printLogs(logger[_0x10819(0x125)]()),{'ok':!![]};}},{'service':a33_0x12abe9(0x12e),'command':a33_0x12abe9(0x12d),'description':a33_0x12abe9(0x130),'risk':a33_0x12abe9(0x134),'confirmationDescription':a33_0x12abe9(0x131),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xe00414){const _0x5be72c=a33_0x12abe9;return logger['clearLogs'](),console[_0x5be72c(0x121)](_0x5be72c(0x118)),{'ok':!![]};}}];
1
+ const a33_0x262343=a33_0x52f4;(function(_0x3b3c08,_0x2a0793){const _0xf27cef=a33_0x52f4,_0x16181d=_0x3b3c08();while(!![]){try{const _0x1458b6=parseInt(_0xf27cef(0x132))/0x1*(-parseInt(_0xf27cef(0x12c))/0x2)+-parseInt(_0xf27cef(0x12f))/0x3*(parseInt(_0xf27cef(0x131))/0x4)+parseInt(_0xf27cef(0x12e))/0x5+-parseInt(_0xf27cef(0x149))/0x6*(parseInt(_0xf27cef(0x14a))/0x7)+-parseInt(_0xf27cef(0x12d))/0x8*(-parseInt(_0xf27cef(0x13b))/0x9)+-parseInt(_0xf27cef(0x140))/0xa+parseInt(_0xf27cef(0x13f))/0xb;if(_0x1458b6===_0x2a0793)break;else _0x16181d['push'](_0x16181d['shift']());}catch(_0x396e47){_0x16181d['push'](_0x16181d['shift']());}}}(a33_0x2b4a,0x97dea));function a33_0x2b4a(){const _0x596037=['349395faWZZd','695364UekIyF','read','4cjtxFk','1ylnLpg','show','command','stringify','logs','View\x20command\x20history\x20logs','readLogs','success','write','118521QjlTJB','\x20logs:\x0a','clearLogs','error','20413657FEpZQw','452920QjdjqG','toLocaleString','log','details','\x20\x20\x20Duration:\x20','en-US','level','message','clear','156HhjoQE','303401opkUOP','清除命令历史日志','duration','\x20\x20\x20Details:\x20','length','warn','keys','1563866PtJQTy','536lfUxQE'];a33_0x2b4a=function(){return _0x596037;};return a33_0x2b4a();}function a33_0x52f4(_0x407e0b,_0x3a27f0){_0x407e0b=_0x407e0b-0x12c;const _0x2b4a03=a33_0x2b4a();let _0x52f4e0=_0x2b4a03[_0x407e0b];return _0x52f4e0;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x1454ec){const _0x120348=a33_0x52f4;if(_0x1454ec['length']===0x0){console[_0x120348(0x142)]('*\x20No\x20logs\x20found');return;}console[_0x120348(0x142)]('*\x20'+CLI_DISPLAY_NAME+_0x120348(0x13c)),_0x1454ec['forEach']((_0x5801b7,_0x10be82)=>{const _0x32130c=_0x120348,_0x11c763=new Date(_0x5801b7['timestamp'])[_0x32130c(0x141)](_0x32130c(0x145)),_0x135df2=_0x5801b7['level']===_0x32130c(0x139)?'√':_0x5801b7[_0x32130c(0x146)]===_0x32130c(0x13e)?'×':_0x5801b7[_0x32130c(0x146)]===_0x32130c(0x14f)?'!':'i';console[_0x32130c(0x142)](_0x10be82+0x1+'.\x20'+_0x135df2+'\x20['+_0x5801b7[_0x32130c(0x134)]+']\x20'+_0x5801b7[_0x32130c(0x147)]),console[_0x32130c(0x142)]('\x20\x20\x20Time:\x20'+_0x11c763),_0x5801b7[_0x32130c(0x14c)]&&console[_0x32130c(0x142)](_0x32130c(0x144)+_0x5801b7['duration']+'ms'),_0x5801b7[_0x32130c(0x143)]&&Object[_0x32130c(0x150)](_0x5801b7[_0x32130c(0x143)])[_0x32130c(0x14e)]>0x0&&console[_0x32130c(0x142)](_0x32130c(0x14d)+JSON[_0x32130c(0x135)](_0x5801b7[_0x32130c(0x143)],null,0x2)),console[_0x32130c(0x142)]('');});}export const logsDefinitions=[{'service':a33_0x262343(0x136),'command':a33_0x262343(0x133),'description':a33_0x262343(0x137),'risk':a33_0x262343(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x20af2c){const _0x5b407b=a33_0x262343;return printLogs(logger[_0x5b407b(0x138)]()),{'ok':!![]};}},{'service':'logs','command':a33_0x262343(0x148),'description':a33_0x262343(0x14b),'risk':a33_0x262343(0x13a),'confirmationDescription':'将永久清空当前工作目录下的\x20Lovrabet\x20CLI\x20本地诊断日志;不会影响平台业务数据。','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x23caf0){const _0x5d53f7=a33_0x262343;return logger[_0x5d53f7(0x13d)](),console[_0x5d53f7(0x142)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x44a08e=a34_0x1828;(function(_0x240207,_0x305d95){const _0x5cfcbe=a34_0x1828,_0x530774=_0x240207();while(!![]){try{const _0x161d0a=parseInt(_0x5cfcbe(0x147))/0x1+-parseInt(_0x5cfcbe(0x162))/0x2+parseInt(_0x5cfcbe(0x15d))/0x3*(-parseInt(_0x5cfcbe(0x155))/0x4)+-parseInt(_0x5cfcbe(0x157))/0x5+parseInt(_0x5cfcbe(0x148))/0x6*(-parseInt(_0x5cfcbe(0x144))/0x7)+-parseInt(_0x5cfcbe(0x161))/0x8+parseInt(_0x5cfcbe(0x167))/0x9*(parseInt(_0x5cfcbe(0x166))/0xa);if(_0x161d0a===_0x305d95)break;else _0x530774['push'](_0x530774['shift']());}catch(_0xd7fe6e){_0x530774['push'](_0x530774['shift']());}}}(a34_0x31b7,0x56534));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';function a34_0x31b7(){const _0x3dfefe=['3691SHHmPM','40704dRkWgV','\x20OCR\x20from\x20URL','/client/ocr','trim','recognize','appCode','invoice','form','string','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-file','File\x20URL\x20response\x20missing\x20fileUrl.','4gxvIVY','join','2182575yKgWVI','/client/uploadFile','idCard','<filePath\x20returned\x20by\x20/client/uploadFile>','General','File\x20upload\x20response\x20missing\x20filePath.','329301HmcNBK','general','Invoice','idcard','4407896ZQmTfu','373714NoqXaS','description','ocr','image-url','17968390ZOprRE','9yCoubM','path','/client/queryFileUrl','read','Table','validation','build','filter','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','Publicly\x20accessible\x20image\x20or\x20file\x20URL','filePath','str','count','length','apiError','POST','fileUrl','.\x20Supported\x20scenes:\x20','fileName','imageUrl','168toKhGa','body','scene'];a34_0x31b7=function(){return _0x3dfefe;};return a34_0x31b7();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a34_0x1828(_0x15d2d9,_0x3dc2c3){_0x15d2d9=_0x15d2d9-0x136;const _0x31b723=a34_0x31b7();let _0x182877=_0x31b723[_0x15d2d9];return _0x182877;}const SUPPORTED_SCENES=[a34_0x44a08e(0x14e),a34_0x44a08e(0x15e),'form',a34_0x44a08e(0x159)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x44a08e(0x15f),'general':a34_0x44a08e(0x15b),'form':a34_0x44a08e(0x16b),'idCard':'IdCard'},SCENE_FLAG={'name':a34_0x44a08e(0x146),'type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x44a08e(0x151)},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x44a08e(0x150),'description':a34_0x44a08e(0x152)},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x44a08e(0x150),'description':a34_0x44a08e(0x139)};function normalizeScene(_0x5b2840){const _0x5d12a3=a34_0x44a08e,_0x3d81d7=_0x5b2840[_0x5d12a3(0x14b)]()['toLowerCase']();if(_0x3d81d7===_0x5d12a3(0x160))return _0x5d12a3(0x159);if(_0x3d81d7===_0x5d12a3(0x14e)||_0x3d81d7===_0x5d12a3(0x15e)||_0x3d81d7===_0x5d12a3(0x14f))return _0x3d81d7;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0x5b2840+_0x5d12a3(0x141)+SUPPORTED_SCENES[_0x5d12a3(0x156)](',\x20'));}function selectedInputs(_0x256d53){const _0x412cf9=a34_0x44a08e,_0x37d2b5=_0x256d53[_0x412cf9(0x13b)]('image-file')[_0x412cf9(0x14b)](),_0x3bf2e3=_0x256d53['str'](_0x412cf9(0x165))[_0x412cf9(0x14b)]();return{'imageFile':_0x37d2b5,'imageUrl':_0x3bf2e3,'count':[_0x37d2b5,_0x3bf2e3][_0x412cf9(0x137)](Boolean)[_0x412cf9(0x13d)]};}function validateInputSelection(_0x99f88a){const _0x130e99=a34_0x44a08e,_0x763da7=selectedInputs(_0x99f88a);if(_0x763da7[_0x130e99(0x13c)]!==0x1)throw CliErrors[_0x130e99(0x16c)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x763da7;}function withScene(_0x14c39b,_0x5e5600,_0x394d65){const _0x2f6b22=a34_0x44a08e;return{..._0x14c39b,'scene':_0x5e5600,..._0x394d65?{'sourceFile':{'fileName':_0x394d65[_0x2f6b22(0x142)],'filePath':_0x394d65[_0x2f6b22(0x13a)]}}:{}};}const ocrRecognize={'service':a34_0x44a08e(0x164),'command':a34_0x44a08e(0x14c),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0x44a08e(0x16a),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x1d6ac2){const _0x3ef765=a34_0x44a08e,_0x589bf8=normalizeScene(_0x1d6ac2[_0x3ef765(0x13b)]('scene')),_0x2aab8e=SCENE_TO_LEGACY_TYPE[_0x589bf8],_0x1de2d9=validateInputSelection(_0x1d6ac2);if(_0x1de2d9[_0x3ef765(0x143)])return dryRun(_0x3ef765(0x13f),_0x3ef765(0x14a))[_0x3ef765(0x145)]({'appCode':_0x1d6ac2[_0x3ef765(0x14d)],'url':_0x1de2d9[_0x3ef765(0x143)],'type':_0x2aab8e})[_0x3ef765(0x163)]('Preview:\x20recognize\x20'+_0x589bf8+_0x3ef765(0x149))[_0x3ef765(0x136)]();const _0x2f1da7=requireRuntimeUploadFile(_0x1de2d9['imageFile'],'image-file');return dryRun(_0x3ef765(0x13f),_0x3ef765(0x158))[_0x3ef765(0x145)]({'steps':[{'method':_0x3ef765(0x13f),'url':_0x3ef765(0x158),'body':{'appCode':_0x1d6ac2[_0x3ef765(0x14d)],'multipart':{'file':_0x2f1da7}}},{'method':_0x3ef765(0x13f),'url':_0x3ef765(0x169),'body':{'filePath':_0x3ef765(0x15a),'downloadFlag':![]}},{'method':_0x3ef765(0x13f),'url':_0x3ef765(0x14a),'body':{'appCode':_0x1d6ac2['appCode'],'url':_0x3ef765(0x138),'type':_0x2aab8e}}]})[_0x3ef765(0x163)]('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x589bf8+'\x20OCR')[_0x3ef765(0x136)]();},async 'execute'(_0x52ebb2){const _0x255185=a34_0x44a08e,_0x14763a=normalizeScene(_0x52ebb2[_0x255185(0x13b)]('scene')),_0x20a98d=SCENE_TO_LEGACY_TYPE[_0x14763a],_0x194e66=validateInputSelection(_0x52ebb2);if(_0x194e66[_0x255185(0x143)]){const _0x54361d=await recognizeRuntimeOcr(_0x52ebb2[_0x255185(0x14d)],{'url':_0x194e66[_0x255185(0x143)],'type':_0x20a98d});return{'ok':!![],'data':withScene(_0x54361d,_0x14763a)};}const _0x4946d5=requireRuntimeUploadFile(_0x194e66['imageFile'],_0x255185(0x153)),_0x274dc6=await uploadRuntimeFile(_0x52ebb2[_0x255185(0x14d)],_0x4946d5[_0x255185(0x168)]);if(!_0x274dc6[_0x255185(0x13a)])throw CliErrors[_0x255185(0x13e)](_0x255185(0x15c));const _0x95eb6f=await queryRuntimeFileUrl(_0x274dc6[_0x255185(0x13a)],{'download':![]});if(!_0x95eb6f[_0x255185(0x140)])throw CliErrors['apiError'](_0x255185(0x154));const _0x587c0a=await recognizeRuntimeOcr(_0x52ebb2[_0x255185(0x14d)],{'url':_0x95eb6f[_0x255185(0x140)],'type':_0x20a98d});return{'ok':!![],'data':withScene(_0x587c0a,_0x14763a,_0x274dc6)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0xd55abd=a34_0x3f36;(function(_0x23bad7,_0x52ad89){const _0x28ce57=a34_0x3f36,_0x4e757b=_0x23bad7();while(!![]){try{const _0x599855=-parseInt(_0x28ce57(0x171))/0x1+-parseInt(_0x28ce57(0x163))/0x2+parseInt(_0x28ce57(0x18e))/0x3+-parseInt(_0x28ce57(0x186))/0x4*(parseInt(_0x28ce57(0x173))/0x5)+-parseInt(_0x28ce57(0x178))/0x6*(-parseInt(_0x28ce57(0x17e))/0x7)+-parseInt(_0x28ce57(0x17c))/0x8+parseInt(_0x28ce57(0x16f))/0x9*(parseInt(_0x28ce57(0x167))/0xa);if(_0x599855===_0x52ad89)break;else _0x4e757b['push'](_0x4e757b['shift']());}catch(_0xea6c7c){_0x4e757b['push'](_0x4e757b['shift']());}}}(a34_0xcc9d,0x3a749));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0xd55abd(0x185),'general',a34_0xd55abd(0x161),a34_0xd55abd(0x180)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0xd55abd(0x188),'general':'General','form':a34_0xd55abd(0x182),'idCard':a34_0xd55abd(0x16a)},SCENE_FLAG={'name':a34_0xd55abd(0x18f),'type':a34_0xd55abd(0x169),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a34_0xd55abd(0x179),'type':a34_0xd55abd(0x169),'description':a34_0xd55abd(0x165)},IMAGE_URL_FLAG={'name':a34_0xd55abd(0x162),'type':a34_0xd55abd(0x169),'description':a34_0xd55abd(0x15e)};function normalizeScene(_0x1c6612){const _0x3c2016=a34_0xd55abd,_0x2bbae6=_0x1c6612[_0x3c2016(0x170)]()[_0x3c2016(0x184)]();if(_0x2bbae6==='idcard')return _0x3c2016(0x180);if(_0x2bbae6===_0x3c2016(0x185)||_0x2bbae6==='general'||_0x2bbae6===_0x3c2016(0x161))return _0x2bbae6;throw CliErrors['validation'](_0x3c2016(0x174)+_0x1c6612+_0x3c2016(0x181)+SUPPORTED_SCENES[_0x3c2016(0x177)](',\x20'));}function selectedInputs(_0x21bb77){const _0x349f60=a34_0xd55abd,_0x506294=_0x21bb77[_0x349f60(0x16e)]('image-file')[_0x349f60(0x170)](),_0x5d98a5=_0x21bb77[_0x349f60(0x16e)](_0x349f60(0x162))[_0x349f60(0x170)]();return{'imageFile':_0x506294,'imageUrl':_0x5d98a5,'count':[_0x506294,_0x5d98a5][_0x349f60(0x166)](Boolean)[_0x349f60(0x17f)]};}function a34_0x3f36(_0x16cce9,_0x2a8ae9){_0x16cce9=_0x16cce9-0x15d;const _0xcc9d34=a34_0xcc9d();let _0x3f36b1=_0xcc9d34[_0x16cce9];return _0x3f36b1;}function validateInputSelection(_0x2b4b2a){const _0x40397a=a34_0xd55abd,_0x9ede06=selectedInputs(_0x2b4b2a);if(_0x9ede06['count']!==0x1)throw CliErrors[_0x40397a(0x189)]('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x9ede06;}function withScene(_0x3a0e16,_0x6785ab,_0x524cb9){const _0x1ad1c3=a34_0xd55abd;return{..._0x3a0e16,'scene':_0x6785ab,..._0x524cb9?{'sourceFile':{'fileName':_0x524cb9['fileName'],'filePath':_0x524cb9[_0x1ad1c3(0x172)]}}:{}};}function a34_0xcc9d(){const _0x4b6dfc=['148508qZLSuu','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','filter','20GavoUs','description','string','IdCard','POST','imageUrl','apiError','str','1206270EUkOYG','trim','41480Xzlzmp','filePath','59005TBtgDl','Unsupported\x20OCR\x20scene:\x20','path','/client/queryFileUrl','join','6HyGYES','image-file','\x20OCR\x20from\x20URL','read','3183872EAYiSQ','/client/uploadFile','359527gzSBsL','length','idCard','.\x20Supported\x20scenes:\x20','Table','imageFile','toLowerCase','invoice','4PkZsqt','<filePath\x20returned\x20by\x20/client/uploadFile>','Invoice','validation','appCode','build','/client/ocr','ocr','1336593ZxCqrO','scene','fileUrl','recognize','Preview:\x20recognize\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','body','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','form','image-url'];a34_0xcc9d=function(){return _0x4b6dfc;};return a34_0xcc9d();}const ocrRecognize={'service':a34_0xd55abd(0x18d),'command':a34_0xd55abd(0x191),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0xd55abd(0x17b),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xc669b){const _0x515f21=a34_0xd55abd,_0xb5fc6c=normalizeScene(_0xc669b[_0x515f21(0x16e)](_0x515f21(0x18f))),_0x2172c0=SCENE_TO_LEGACY_TYPE[_0xb5fc6c],_0x27a59a=validateInputSelection(_0xc669b);if(_0x27a59a['imageUrl'])return dryRun(_0x515f21(0x16b),_0x515f21(0x18c))[_0x515f21(0x15f)]({'appCode':_0xc669b[_0x515f21(0x18a)],'url':_0x27a59a[_0x515f21(0x16c)],'type':_0x2172c0})[_0x515f21(0x168)](_0x515f21(0x15d)+_0xb5fc6c+_0x515f21(0x17a))[_0x515f21(0x18b)]();const _0x36e3b8=requireRuntimeUploadFile(_0x27a59a[_0x515f21(0x183)],_0x515f21(0x179));return dryRun(_0x515f21(0x16b),_0x515f21(0x17d))[_0x515f21(0x15f)]({'steps':[{'method':_0x515f21(0x16b),'url':_0x515f21(0x17d),'body':{'appCode':_0xc669b[_0x515f21(0x18a)],'multipart':{'file':_0x36e3b8}}},{'method':'POST','url':_0x515f21(0x176),'body':{'filePath':_0x515f21(0x187),'downloadFlag':![]}},{'method':_0x515f21(0x16b),'url':_0x515f21(0x18c),'body':{'appCode':_0xc669b['appCode'],'url':_0x515f21(0x164),'type':_0x2172c0}}]})[_0x515f21(0x168)](_0x515f21(0x160)+_0xb5fc6c+'\x20OCR')['build']();},async 'execute'(_0x8ec4de){const _0x48c354=a34_0xd55abd,_0x2b5c1f=normalizeScene(_0x8ec4de[_0x48c354(0x16e)]('scene')),_0x2c5e94=SCENE_TO_LEGACY_TYPE[_0x2b5c1f],_0x444ac4=validateInputSelection(_0x8ec4de);if(_0x444ac4[_0x48c354(0x16c)]){const _0x13790e=await recognizeRuntimeOcr(_0x8ec4de['appCode'],{'url':_0x444ac4[_0x48c354(0x16c)],'type':_0x2c5e94});return{'ok':!![],'data':withScene(_0x13790e,_0x2b5c1f)};}const _0x1def92=requireRuntimeUploadFile(_0x444ac4[_0x48c354(0x183)],'image-file'),_0x64c96b=await uploadRuntimeFile(_0x8ec4de[_0x48c354(0x18a)],_0x1def92[_0x48c354(0x175)]);if(!_0x64c96b[_0x48c354(0x172)])throw CliErrors[_0x48c354(0x16d)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x3229af=await queryRuntimeFileUrl(_0x64c96b[_0x48c354(0x172)],{'download':![]});if(!_0x3229af[_0x48c354(0x190)])throw CliErrors[_0x48c354(0x16d)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x4dd23b=await recognizeRuntimeOcr(_0x8ec4de[_0x48c354(0x18a)],{'url':_0x3229af[_0x48c354(0x190)],'type':_0x2c5e94});return{'ok':!![],'data':withScene(_0x4dd23b,_0x2b5c1f,_0x64c96b)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x417d19=a35_0x4751;(function(_0x2588dd,_0x5ac132){const _0x51859f=a35_0x4751,_0x54c9f1=_0x2588dd();while(!![]){try{const _0x5e08a5=parseInt(_0x51859f(0xd0))/0x1+parseInt(_0x51859f(0xe5))/0x2+-parseInt(_0x51859f(0xb6))/0x3+-parseInt(_0x51859f(0xc3))/0x4*(parseInt(_0x51859f(0xe8))/0x5)+parseInt(_0x51859f(0xe9))/0x6*(parseInt(_0x51859f(0xd1))/0x7)+-parseInt(_0x51859f(0xb1))/0x8*(parseInt(_0x51859f(0xa4))/0x9)+parseInt(_0x51859f(0xd4))/0xa;if(_0x5e08a5===_0x5ac132)break;else _0x54c9f1['push'](_0x54c9f1['shift']());}catch(_0x42d324){_0x54c9f1['push'](_0x54c9f1['shift']());}}}(a35_0x49bf,0x9dfc2));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x417d19(0xb9),'type':a35_0x417d19(0xa6),'description':a35_0x417d19(0xab)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x417d19(0xa6),'required':!![],'description':a35_0x417d19(0xc1)},DESCRIPTION_FLAG={'name':a35_0x417d19(0xd5),'type':'string','description':'Personal\x20BFF\x20description'},SOURCE_SESSION_FLAG={'name':'source-session-id','type':'string','description':a35_0x417d19(0xdc)};function normalizeFunctionName(_0x385eb5){const _0x1415f6=a35_0x417d19,_0x5cc44c=String(_0x385eb5||'')[_0x1415f6(0xdf)]();if(!_0x5cc44c||!FUNCTION_NAME_PATTERN[_0x1415f6(0xd3)](_0x5cc44c))throw CliErrors[_0x1415f6(0xad)](_0x1415f6(0xcb));return _0x5cc44c;}function readScriptFile(_0x12eb6d){const _0x4914fc=a35_0x417d19;if(!_0x12eb6d)throw CliErrors[_0x4914fc(0xad)](_0x4914fc(0xe6));if(!existsSync(_0x12eb6d))throw CliErrors[_0x4914fc(0xad)](_0x4914fc(0xe3)+_0x12eb6d);if(!statSync(_0x12eb6d)[_0x4914fc(0xce)]())throw CliErrors[_0x4914fc(0xad)](_0x4914fc(0xcf)+_0x12eb6d);const _0x3e1bc2=readFileSync(_0x12eb6d,_0x4914fc(0xe1));if(!_0x3e1bc2[_0x4914fc(0xdf)]())throw CliErrors[_0x4914fc(0xad)](_0x4914fc(0xc4));return _0x3e1bc2;}function optionalTrimmed(_0x36427d){const _0x12e0eb=String(_0x36427d||'')['trim']();return _0x12e0eb||undefined;}function summarizeBff(_0x218590){const _0x4caf67=a35_0x417d19;return{'id':_0x218590['id'],'appCode':_0x218590[_0x4caf67(0xc6)],'functionName':_0x218590[_0x4caf67(0xbf)],'description':_0x218590['description'],'scriptType':_0x218590[_0x4caf67(0xdd)],'version':_0x218590[_0x4caf67(0xc2)],'gmtModified':_0x218590[_0x4caf67(0xa9)],'updateTime':_0x218590[_0x4caf67(0xcd)]};}function a35_0x49bf(){const _0x3b74d7=['utf8','bool','File\x20not\x20found:\x20','body','516786zDShII','File\x20path\x20is\x20required.','Created\x20personal\x20BFF\x20','340nlIIYj','18mOdXCr','flag','detail','根据本地脚本文件创建个人\x20BFF','36RobCdM','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','string','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','sourceSessionId','gmtModified','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','/client/runtime-bff/personal/','validation','config','num','length','1764912iTlKcR','Preview:\x20create\x20personal\x20BFF\x20','/update','params','build','2229144ouwgNS','根据\x20ID\x20更新个人\x20BFF','Preview:\x20update\x20personal\x20BFF\x20','file','name','Executed\x20personal\x20BFF\x20','keys','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','update','functionName','verbose','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','version','29804xaPtgs','Personal\x20BFF\x20script\x20file\x20is\x20blank.','gmtCreate','appCode','Personal\x20BFF\x20script\x20ID','createUserId','scriptContent','high-risk-write','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','read','updateTime','isFile','File\x20is\x20not\x20a\x20regular\x20file:\x20','263534NpGCzw','708491fgBDMk','/client/runtime-bff/personal/create','test','19537120xXYtlW','description','source-session-id','POST','createTime','str','personal-bff','create','Optional\x20source\x20RuntimeAgent\x20session\x20id','scriptType','Show\x20one\x20personal\x20BFF\x20by\x20id','trim','map'];a35_0x49bf=function(){return _0x3b74d7;};return a35_0x49bf();}function a35_0x4751(_0x22f028,_0x45e0ac){_0x22f028=_0x22f028-0xa2;const _0x49bf3b=a35_0x49bf();let _0x47511c=_0x49bf3b[_0x22f028];return _0x47511c;}function detailBff(_0x3c93b5){const _0x3e280f=a35_0x417d19;return{'id':_0x3c93b5['id'],'appCode':_0x3c93b5[_0x3e280f(0xc6)],'functionName':_0x3c93b5[_0x3e280f(0xbf)],'description':_0x3c93b5[_0x3e280f(0xd5)],'scriptType':_0x3c93b5[_0x3e280f(0xdd)],'scriptContent':_0x3c93b5[_0x3e280f(0xc9)]??'','config':_0x3c93b5[_0x3e280f(0xae)],'version':_0x3c93b5[_0x3e280f(0xc2)],'createUserId':_0x3c93b5[_0x3e280f(0xc8)],'gmtCreate':_0x3c93b5[_0x3e280f(0xc5)],'gmtModified':_0x3c93b5[_0x3e280f(0xa9)],'createTime':_0x3c93b5[_0x3e280f(0xd8)],'updateTime':_0x3c93b5[_0x3e280f(0xcd)]};}function buildCreateInput(_0x1265e1){const _0x592d9b=a35_0x417d19;return{'functionName':normalizeFunctionName(_0x1265e1[_0x592d9b(0xd9)]('name')),...optionalTrimmed(_0x1265e1['str'](_0x592d9b(0xd5)))?{'description':optionalTrimmed(_0x1265e1['str'](_0x592d9b(0xd5)))}:{},'scriptContent':readScriptFile(_0x1265e1[_0x592d9b(0xd9)](_0x592d9b(0xb9))),...optionalTrimmed(_0x1265e1[_0x592d9b(0xd9)](_0x592d9b(0xd6)))?{'sourceSessionId':optionalTrimmed(_0x1265e1['str']('source-session-id'))}:{}};}function buildUpdateInput(_0x2f6857){const _0x5a69fc=a35_0x417d19,_0x456f3d={};optionalTrimmed(_0x2f6857[_0x5a69fc(0xd9)](_0x5a69fc(0xba)))&&(_0x456f3d[_0x5a69fc(0xbf)]=normalizeFunctionName(_0x2f6857[_0x5a69fc(0xd9)]('name')));_0x2f6857['flag']('description')!==undefined&&(_0x456f3d[_0x5a69fc(0xd5)]=_0x2f6857[_0x5a69fc(0xd9)](_0x5a69fc(0xd5)));optionalTrimmed(_0x2f6857[_0x5a69fc(0xd9)](_0x5a69fc(0xb9)))&&(_0x456f3d[_0x5a69fc(0xc9)]=readScriptFile(_0x2f6857[_0x5a69fc(0xd9)]('file')));_0x2f6857[_0x5a69fc(0xea)](_0x5a69fc(0xd6))!==undefined&&(_0x456f3d[_0x5a69fc(0xa8)]=_0x2f6857[_0x5a69fc(0xd9)]('source-session-id'));if(Object[_0x5a69fc(0xbc)](_0x456f3d)[_0x5a69fc(0xb0)]===0x0)throw CliErrors[_0x5a69fc(0xad)](_0x5a69fc(0xbd));return _0x456f3d;}function parseExecParams(_0x3d7005){const _0x14c915=a35_0x417d19,_0x28ac8a=parseJsonParams(_0x3d7005)??{};if(Array['isArray'](_0x28ac8a))throw CliErrors[_0x14c915(0xad)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x28ac8a;}const personalBffList={'service':a35_0x417d19(0xda),'command':'list','description':'List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','risk':a35_0x417d19(0xcc),'flags':[VERBOSE_FLAG],async 'execute'(_0x3a8580){const _0x33a567=a35_0x417d19,_0x5d04d8=await listPersonalBffs(_0x3a8580['appCode']);return{'ok':!![],'data':{'total':_0x5d04d8[_0x33a567(0xb0)],'items':_0x3a8580[_0x33a567(0xe2)](_0x33a567(0xc0))?_0x5d04d8:_0x5d04d8[_0x33a567(0xe0)](summarizeBff)}};}},personalBffDetail={'service':a35_0x417d19(0xda),'command':a35_0x417d19(0xa2),'description':a35_0x417d19(0xde),'risk':'read','flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x58e1f5){const _0x243ddb=a35_0x417d19,_0x550ad1=await getPersonalBff(_0x58e1f5[_0x243ddb(0xaf)]('id'),_0x58e1f5[_0x243ddb(0xc6)]);return{'ok':!![],'data':detailBff(_0x550ad1)};}},personalBffCreate={'service':a35_0x417d19(0xda),'command':a35_0x417d19(0xdb),'description':a35_0x417d19(0xa3),'risk':'write','confirmationDescription':'把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x200f29){const _0x50f4e7=a35_0x417d19,_0x4abc8c=buildCreateInput(_0x200f29),_0x5a776b=await createPersonalBff(_0x200f29[_0x50f4e7(0xc6)],_0x4abc8c);return{'ok':!![],'data':detailBff(_0x5a776b),'message':_0x50f4e7(0xe7)+_0x5a776b['id']+(_0x5a776b[_0x50f4e7(0xbf)]?'\x20('+_0x5a776b[_0x50f4e7(0xbf)]+')':'')};},async 'dryRun'(_0x2bfb66){const _0x4f651c=a35_0x417d19,_0x2e0ad0=buildCreateInput(_0x2bfb66);return dryRun(_0x4f651c(0xd7),_0x4f651c(0xd2))[_0x4f651c(0xe4)]({'appCode':_0x2bfb66[_0x4f651c(0xc6)],..._0x2e0ad0})['description'](_0x4f651c(0xb2)+_0x2e0ad0[_0x4f651c(0xbf)])[_0x4f651c(0xb5)]();}},personalBffUpdate={'service':'personal-bff','command':a35_0x417d19(0xbe),'description':a35_0x417d19(0xb7),'risk':'write','confirmationDescription':'更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':a35_0x417d19(0xc7)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x597909){const _0x58a759=a35_0x417d19,_0x26d64e=_0x597909[_0x58a759(0xaf)]('id'),_0x2c4ec7=buildUpdateInput(_0x597909),_0x2e0a36=await updatePersonalBff(_0x26d64e,_0x597909[_0x58a759(0xc6)],_0x2c4ec7);return{'ok':!![],'data':detailBff(_0x2e0a36),'message':'Updated\x20personal\x20BFF\x20'+_0x2e0a36['id']+(_0x2e0a36[_0x58a759(0xbf)]?'\x20('+_0x2e0a36[_0x58a759(0xbf)]+')':'')};},async 'dryRun'(_0x3e9a85){const _0x593bb9=a35_0x417d19,_0x9cf472=_0x3e9a85[_0x593bb9(0xaf)]('id'),_0x4e7e81=buildUpdateInput(_0x3e9a85);return dryRun('POST',_0x593bb9(0xac)+_0x9cf472+_0x593bb9(0xb3))[_0x593bb9(0xe4)]({'appCode':_0x3e9a85[_0x593bb9(0xc6)],..._0x4e7e81})[_0x593bb9(0xd5)](_0x593bb9(0xb8)+_0x9cf472)[_0x593bb9(0xb5)]();}},personalBffExec={'service':a35_0x417d19(0xda),'command':'exec','description':a35_0x417d19(0xa7),'risk':a35_0x417d19(0xca),'confirmationDescription':a35_0x417d19(0xa5),'flags':[{...ID_FLAG,'description':a35_0x417d19(0xc7)},{...PARAMS_FLAG,'description':a35_0x417d19(0xaa)}],async 'validate'(_0x3ddc47){const _0x186e76=a35_0x417d19;parseExecParams(_0x3ddc47['str'](_0x186e76(0xb4)));},async 'execute'(_0x16be70){const _0x31eac5=a35_0x417d19,_0x32e26b=_0x16be70[_0x31eac5(0xaf)]('id'),_0x599f41=parseExecParams(_0x16be70[_0x31eac5(0xd9)](_0x31eac5(0xb4))),_0x33aa80=await executePersonalBff(_0x32e26b,_0x16be70[_0x31eac5(0xc6)],_0x599f41);return{'ok':!![],'data':{'result':_0x33aa80},'message':_0x31eac5(0xbb)+_0x32e26b};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x254dc7=a35_0x10ca;(function(_0x56f546,_0x16a8d4){const _0xd28655=a35_0x10ca,_0x3c850d=_0x56f546();while(!![]){try{const _0x3121d1=parseInt(_0xd28655(0x12a))/0x1+-parseInt(_0xd28655(0x153))/0x2+parseInt(_0xd28655(0x16f))/0x3*(parseInt(_0xd28655(0x164))/0x4)+-parseInt(_0xd28655(0x134))/0x5+parseInt(_0xd28655(0x13e))/0x6+parseInt(_0xd28655(0x163))/0x7*(parseInt(_0xd28655(0x142))/0x8)+-parseInt(_0xd28655(0x15e))/0x9*(parseInt(_0xd28655(0x14d))/0xa);if(_0x3121d1===_0x16a8d4)break;else _0x3c850d['push'](_0x3c850d['shift']());}catch(_0x7397e0){_0x3c850d['push'](_0x3c850d['shift']());}}}(a35_0x5cc0,0xbf34e));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a35_0x10ca(_0x48a3d2,_0x5791be){_0x48a3d2=_0x48a3d2-0x123;const _0x5cc0ec=a35_0x5cc0();let _0x10ca91=_0x5cc0ec[_0x48a3d2];return _0x10ca91;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x254dc7(0x15a),'type':a35_0x254dc7(0x16a),'description':a35_0x254dc7(0x160)},FUNCTION_NAME_FLAG={'name':'name','type':'string','required':!![],'description':a35_0x254dc7(0x158)},DESCRIPTION_FLAG={'name':'description','type':a35_0x254dc7(0x16a),'description':a35_0x254dc7(0x138)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x254dc7(0x16a),'description':a35_0x254dc7(0x14f)};function normalizeFunctionName(_0x35b534){const _0x2657e6=a35_0x254dc7,_0x1ca78e=String(_0x35b534||'')[_0x2657e6(0x13a)]();if(!_0x1ca78e||!FUNCTION_NAME_PATTERN['test'](_0x1ca78e))throw CliErrors['validation'](_0x2657e6(0x147));return _0x1ca78e;}function readScriptFile(_0x304a77){const _0x159fb7=a35_0x254dc7;if(!_0x304a77)throw CliErrors[_0x159fb7(0x16b)](_0x159fb7(0x151));if(!existsSync(_0x304a77))throw CliErrors[_0x159fb7(0x16b)](_0x159fb7(0x161)+_0x304a77);if(!statSync(_0x304a77)[_0x159fb7(0x13d)]())throw CliErrors[_0x159fb7(0x16b)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x304a77);const _0x3923c8=readFileSync(_0x304a77,_0x159fb7(0x16e));if(!_0x3923c8[_0x159fb7(0x13a)]())throw CliErrors['validation'](_0x159fb7(0x14c));return _0x3923c8;}function optionalTrimmed(_0x1332ba){const _0x17a601=a35_0x254dc7,_0x46dde0=String(_0x1332ba||'')[_0x17a601(0x13a)]();return _0x46dde0||undefined;}function summarizeBff(_0x409735){const _0x14a3a8=a35_0x254dc7;return{'id':_0x409735['id'],'appCode':_0x409735[_0x14a3a8(0x144)],'functionName':_0x409735[_0x14a3a8(0x12b)],'description':_0x409735['description'],'scriptType':_0x409735['scriptType'],'version':_0x409735[_0x14a3a8(0x127)],'gmtModified':_0x409735[_0x14a3a8(0x15d)],'updateTime':_0x409735[_0x14a3a8(0x15c)]};}function detailBff(_0x5891e7){const _0x8636ec=a35_0x254dc7;return{'id':_0x5891e7['id'],'appCode':_0x5891e7['appCode'],'functionName':_0x5891e7[_0x8636ec(0x12b)],'description':_0x5891e7[_0x8636ec(0x12e)],'scriptType':_0x5891e7[_0x8636ec(0x169)],'scriptContent':_0x5891e7[_0x8636ec(0x15f)]??'','config':_0x5891e7[_0x8636ec(0x156)],'version':_0x5891e7['version'],'createUserId':_0x5891e7[_0x8636ec(0x14b)],'gmtCreate':_0x5891e7[_0x8636ec(0x145)],'gmtModified':_0x5891e7[_0x8636ec(0x15d)],'createTime':_0x5891e7[_0x8636ec(0x157)],'updateTime':_0x5891e7[_0x8636ec(0x15c)]};}function buildCreateInput(_0x26469f){const _0x50cb74=a35_0x254dc7;return{'functionName':normalizeFunctionName(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x14a))),...optionalTrimmed(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x12e)))?{'description':optionalTrimmed(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x12e)))}:{},'scriptContent':readScriptFile(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x15a))),...optionalTrimmed(_0x26469f['str'](_0x50cb74(0x168)))?{'sourceSessionId':optionalTrimmed(_0x26469f[_0x50cb74(0x12d)](_0x50cb74(0x168)))}:{}};}function buildUpdateInput(_0x7d2333){const _0x3857eb=a35_0x254dc7,_0x1a75c0={};optionalTrimmed(_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x14a)))&&(_0x1a75c0['functionName']=normalizeFunctionName(_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x14a))));_0x7d2333[_0x3857eb(0x137)]('description')!==undefined&&(_0x1a75c0['description']=_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x12e)));optionalTrimmed(_0x7d2333[_0x3857eb(0x12d)](_0x3857eb(0x15a)))&&(_0x1a75c0[_0x3857eb(0x15f)]=readScriptFile(_0x7d2333['str'](_0x3857eb(0x15a))));_0x7d2333[_0x3857eb(0x137)]('source-session-id')!==undefined&&(_0x1a75c0[_0x3857eb(0x149)]=_0x7d2333[_0x3857eb(0x12d)]('source-session-id'));if(Object[_0x3857eb(0x135)](_0x1a75c0)[_0x3857eb(0x166)]===0x0)throw CliErrors[_0x3857eb(0x16b)](_0x3857eb(0x139));return _0x1a75c0;}function a35_0x5cc0(){const _0x35f6f3=['write','bool','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','2395775BRZBPF','keys','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','flag','Personal\x20BFF\x20description','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','trim','detail','isArray','isFile','5771094WUyOEI','Preview:\x20create\x20personal\x20BFF\x20','params','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','16Nxixkq','/client/runtime-bff/personal/create','appCode','gmtCreate','high-risk-write','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','POST','sourceSessionId','name','createUserId','Personal\x20BFF\x20script\x20file\x20is\x20blank.','10SMKNKX','map','Optional\x20source\x20RuntimeAgent\x20session\x20id','exec','File\x20path\x20is\x20required.','update','2847680Bffpfb','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','body','config','createTime','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','file','Personal\x20BFF\x20script\x20ID','updateTime','gmtModified','6456519tpFAAT','scriptContent','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','File\x20not\x20found:\x20','Created\x20personal\x20BFF\x20','1216922sLaTKL','284168VQaydN','create','length','personal-bff','source-session-id','scriptType','string','validation','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Executed\x20personal\x20BFF\x20','utf8','24VymvOd','build','list','根据本地脚本文件创建个人\x20BFF','根据\x20ID\x20更新个人\x20BFF','version','read','num','1525691rqJhsI','functionName','Updated\x20personal\x20BFF\x20','str','description','Preview:\x20update\x20personal\x20BFF\x20','verbose'];a35_0x5cc0=function(){return _0x35f6f3;};return a35_0x5cc0();}function parseExecParams(_0x3a2b24){const _0x109de3=a35_0x254dc7,_0x4c866f=parseJsonParams(_0x3a2b24)??{};if(Array[_0x109de3(0x13c)](_0x4c866f))throw CliErrors[_0x109de3(0x16b)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x4c866f;}const personalBffList={'service':'personal-bff','command':a35_0x254dc7(0x124),'description':a35_0x254dc7(0x136),'risk':a35_0x254dc7(0x128),'flags':[VERBOSE_FLAG],async 'execute'(_0x40be84){const _0x1179f6=a35_0x254dc7,_0x1bb43d=await listPersonalBffs(_0x40be84[_0x1179f6(0x144)]);return{'ok':!![],'data':{'total':_0x1bb43d[_0x1179f6(0x166)],'items':_0x40be84[_0x1179f6(0x132)](_0x1179f6(0x130))?_0x1bb43d:_0x1bb43d[_0x1179f6(0x14e)](summarizeBff)}};}},personalBffDetail={'service':a35_0x254dc7(0x167),'command':a35_0x254dc7(0x13b),'description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':a35_0x254dc7(0x128),'flags':[{...ID_FLAG,'description':a35_0x254dc7(0x15b)}],async 'execute'(_0xc0d0ec){const _0x3abf5d=a35_0x254dc7,_0xe04666=await getPersonalBff(_0xc0d0ec[_0x3abf5d(0x129)]('id'),_0xc0d0ec[_0x3abf5d(0x144)]);return{'ok':!![],'data':detailBff(_0xe04666)};}},personalBffCreate={'service':a35_0x254dc7(0x167),'command':a35_0x254dc7(0x165),'description':a35_0x254dc7(0x125),'risk':a35_0x254dc7(0x131),'confirmationDescription':a35_0x254dc7(0x141),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3aadd1){const _0x320488=a35_0x254dc7,_0x1a630e=buildCreateInput(_0x3aadd1),_0x573003=await createPersonalBff(_0x3aadd1[_0x320488(0x144)],_0x1a630e);return{'ok':!![],'data':detailBff(_0x573003),'message':_0x320488(0x162)+_0x573003['id']+(_0x573003[_0x320488(0x12b)]?'\x20('+_0x573003[_0x320488(0x12b)]+')':'')};},async 'dryRun'(_0x3f8007){const _0x2cd7c3=a35_0x254dc7,_0x15019b=buildCreateInput(_0x3f8007);return dryRun(_0x2cd7c3(0x148),_0x2cd7c3(0x143))[_0x2cd7c3(0x155)]({'appCode':_0x3f8007[_0x2cd7c3(0x144)],..._0x15019b})['description'](_0x2cd7c3(0x13f)+_0x15019b['functionName'])[_0x2cd7c3(0x123)]();}},personalBffUpdate={'service':'personal-bff','command':a35_0x254dc7(0x152),'description':a35_0x254dc7(0x126),'risk':a35_0x254dc7(0x131),'confirmationDescription':a35_0x254dc7(0x159),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0xaf61d9){const _0xa67f53=a35_0x254dc7,_0x160053=_0xaf61d9['num']('id'),_0x2438be=buildUpdateInput(_0xaf61d9),_0x100d21=await updatePersonalBff(_0x160053,_0xaf61d9[_0xa67f53(0x144)],_0x2438be);return{'ok':!![],'data':detailBff(_0x100d21),'message':_0xa67f53(0x12c)+_0x100d21['id']+(_0x100d21['functionName']?'\x20('+_0x100d21[_0xa67f53(0x12b)]+')':'')};},async 'dryRun'(_0x4db761){const _0x1f336e=a35_0x254dc7,_0x1a7e9c=_0x4db761['num']('id'),_0x4faab0=buildUpdateInput(_0x4db761);return dryRun(_0x1f336e(0x148),'/client/runtime-bff/personal/'+_0x1a7e9c+'/update')['body']({'appCode':_0x4db761[_0x1f336e(0x144)],..._0x4faab0})['description'](_0x1f336e(0x12f)+_0x1a7e9c)[_0x1f336e(0x123)]();}},personalBffExec={'service':a35_0x254dc7(0x167),'command':a35_0x254dc7(0x150),'description':a35_0x254dc7(0x133),'risk':a35_0x254dc7(0x146),'confirmationDescription':a35_0x254dc7(0x154),'flags':[{...ID_FLAG,'description':a35_0x254dc7(0x15b)},{...PARAMS_FLAG,'description':a35_0x254dc7(0x16c)}],async 'validate'(_0x30e537){const _0x3ad152=a35_0x254dc7;parseExecParams(_0x30e537[_0x3ad152(0x12d)]('params'));},async 'execute'(_0x489385){const _0x1a1d9c=a35_0x254dc7,_0x538c9b=_0x489385['num']('id'),_0x28e554=parseExecParams(_0x489385['str'](_0x1a1d9c(0x140))),_0x46f59e=await executePersonalBff(_0x538c9b,_0x489385[_0x1a1d9c(0x144)],_0x28e554);return{'ok':!![],'data':{'result':_0x46f59e},'message':_0x1a1d9c(0x16d)+_0x538c9b};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x560efc=a36_0xc629;(function(_0x4aa0f9,_0x5cb0eb){const _0xeaf807=a36_0xc629,_0x32fa83=_0x4aa0f9();while(!![]){try{const _0x4d394b=parseInt(_0xeaf807(0x1ba))/0x1+-parseInt(_0xeaf807(0x1cd))/0x2+-parseInt(_0xeaf807(0x1dc))/0x3*(-parseInt(_0xeaf807(0x1bb))/0x4)+-parseInt(_0xeaf807(0x1c4))/0x5+parseInt(_0xeaf807(0x1e1))/0x6+-parseInt(_0xeaf807(0x1bd))/0x7+-parseInt(_0xeaf807(0x1b9))/0x8*(-parseInt(_0xeaf807(0x1c1))/0x9);if(_0x4d394b===_0x5cb0eb)break;else _0x32fa83['push'](_0x32fa83['shift']());}catch(_0xc124b8){_0x32fa83['push'](_0x32fa83['shift']());}}}(a36_0x36cf,0x73f23));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';function a36_0x36cf(){const _0x22f187=['Skills','Agent\x20Schedules','OCR','Self\x20Update','command','push','login','1054212czaEIo','Configuration','Artifacts','values','list','Service\x20Tree','service','map','App\x20Management','File','SQL\x20Queries','Knowledge\x20Base','get','Workspace','Schema','60HskJaK','description','set','install','Authentication','4366848ivADVg','Runtime\x20App\x20Config','\x20\x20[high-risk-write]','\x20\x20[write]','has','8zVSUby','59335teHtLT','161076lZgFOn','risk','6431026jyKgnh','Logs','CLI\x20Built-in\x20Skill','write','9777141KOPlME','BFF\x20Scripts','Personal\x20BFF','3790665baCTwQ','from'];a36_0x36cf=function(){return _0x22f187;};return a36_0x36cf();}import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';function a36_0xc629(_0x25b0ab,_0x3f86e5){_0x25b0ab=_0x25b0ab-0x1b7;const _0x36cf56=a36_0x36cf();let _0xc6297d=_0x36cf56[_0x25b0ab];return _0xc6297d;}import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x41ab41){const _0x452433=a36_0xc629;for(const _0x4bee8f of _0x41ab41){definitions['set'](_0x4bee8f[_0x452433(0x1d3)]+':'+_0x4bee8f[_0x452433(0x1ca)],_0x4bee8f);let _0x1c0308=serviceGroups[_0x452433(0x1d9)](_0x4bee8f[_0x452433(0x1d3)]);!_0x1c0308&&(_0x1c0308=[],serviceGroups[_0x452433(0x1de)](_0x4bee8f[_0x452433(0x1d3)],_0x1c0308)),_0x1c0308[_0x452433(0x1cb)](_0x4bee8f);}}function registerService(_0x1c0767,_0x3aee07,_0xa39493){const _0x32d3fa=a36_0xc629;registerDefinitions(_0x3aee07);const _0x4c92de=_0x42b0bd=>_0x42b0bd==='read'?'':_0x42b0bd===_0x32d3fa(0x1c0)?_0x32d3fa(0x1b7):_0x32d3fa(0x1e3),_0xdff25c={'service':_0x3aee07[0x0][_0x32d3fa(0x1d3)],'label':_0x1c0767,'commands':_0x3aee07[_0x32d3fa(0x1d4)](_0x40da0f=>({'command':_0x40da0f[_0x32d3fa(0x1ca)],'description':_0x40da0f[_0x32d3fa(0x1dd)],'tag':_0x4c92de(_0x40da0f[_0x32d3fa(0x1bc)])})),'defaultCommand':_0xa39493?.['defaultCommand']??(_0xa39493?.['isSingleCommand']?_0x3aee07[0x0][_0x32d3fa(0x1ca)]:undefined),'isSingleCommand':_0xa39493?.['isSingleCommand']};serviceRegistry[_0x32d3fa(0x1cb)](_0xdff25c),serviceByName[_0x32d3fa(0x1de)](_0xdff25c['service'],_0xdff25c);}registerService(a36_0x560efc(0x1e0),authDefinitions,{'defaultCommand':a36_0x560efc(0x1cc)}),registerService(a36_0x560efc(0x1d5),appDefinitions,{'defaultCommand':a36_0x560efc(0x1d1)}),registerService(a36_0x560efc(0x1da),workspaceDefinitions),registerService(a36_0x560efc(0x1e2),appConfigDefinitions),registerService(a36_0x560efc(0x1ce),configDefinitions,{'defaultCommand':a36_0x560efc(0x1d1)}),registerService('API\x20Documentation',apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a36_0x560efc(0x1d7),sqlDefinitions),registerService(a36_0x560efc(0x1c2),bffDefinitions),registerService(a36_0x560efc(0x1c3),personalBffDefinitions),registerService(a36_0x560efc(0x1cf),artifactDefinitions),registerService(a36_0x560efc(0x1d6),fileDefinitions),registerService(a36_0x560efc(0x1c8),ocrDefinitions),registerService(a36_0x560efc(0x1d8),kbDefinitions),registerService(a36_0x560efc(0x1c7),scheduleDefinitions,{'defaultCommand':a36_0x560efc(0x1d1)}),registerService(a36_0x560efc(0x1d2),serviceDefinitions,{'defaultCommand':a36_0x560efc(0x1d1)}),registerService(a36_0x560efc(0x1c6),skillDefinitions,{'defaultCommand':a36_0x560efc(0x1df)}),registerService(a36_0x560efc(0x1bf),cliSkillDefinitions,{'defaultCommand':a36_0x560efc(0x1df)}),registerService(a36_0x560efc(0x1c9),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x560efc(0x1db),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x560efc(0x1be),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x1d7f4d,_0x5d53de){const _0xe12ac4=a36_0x560efc;return definitions[_0xe12ac4(0x1d9)](_0x1d7f4d+':'+_0x5d53de);}export function isKnownService(_0x3b3c5c){const _0x32d443=a36_0x560efc;return serviceByName[_0x32d443(0x1b8)](_0x3b3c5c);}export function getServiceEntry(_0x3774b4){return serviceByName['get'](_0x3774b4);}export function getAllDefinitions(){const _0x189eb5=a36_0x560efc;return Array[_0x189eb5(0x1c5)](definitions[_0x189eb5(0x1d0)]());}
1
+ const a36_0x4e6cdc=a36_0x1c47;(function(_0x4f0b4f,_0x3cbc5e){const _0x7b655=a36_0x1c47,_0x36c94c=_0x4f0b4f();while(!![]){try{const _0x5658e3=parseInt(_0x7b655(0x1f3))/0x1*(-parseInt(_0x7b655(0x20b))/0x2)+parseInt(_0x7b655(0x20d))/0x3+-parseInt(_0x7b655(0x1ed))/0x4+parseInt(_0x7b655(0x1ec))/0x5+-parseInt(_0x7b655(0x20c))/0x6+parseInt(_0x7b655(0x1f9))/0x7*(parseInt(_0x7b655(0x212))/0x8)+-parseInt(_0x7b655(0x211))/0x9;if(_0x5658e3===_0x3cbc5e)break;else _0x36c94c['push'](_0x36c94c['shift']());}catch(_0x1250cc){_0x36c94c['push'](_0x36c94c['shift']());}}}(a36_0x201d,0x5e206));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';function a36_0x201d(){const _0x48615d=['Skills','149800yHwDoN','risk','map','write','Knowledge\x20Base','list','defaultCommand','Diagnostics','OCR','get','\x20\x20[high-risk-write]','Instant\x20API','CLI\x20Built-in\x20Skill','login','set','File','install','BFF\x20Scripts','310KmeTDk','2141082lKfgUI','1940505XdstWS','from','Service\x20Tree','Datasets','2528406RdVUxC','128bSyHdn','description','Artifacts','SQL\x20Queries','3426455BgFzax','314532WbyEwy','Personal\x20BFF','Schema','read','Runtime\x20App\x20Config','service','3694aPpOew','Logs','show','\x20\x20[write]','push'];a36_0x201d=function(){return _0x48615d;};return a36_0x201d();}import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a36_0x1c47(_0xd1f40f,_0x41b911){_0xd1f40f=_0xd1f40f-0x1ea;const _0x201d24=a36_0x201d();let _0x1c4780=_0x201d24[_0xd1f40f];return _0x1c4780;}function registerDefinitions(_0x2f8570){const _0x3ab5b6=a36_0x1c47;for(const _0xe9b529 of _0x2f8570){definitions[_0x3ab5b6(0x207)](_0xe9b529[_0x3ab5b6(0x1f2)]+':'+_0xe9b529['command'],_0xe9b529);let _0x257f4e=serviceGroups[_0x3ab5b6(0x202)](_0xe9b529[_0x3ab5b6(0x1f2)]);!_0x257f4e&&(_0x257f4e=[],serviceGroups[_0x3ab5b6(0x207)](_0xe9b529['service'],_0x257f4e)),_0x257f4e['push'](_0xe9b529);}}function registerService(_0x1d6ddc,_0x16055c,_0x3eaf3b){const _0x12e8eb=a36_0x1c47;registerDefinitions(_0x16055c);const _0x1948f7=_0x3fe92d=>_0x3fe92d===_0x12e8eb(0x1f0)?'':_0x3fe92d===_0x12e8eb(0x1fc)?_0x12e8eb(0x1f6):_0x12e8eb(0x203),_0x1cfa9a={'service':_0x16055c[0x0][_0x12e8eb(0x1f2)],'label':_0x1d6ddc,'commands':_0x16055c[_0x12e8eb(0x1fb)](_0x1d5ac3=>({'command':_0x1d5ac3['command'],'description':_0x1d5ac3[_0x12e8eb(0x213)],'tag':_0x1948f7(_0x1d5ac3[_0x12e8eb(0x1fa)])})),'defaultCommand':_0x3eaf3b?.[_0x12e8eb(0x1ff)]??(_0x3eaf3b?.['isSingleCommand']?_0x16055c[0x0]['command']:undefined),'isSingleCommand':_0x3eaf3b?.['isSingleCommand']};serviceRegistry[_0x12e8eb(0x1f7)](_0x1cfa9a),serviceByName[_0x12e8eb(0x207)](_0x1cfa9a[_0x12e8eb(0x1f2)],_0x1cfa9a);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x4e6cdc(0x206)}),registerService('App\x20Management',appDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService('Workspace',workspaceDefinitions),registerService(a36_0x4e6cdc(0x1f1),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x4e6cdc(0x210),datasetDefinitions),registerService(a36_0x4e6cdc(0x204),dataDefinitions),registerService(a36_0x4e6cdc(0x1eb),sqlDefinitions),registerService(a36_0x4e6cdc(0x20a),bffDefinitions),registerService(a36_0x4e6cdc(0x1ee),personalBffDefinitions),registerService(a36_0x4e6cdc(0x1ea),artifactDefinitions),registerService(a36_0x4e6cdc(0x208),fileDefinitions),registerService(a36_0x4e6cdc(0x201),ocrDefinitions),registerService(a36_0x4e6cdc(0x1fd),kbDefinitions),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService(a36_0x4e6cdc(0x20f),serviceDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1fe)}),registerService(a36_0x4e6cdc(0x1f8),skillDefinitions,{'defaultCommand':a36_0x4e6cdc(0x209)}),registerService(a36_0x4e6cdc(0x205),cliSkillDefinitions,{'defaultCommand':a36_0x4e6cdc(0x209)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a36_0x4e6cdc(0x200),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x4e6cdc(0x1ef),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x4e6cdc(0x1f4),logsDefinitions,{'defaultCommand':a36_0x4e6cdc(0x1f5)});export function findDefinition(_0x79f5d,_0x3926ee){const _0x1d8ed3=a36_0x4e6cdc;return definitions[_0x1d8ed3(0x202)](_0x79f5d+':'+_0x3926ee);}export function isKnownService(_0x3e187e){return serviceByName['has'](_0x3e187e);}export function getServiceEntry(_0x581474){return serviceByName['get'](_0x581474);}export function getAllDefinitions(){const _0x24024d=a36_0x4e6cdc;return Array[_0x24024d(0x20e)](definitions['values']());}
@@ -1 +1 @@
1
- const a37_0x9a4cc1=a37_0x4a8f;(function(_0x2acae9,_0x2c05de){const _0x1cc5bd=a37_0x4a8f,_0x310594=_0x2acae9();while(!![]){try{const _0x5dea7f=-parseInt(_0x1cc5bd(0xa4))/0x1+-parseInt(_0x1cc5bd(0x8f))/0x2*(parseInt(_0x1cc5bd(0xcc))/0x3)+parseInt(_0x1cc5bd(0x95))/0x4+-parseInt(_0x1cc5bd(0xa2))/0x5*(parseInt(_0x1cc5bd(0x9d))/0x6)+parseInt(_0x1cc5bd(0xb0))/0x7*(parseInt(_0x1cc5bd(0x99))/0x8)+-parseInt(_0x1cc5bd(0x91))/0x9+-parseInt(_0x1cc5bd(0xd5))/0xa*(-parseInt(_0x1cc5bd(0x92))/0xb);if(_0x5dea7f===_0x2c05de)break;else _0x310594['push'](_0x310594['shift']());}catch(_0x35038b){_0x310594['push'](_0x310594['shift']());}}}(a37_0x44f7,0x820a7));function a37_0x4a8f(_0x5e5d2b,_0x1d3442){_0x5e5d2b=_0x5e5d2b-0x87;const _0x44f786=a37_0x44f7();let _0x4a8f3b=_0x44f786[_0x5e5d2b];return _0x4a8f3b;}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':a37_0x9a4cc1(0xc2),'type':'string','required':!![],'enum':['CRON',a37_0x9a4cc1(0xb4)],'description':a37_0x9a4cc1(0xcb)},CRON_FLAG={'name':'cron','type':'string','description':a37_0x9a4cc1(0x96)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a37_0x9a4cc1(0xac),'description':a37_0x9a4cc1(0xa6)},TITLE_FLAG={'name':a37_0x9a4cc1(0xd2),'type':a37_0x9a4cc1(0xac),'required':!![],'description':a37_0x9a4cc1(0xce)},PROMPT_FLAG={'name':a37_0x9a4cc1(0xb8),'type':a37_0x9a4cc1(0xac),'required':!![],'description':a37_0x9a4cc1(0xa8)},CHANNEL_FLAG={'name':a37_0x9a4cc1(0xae),'type':a37_0x9a4cc1(0xac),'enum':[a37_0x9a4cc1(0x9f),'premium'],'default':a37_0x9a4cc1(0xc9),'description':a37_0x9a4cc1(0xb7)},SCHEDULE_ID_FLAG={'name':a37_0x9a4cc1(0xa0),'type':a37_0x9a4cc1(0xac),'required':!![],'description':a37_0x9a4cc1(0xba),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a37_0x9a4cc1(0xbc),'type':a37_0x9a4cc1(0xd0),'default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a37_0x9a4cc1(0x94),'type':a37_0x9a4cc1(0xac),'description':'Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call'},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x5667e9){const _0x22b1a0=a37_0x9a4cc1,_0x46d6c3=_0x5667e9['str']('kind'),_0x4a14cb=_0x5667e9[_0x22b1a0(0xcf)](_0x22b1a0(0xd2))[_0x22b1a0(0xd4)](),_0x14a598=_0x5667e9[_0x22b1a0(0xcf)](_0x22b1a0(0xb8))[_0x22b1a0(0xd4)](),_0x387c9a=_0x5667e9[_0x22b1a0(0xcf)](_0x22b1a0(0xae)),_0x3d0359=_0x5667e9[_0x22b1a0(0xcf)](_0x22b1a0(0x9a)),_0x466071=_0x5667e9[_0x22b1a0(0xcf)](_0x22b1a0(0xaf));if(!_0x4a14cb)throw CliErrors[_0x22b1a0(0x8a)](_0x22b1a0(0xad));if(!_0x14a598)throw CliErrors[_0x22b1a0(0x8a)](_0x22b1a0(0x8b));if(_0x46d6c3===_0x22b1a0(0xc3)){if(!_0x3d0359||_0x466071)throw CliErrors[_0x22b1a0(0x8a)](_0x22b1a0(0x98));return{'kind':_0x46d6c3,'timezone':_0x22b1a0(0x89),'cron':_0x3d0359,'title':_0x4a14cb,'prompt':_0x14a598,'channel':_0x387c9a};}if(_0x46d6c3===_0x22b1a0(0xb4)){if(!_0x466071||_0x3d0359)throw CliErrors[_0x22b1a0(0x8a)](_0x22b1a0(0xc4));return{'kind':_0x46d6c3,'timezone':_0x22b1a0(0x89),'scheduledAt':_0x466071,'title':_0x4a14cb,'prompt':_0x14a598,'channel':_0x387c9a};}throw CliErrors['validation'](_0x22b1a0(0x9b));}function scheduleCollectionPath(_0x405a21){const _0x3672f0=a37_0x9a4cc1;return _0x3672f0(0xd1)+encodeURIComponent(_0x405a21)+_0x3672f0(0xb5);}function scheduleItemPath(_0x142f5c,_0x4d27a4){return scheduleCollectionPath(_0x142f5c)+'/'+encodeURIComponent(_0x4d27a4);}const scheduleValidate={'service':'schedule','command':a37_0x9a4cc1(0xb6),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a37_0x9a4cc1(0x8c),'flags':INPUT_FLAGS,async 'validate'(_0x21f872){readScheduleInput(_0x21f872);},async 'execute'(_0x487ce4){const _0x817026=a37_0x9a4cc1,_0x1d2714=readScheduleInput(_0x487ce4),_0x3e3718=await validateRuntimeSchedule(_0x487ce4[_0x817026(0xc8)],_0x1d2714);return{'ok':!![],'data':_0x3e3718,'message':_0x817026(0xc6)};}},scheduleCreate={'service':'schedule','command':a37_0x9a4cc1(0x9e),'description':a37_0x9a4cc1(0x90),'risk':'high-risk-write','confirmationDescription':a37_0x9a4cc1(0xbf),'flags':INPUT_FLAGS,async 'validate'(_0x14d797){readScheduleInput(_0x14d797);},async 'execute'(_0x501f47){const _0x4c7f7a=a37_0x9a4cc1,_0x5a8959=readScheduleInput(_0x501f47),_0x56a2be=await validateRuntimeSchedule(_0x501f47[_0x4c7f7a(0xc8)],_0x5a8959),_0x15f03d=await createRuntimeSchedule(_0x501f47[_0x4c7f7a(0xc8)],_0x56a2be);return{'ok':!![],'data':_0x15f03d,'message':_0x4c7f7a(0xbd)+_0x15f03d[_0x4c7f7a(0xc2)]+_0x4c7f7a(0xa7)+_0x15f03d[_0x4c7f7a(0xc0)]};},async 'dryRun'(_0x125665){const _0x2d2833=a37_0x9a4cc1,_0xd8abf4=readScheduleInput(_0x125665);return dryRun(_0x2d2833(0xcd),scheduleCollectionPath(_0x125665[_0x2d2833(0xc8)]))[_0x2d2833(0xd3)](_0xd8abf4)[_0x2d2833(0xb3)]('Preview:\x20create\x20an\x20Agent\x20schedule')[_0x2d2833(0x8e)]();}},scheduleList={'service':'schedule','command':a37_0x9a4cc1(0xbe),'description':a37_0x9a4cc1(0x88),'risk':a37_0x9a4cc1(0x8c),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x432ddc){const _0x2657e1=a37_0x9a4cc1,_0x10e68b=_0x432ddc['num']('limit');if(!Number['isSafeInteger'](_0x10e68b)||_0x10e68b<0x1||_0x10e68b>0x64)throw CliErrors['validation'](_0x2657e1(0xa1));const _0x1a6f6c=_0x432ddc['str'](_0x2657e1(0x94));if(_0x1a6f6c&&(_0x1a6f6c[_0x2657e1(0xaa)]>0x400||_0x1a6f6c[_0x2657e1(0xd4)]()!==_0x1a6f6c))throw CliErrors[_0x2657e1(0x8a)](_0x2657e1(0x97));},async 'execute'(_0x58c4ba){const _0x13eebc=a37_0x9a4cc1,_0x4f37fe=_0x58c4ba['str'](_0x13eebc(0x94)),_0x1aaa9f=await listRuntimeSchedules(_0x58c4ba[_0x13eebc(0xc8)],{'limit':_0x58c4ba[_0x13eebc(0xc1)]('limit'),..._0x4f37fe?{'cursor':_0x4f37fe}:{}});return{'ok':!![],'data':_0x1aaa9f};}},scheduleDetail={'service':'schedule','command':a37_0x9a4cc1(0xc5),'description':a37_0x9a4cc1(0xb1),'risk':a37_0x9a4cc1(0x8c),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x3777c5){const _0x4e4bc0=a37_0x9a4cc1,_0xc11bc2=await getRuntimeSchedule(_0x3777c5[_0x4e4bc0(0xc8)],_0x3777c5[_0x4e4bc0(0xcf)](_0x4e4bc0(0xa0)));return{'ok':!![],'data':_0xc11bc2};}},scheduleRun={'service':a37_0x9a4cc1(0xb2),'command':'run','description':a37_0x9a4cc1(0xab),'risk':a37_0x9a4cc1(0xca),'confirmationDescription':'将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x443468){const _0x1ff2bb=a37_0x9a4cc1,_0x474edf=_0x443468[_0x1ff2bb(0xcf)]('schedule-id'),_0x29ec1b=await runRuntimeSchedule(_0x443468[_0x1ff2bb(0xc8)],_0x474edf);return{'ok':!![],'data':_0x29ec1b,'message':_0x1ff2bb(0xbb)+_0x29ec1b[_0x1ff2bb(0xc7)]+_0x1ff2bb(0x93)+_0x474edf};},async 'dryRun'(_0x3e8ea6){const _0x1cc628=a37_0x9a4cc1,_0x58830e=_0x3e8ea6[_0x1cc628(0xcf)](_0x1cc628(0xa0));return dryRun(_0x1cc628(0xcd),scheduleItemPath(_0x3e8ea6[_0x1cc628(0xc8)],_0x58830e)+_0x1cc628(0x87))[_0x1cc628(0xb3)](_0x1cc628(0xb9)+_0x58830e+_0x1cc628(0xa3))[_0x1cc628(0x8e)]();}},scheduleDelete={'service':'schedule','command':a37_0x9a4cc1(0x9c),'description':'删除定时任务并停止其后续触发','risk':'high-risk-write','confirmationDescription':a37_0x9a4cc1(0x8d),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x14a11e){const _0x426a61=a37_0x9a4cc1,_0x2fc324=_0x14a11e[_0x426a61(0xcf)](_0x426a61(0xa0)),_0xcd4e3d=await deleteRuntimeSchedule(_0x14a11e[_0x426a61(0xc8)],_0x2fc324);return{'ok':!![],'data':_0xcd4e3d,'message':_0x426a61(0xa9)+_0x2fc324};},async 'dryRun'(_0x1962ea){const _0x1e4d72=a37_0x9a4cc1,_0x28a974=_0x1962ea[_0x1e4d72(0xcf)]('schedule-id');return dryRun('DELETE',scheduleItemPath(_0x1962ea['appCode'],_0x28a974))[_0x1e4d72(0xb3)](_0x1e4d72(0xa5)+_0x28a974)[_0x1e4d72(0x8e)]();}};function a37_0x44f7(){const _0x434598=['CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','1041424qFPoIp','cron','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','delete','3612OUbBCT','create','auto','schedule-id','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','8540LLqlOD','\x20immediately','822752YalVOq','Preview:\x20delete\x20schedule\x20','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','\x20schedule\x20','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','Deleted\x20schedule\x20','length','立即运行一次定时任务并创建\x20Task','string','--title\x20must\x20not\x20be\x20blank.','channel','scheduled-at','14XLTWSR','Show\x20one\x20schedule\x20by\x20schedule\x20ID','schedule','description','ONCE','/schedules','validate','Task\x20channel:\x20auto\x20or\x20premium','prompt','Preview:\x20run\x20schedule\x20','Schedule\x20UUID','Queued\x20Task\x20','limit','Created\x20','list','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','scheduleId','num','kind','CRON','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','detail','Schedule\x20input\x20is\x20valid','taskId','appCode','premium','high-risk-write','Schedule\x20kind:\x20CRON\x20or\x20ONCE','802554NZeUZx','POST','Schedule\x20title','str','number','/api/harness/apps/','title','body','trim','1410DhjBNl','/run','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','UTC','validation','--prompt\x20must\x20not\x20be\x20blank.','read','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','build','4bnNWgK','创建周期性或单次执行的\x20Agent\x20定时任务','4729590SynVVN','215666JRyfiE','\x20from\x20schedule\x20','cursor','1677436bOJYtn','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.'];a37_0x44f7=function(){return _0x434598;};return a37_0x44f7();}export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ function a37_0x2c4a(_0x27b623,_0x4677de){_0x27b623=_0x27b623-0x159;const _0x25984c=a37_0x2598();let _0x2c4a44=_0x25984c[_0x27b623];return _0x2c4a44;}const a37_0x1bcf94=a37_0x2c4a;function a37_0x2598(){const _0x43acd7=['2QeJQJe','validation','3296nPiStH','title','创建周期性或单次执行的\x20Agent\x20定时任务','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','Deleted\x20schedule\x20','377439DWkaaC','ONCE','\x20schedule\x20','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','Preview:\x20run\x20schedule\x20','212124DXTfTy','\x20immediately','45WprOqw','Show\x20one\x20schedule\x20by\x20schedule\x20ID','117480JPCivP','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Page\x20size\x20from\x201\x20to\x20100','body','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','detail','\x20from\x20schedule\x20','Schedule\x20title','Schedule\x20UUID','prompt','235834HrjlMO','taskId','create','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','build','list','cursor','read','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','立即运行一次定时任务并创建\x20Task','scheduled-at','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','319401HMmOCH','10675VeTqOu','CRON','Created\x20','schedule','30RfbzRP','/schedules','appCode','POST','Preview:\x20delete\x20schedule\x20','validate','kind','isSafeInteger','cron','schedule-id','--prompt\x20must\x20not\x20be\x20blank.','premium','str','number','string','high-risk-write','limit','trim','/run','Schedule\x20input\x20is\x20valid','删除定时任务并停止其后续触发','Preview:\x20create\x20an\x20Agent\x20schedule','UTC','description','num','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','channel','2015934OeRwqJ','scheduleId','671GuXwBF','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','length'];a37_0x2598=function(){return _0x43acd7;};return a37_0x2598();}(function(_0x43fa2e,_0x477bb8){const _0x304726=a37_0x2c4a,_0x3e8bc4=_0x43fa2e();while(!![]){try{const _0x15fccd=parseInt(_0x304726(0x183))/0x1+-parseInt(_0x304726(0x169))/0x2*(-parseInt(_0x304726(0x170))/0x3)+parseInt(_0x304726(0x175))/0x4*(parseInt(_0x304726(0x177))/0x5)+-parseInt(_0x304726(0x164))/0x6+-parseInt(_0x304726(0x190))/0x7*(-parseInt(_0x304726(0x16b))/0x8)+parseInt(_0x304726(0x18f))/0x9*(-parseInt(_0x304726(0x194))/0xa)+parseInt(_0x304726(0x166))/0xb*(-parseInt(_0x304726(0x179))/0xc);if(_0x15fccd===_0x477bb8)break;else _0x3e8bc4['push'](_0x3e8bc4['shift']());}catch(_0x42f57a){_0x3e8bc4['push'](_0x3e8bc4['shift']());}}}(a37_0x2598,0x6863c));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':a37_0x1bcf94(0x19a),'type':a37_0x1bcf94(0x1a2),'required':!![],'enum':[a37_0x1bcf94(0x191),a37_0x1bcf94(0x171)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':a37_0x1bcf94(0x19c),'type':a37_0x1bcf94(0x1a2),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x1bcf94(0x18d),'type':a37_0x1bcf94(0x1a2),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x1bcf94(0x16c),'type':'string','required':!![],'description':a37_0x1bcf94(0x180)},PROMPT_FLAG={'name':a37_0x1bcf94(0x182),'type':a37_0x1bcf94(0x1a2),'required':!![],'description':a37_0x1bcf94(0x16e)},CHANNEL_FLAG={'name':a37_0x1bcf94(0x163),'type':a37_0x1bcf94(0x1a2),'enum':['auto',a37_0x1bcf94(0x19f)],'default':'premium','description':'Task\x20channel:\x20auto\x20or\x20premium'},SCHEDULE_ID_FLAG={'name':a37_0x1bcf94(0x19d),'type':a37_0x1bcf94(0x1a2),'required':!![],'description':a37_0x1bcf94(0x181),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a37_0x1bcf94(0x159),'type':a37_0x1bcf94(0x1a1),'default':0x14,'description':a37_0x1bcf94(0x17b)},CURSOR_FLAG={'name':a37_0x1bcf94(0x189),'type':'string','description':a37_0x1bcf94(0x18b)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x1ec360){const _0x317870=a37_0x1bcf94,_0x4b7501=_0x1ec360['str']('kind'),_0x4b37a1=_0x1ec360[_0x317870(0x1a0)]('title')[_0x317870(0x15a)](),_0x7ecfd4=_0x1ec360['str'](_0x317870(0x182))[_0x317870(0x15a)](),_0x37b547=_0x1ec360['str'](_0x317870(0x163)),_0x1cca6c=_0x1ec360['str'](_0x317870(0x19c)),_0x207ff9=_0x1ec360[_0x317870(0x1a0)](_0x317870(0x18d));if(!_0x4b37a1)throw CliErrors[_0x317870(0x16a)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x7ecfd4)throw CliErrors[_0x317870(0x16a)](_0x317870(0x19e));if(_0x4b7501===_0x317870(0x191)){if(!_0x1cca6c||_0x207ff9)throw CliErrors[_0x317870(0x16a)](_0x317870(0x167));return{'kind':_0x4b7501,'timezone':'UTC','cron':_0x1cca6c,'title':_0x4b37a1,'prompt':_0x7ecfd4,'channel':_0x37b547};}if(_0x4b7501===_0x317870(0x171)){if(!_0x207ff9||_0x1cca6c)throw CliErrors[_0x317870(0x16a)](_0x317870(0x18e));return{'kind':_0x4b7501,'timezone':_0x317870(0x15f),'scheduledAt':_0x207ff9,'title':_0x4b37a1,'prompt':_0x7ecfd4,'channel':_0x37b547};}throw CliErrors[_0x317870(0x16a)](_0x317870(0x186));}function scheduleCollectionPath(_0x35aa19){const _0x23d63c=a37_0x1bcf94;return'/api/harness/apps/'+encodeURIComponent(_0x35aa19)+_0x23d63c(0x195);}function scheduleItemPath(_0x28d57b,_0x43a0f9){return scheduleCollectionPath(_0x28d57b)+'/'+encodeURIComponent(_0x43a0f9);}const scheduleValidate={'service':a37_0x1bcf94(0x193),'command':a37_0x1bcf94(0x199),'description':a37_0x1bcf94(0x162),'risk':a37_0x1bcf94(0x18a),'flags':INPUT_FLAGS,async 'validate'(_0x282747){readScheduleInput(_0x282747);},async 'execute'(_0x3fda32){const _0x1ae924=a37_0x1bcf94,_0xb889da=readScheduleInput(_0x3fda32),_0x1d0592=await validateRuntimeSchedule(_0x3fda32['appCode'],_0xb889da);return{'ok':!![],'data':_0x1d0592,'message':_0x1ae924(0x15c)};}},scheduleCreate={'service':a37_0x1bcf94(0x193),'command':a37_0x1bcf94(0x185),'description':a37_0x1bcf94(0x16d),'risk':a37_0x1bcf94(0x1a3),'confirmationDescription':a37_0x1bcf94(0x173),'flags':INPUT_FLAGS,async 'validate'(_0x59f5d1){readScheduleInput(_0x59f5d1);},async 'execute'(_0x57f3c){const _0x58453a=a37_0x1bcf94,_0x17356e=readScheduleInput(_0x57f3c),_0x4c0910=await validateRuntimeSchedule(_0x57f3c[_0x58453a(0x196)],_0x17356e),_0x2f36db=await createRuntimeSchedule(_0x57f3c[_0x58453a(0x196)],_0x4c0910);return{'ok':!![],'data':_0x2f36db,'message':_0x58453a(0x192)+_0x2f36db[_0x58453a(0x19a)]+_0x58453a(0x172)+_0x2f36db[_0x58453a(0x165)]};},async 'dryRun'(_0x5f185a){const _0x57626a=a37_0x1bcf94,_0x30e929=readScheduleInput(_0x5f185a);return dryRun(_0x57626a(0x197),scheduleCollectionPath(_0x5f185a[_0x57626a(0x196)]))[_0x57626a(0x17c)](_0x30e929)[_0x57626a(0x160)](_0x57626a(0x15e))[_0x57626a(0x187)]();}},scheduleList={'service':'schedule','command':a37_0x1bcf94(0x188),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':a37_0x1bcf94(0x18a),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x47c8a7){const _0xf6351a=a37_0x1bcf94,_0x464243=_0x47c8a7['num']('limit');if(!Number[_0xf6351a(0x19b)](_0x464243)||_0x464243<0x1||_0x464243>0x64)throw CliErrors[_0xf6351a(0x16a)](_0xf6351a(0x17d));const _0x300888=_0x47c8a7[_0xf6351a(0x1a0)](_0xf6351a(0x189));if(_0x300888&&(_0x300888[_0xf6351a(0x168)]>0x400||_0x300888[_0xf6351a(0x15a)]()!==_0x300888))throw CliErrors[_0xf6351a(0x16a)](_0xf6351a(0x17a));},async 'execute'(_0x419757){const _0x3c6967=a37_0x1bcf94,_0x4bd508=_0x419757[_0x3c6967(0x1a0)]('cursor'),_0x34eb7d=await listRuntimeSchedules(_0x419757[_0x3c6967(0x196)],{'limit':_0x419757[_0x3c6967(0x161)](_0x3c6967(0x159)),..._0x4bd508?{'cursor':_0x4bd508}:{}});return{'ok':!![],'data':_0x34eb7d};}},scheduleDetail={'service':a37_0x1bcf94(0x193),'command':a37_0x1bcf94(0x17e),'description':a37_0x1bcf94(0x178),'risk':a37_0x1bcf94(0x18a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1c6920){const _0x44e87e=a37_0x1bcf94,_0x414e21=await getRuntimeSchedule(_0x1c6920[_0x44e87e(0x196)],_0x1c6920[_0x44e87e(0x1a0)](_0x44e87e(0x19d)));return{'ok':!![],'data':_0x414e21};}},scheduleRun={'service':a37_0x1bcf94(0x193),'command':'run','description':a37_0x1bcf94(0x18c),'risk':a37_0x1bcf94(0x1a3),'confirmationDescription':'将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x24b7ee){const _0xe3d4a8=a37_0x1bcf94,_0xc7618=_0x24b7ee['str'](_0xe3d4a8(0x19d)),_0x3b1396=await runRuntimeSchedule(_0x24b7ee[_0xe3d4a8(0x196)],_0xc7618);return{'ok':!![],'data':_0x3b1396,'message':'Queued\x20Task\x20'+_0x3b1396[_0xe3d4a8(0x184)]+_0xe3d4a8(0x17f)+_0xc7618};},async 'dryRun'(_0x3dfbb0){const _0x5154d8=a37_0x1bcf94,_0x2b33ce=_0x3dfbb0[_0x5154d8(0x1a0)]('schedule-id');return dryRun('POST',scheduleItemPath(_0x3dfbb0['appCode'],_0x2b33ce)+_0x5154d8(0x15b))[_0x5154d8(0x160)](_0x5154d8(0x174)+_0x2b33ce+_0x5154d8(0x176))[_0x5154d8(0x187)]();}},scheduleDelete={'service':'schedule','command':'delete','description':a37_0x1bcf94(0x15d),'risk':a37_0x1bcf94(0x1a3),'confirmationDescription':'将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x3b5f6c){const _0x17e72b=a37_0x1bcf94,_0x4b15a4=_0x3b5f6c[_0x17e72b(0x1a0)]('schedule-id'),_0x27c3c6=await deleteRuntimeSchedule(_0x3b5f6c[_0x17e72b(0x196)],_0x4b15a4);return{'ok':!![],'data':_0x27c3c6,'message':_0x17e72b(0x16f)+_0x4b15a4};},async 'dryRun'(_0x13ccbe){const _0x4c8db3=a37_0x1bcf94,_0x12490e=_0x13ccbe[_0x4c8db3(0x1a0)](_0x4c8db3(0x19d));return dryRun('DELETE',scheduleItemPath(_0x13ccbe[_0x4c8db3(0x196)],_0x12490e))['description'](_0x4c8db3(0x198)+_0x12490e)[_0x4c8db3(0x187)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- function a38_0x52ce(_0x1b5182,_0x4ac0d3){_0x1b5182=_0x1b5182-0xa8;const _0x2685a5=a38_0x2685();let _0x52cee0=_0x2685a5[_0x1b5182];return _0x52cee0;}const a38_0x2246dc=a38_0x52ce;(function(_0x5b200d,_0x54b413){const _0x34e7cc=a38_0x52ce,_0xc55c5e=_0x5b200d();while(!![]){try{const _0x3b9103=-parseInt(_0x34e7cc(0xb3))/0x1+parseInt(_0x34e7cc(0xad))/0x2+-parseInt(_0x34e7cc(0xb4))/0x3*(parseInt(_0x34e7cc(0xaa))/0x4)+-parseInt(_0x34e7cc(0xb1))/0x5*(parseInt(_0x34e7cc(0xb2))/0x6)+-parseInt(_0x34e7cc(0xa9))/0x7+parseInt(_0x34e7cc(0xa8))/0x8*(-parseInt(_0x34e7cc(0xac))/0x9)+parseInt(_0x34e7cc(0xb0))/0xa;if(_0x3b9103===_0x54b413)break;else _0xc55c5e['push'](_0xc55c5e['shift']());}catch(_0xd32bf4){_0xc55c5e['push'](_0xc55c5e['shift']());}}}(a38_0x2685,0xada9d));function a38_0x2685(){const _0x52b753=['303126wBntUF','320432QvNVjn','183leVNjm','6337096QxaOuU','4739105OeLXlR','29988iAXDNj','schema','9ilDokr','1500722bbfovu','Export\x20machine-readable\x20command\x20schema\x20(JSON)','export','23594280jWEhWR','15KhyBji'];a38_0x2685=function(){return _0x52b753;};return a38_0x2685();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x16092b){const _0x104392=await buildSchemaPayload();return{'ok':!![],'data':_0x104392};}export const schemaDefinition={'service':a38_0x2246dc(0xab),'command':a38_0x2246dc(0xaf),'description':a38_0x2246dc(0xae),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ function a38_0x4265(){const _0x2792a1=['22270BYIzvZ','8487gTtCqa','6723688PQhHeo','618136zNafew','2148pthjwZ','300054VMMXBt','17005YWZUsz','3628632jCUrUS','616817QzRNSv','read','32BCCtXE'];a38_0x4265=function(){return _0x2792a1;};return a38_0x4265();}const a38_0x3e50db=a38_0x4b5d;(function(_0x2dda8c,_0x5557b1){const _0x5ddc99=a38_0x4b5d,_0x5e86a3=_0x2dda8c();while(!![]){try{const _0x5505f2=parseInt(_0x5ddc99(0x106))/0x1+-parseInt(_0x5ddc99(0x10c))/0x2+-parseInt(_0x5ddc99(0x10e))/0x3*(parseInt(_0x5ddc99(0x108))/0x4)+-parseInt(_0x5ddc99(0x10f))/0x5*(parseInt(_0x5ddc99(0x10d))/0x6)+-parseInt(_0x5ddc99(0x110))/0x7+parseInt(_0x5ddc99(0x10b))/0x8+parseInt(_0x5ddc99(0x10a))/0x9*(parseInt(_0x5ddc99(0x109))/0xa);if(_0x5505f2===_0x5557b1)break;else _0x5e86a3['push'](_0x5e86a3['shift']());}catch(_0x40060e){_0x5e86a3['push'](_0x5e86a3['shift']());}}}(a38_0x4265,0xade01));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x4b5d(_0x328a28,_0x9c2bb6){_0x328a28=_0x328a28-0x106;const _0x426510=a38_0x4265();let _0x4b5d2e=_0x426510[_0x328a28];return _0x4b5d2e;}async function execute(_0x1a8164){const _0x2aa8c1=await buildSchemaPayload();return{'ok':!![],'data':_0x2aa8c1};}export const schemaDefinition={'service':'schema','command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a38_0x3e50db(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};