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

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 (128) 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/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/rate-limit.js +1 -1
  89. package/lib/framework/raw-flags.js +1 -1
  90. package/lib/framework/response.js +1 -1
  91. package/lib/framework/runner-confirmation.js +1 -1
  92. package/lib/framework/runner-error.js +1 -1
  93. package/lib/framework/runner.js +1 -1
  94. package/lib/framework/schema-export.js +1 -1
  95. package/lib/framework/service-order.js +1 -1
  96. package/lib/framework/types.js +1 -1
  97. package/lib/generated/build-info.d.ts +4 -4
  98. package/lib/generated/build-info.js +1 -1
  99. package/lib/help.js +1 -1
  100. package/lib/runtime/event.js +1 -1
  101. package/lib/runtime/index.js +1 -1
  102. package/lib/runtime/queue.js +1 -1
  103. package/lib/runtime/resolve.js +1 -1
  104. package/lib/skills/npx-skills-add.js +1 -1
  105. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  106. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  107. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  108. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  109. package/lib/skills/runtime-skill-sync/links.js +1 -1
  110. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  111. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  112. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  113. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  114. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  115. package/lib/skills/runtime-skill-sync/push.js +1 -1
  116. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  117. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  118. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  119. package/lib/skills/runtime-skill-sync.js +1 -1
  120. package/lib/utils/apply-jq-filter.js +1 -1
  121. package/lib/utils/logger.js +1 -1
  122. package/lib/utils/lossless-json.js +1 -1
  123. package/lib/utils/params.js +1 -1
  124. package/lib/utils/platform.js +1 -1
  125. package/lib/utils/update-notice.js +1 -1
  126. package/lib/utils/version.js +1 -1
  127. package/lib/utils/write-cli-side-channel.js +1 -1
  128. package/package.json +1 -1
@@ -1 +1 @@
1
- const a29_0x1f439e=a29_0x3bf6;(function(_0x3cfa86,_0xddb11b){const _0xac2bbc=a29_0x3bf6,_0x34add4=_0x3cfa86();while(!![]){try{const _0x145571=-parseInt(_0xac2bbc(0x135))/0x1+parseInt(_0xac2bbc(0x179))/0x2*(-parseInt(_0xac2bbc(0x187))/0x3)+-parseInt(_0xac2bbc(0x15a))/0x4*(-parseInt(_0xac2bbc(0x171))/0x5)+parseInt(_0xac2bbc(0x17c))/0x6+parseInt(_0xac2bbc(0x153))/0x7+parseInt(_0xac2bbc(0x158))/0x8+-parseInt(_0xac2bbc(0x15c))/0x9;if(_0x145571===_0xddb11b)break;else _0x34add4['push'](_0x34add4['shift']());}catch(_0x30092a){_0x34add4['push'](_0x34add4['shift']());}}}(a29_0x3653,0x41cee));import a29_0x26c375 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a29_0x3653(){const _0xa03181=['\x20\x20Auth','35760ZwryyQ','(none)','✗\x20Invalid\x20JSON','✓\x20Loaded','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','verbose','(missing)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','source','ClientAk','315237EFgagU','(no\x20file)','(default)','✓\x20Valid\x20JSON','serviceCount','registryPath','254579GIxSCp','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Merged\x20Config','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','path','bold','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20Files','pageSize','\x20\x20runtimeDomain:\x20\x20\x20','accessKey','serviceCode','arch','services','\x20\x20Service\x20Tree','commandCount','\x20\x20─','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','green','doctor','\x20(legacy/compat\x20only)','(removed\x20—\x20cookie\x20auth\x20disabled)','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(unnamed)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','1993453aoXzhT','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','version','read','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','4109456fTyMHt','message','58388SQYTro','log','1813563PIttif','missing','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','env','\x20\x20auth\x20(effective):\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default:\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','padEnd','gray','length','format','✗\x20Invalid','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','locale','yellow','repeat','defaultApp','45UMwhkU','currentApp','\x20Imported\x20from:\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty','\x20commands)','red','(not\x20found)','4rulAZC','\x20\x20API\x20Endpoints'];a29_0x3653=function(){return _0xa03181;};return a29_0x3653();}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_0x3bf6(_0x2d153e,_0x26b730){_0x2d153e=_0x2d153e-0x132;const _0x365397=a29_0x3653();let _0x3bf6dd=_0x365397[_0x2d153e];return _0x3bf6dd;}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x59cbc1){const _0x2b8424=a29_0x3bf6,_0x141e34=getCliVersion(),_0x3fe24f=buildConfigFromFlags({});await initGlobalEnvironment(_0x3fe24f),console[_0x2b8424(0x15b)](),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x13b)](CLI_BIN_NAME+_0x2b8424(0x15f))),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x168)]('─'['repeat'](0x32))),console[_0x2b8424(0x15b)](_0x2b8424(0x180)+_0x141e34),console[_0x2b8424(0x15b)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x2b8424(0x155)]),console[_0x2b8424(0x15b)](_0x2b8424(0x162)+process['platform']+'\x20'+process[_0x2b8424(0x143)]),console[_0x2b8424(0x15b)](),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x13b)](_0x2b8424(0x13e))),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x168)](_0x2b8424(0x147)[_0x2b8424(0x16f)](0x1e)));const _0x431778=getGlobalConfigPath(),_0xd9003a=getProjectConfigPath();console['log'](_0x2b8424(0x183)+(_0x431778||a29_0x26c375['gray'](_0x2b8424(0x178)))),console[_0x2b8424(0x15b)](_0x2b8424(0x157)+(_0xd9003a||a29_0x26c375[_0x2b8424(0x168)](_0x2b8424(0x178)))),console['log'](),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x13b)]('\x20\x20Config\x20JSON')),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x168)](_0x2b8424(0x147)[_0x2b8424(0x16f)](0x1e)));const _0x2ab6e0=(_0x186aaa,_0x5ca38b)=>{const _0x5ef880=_0x2b8424;if(!_0x5ca38b){console['log']('\x20\x20'+_0x186aaa['padEnd'](0x11)+'\x20'+a29_0x26c375['gray'](_0x5ef880(0x188)));return;}const _0x1ac4e0=inspectCliConfigJsonFile(_0x5ca38b);if(_0x1ac4e0[_0x5ef880(0x184)]==='ok')console[_0x5ef880(0x15b)]('\x20\x20'+_0x186aaa['padEnd'](0x11)+'\x20'+a29_0x26c375[_0x5ef880(0x14a)](_0x5ef880(0x132)));else{if(_0x1ac4e0[_0x5ef880(0x184)]===_0x5ef880(0x175))console[_0x5ef880(0x15b)]('\x20\x20'+_0x186aaa[_0x5ef880(0x167)](0x11)+'\x20'+a29_0x26c375[_0x5ef880(0x16e)](_0x5ef880(0x14e)));else _0x1ac4e0[_0x5ef880(0x184)]==='missing'?console[_0x5ef880(0x15b)]('\x20\x20'+_0x186aaa[_0x5ef880(0x167)](0x11)+'\x20'+a29_0x26c375['gray'](_0x5ef880(0x182))):(console['log']('\x20\x20'+_0x186aaa['padEnd'](0x11)+'\x20'+a29_0x26c375[_0x5ef880(0x177)](_0x5ef880(0x17e))),console[_0x5ef880(0x15b)]('\x20\x20'+''[_0x5ef880(0x167)](0x11)+'\x20'+a29_0x26c375['red'](_0x1ac4e0['message'])));}};_0x2ab6e0('Global',_0x431778),_0x2ab6e0('Project',_0xd9003a),console['log'](),console[_0x2b8424(0x15b)](a29_0x26c375['bold'](_0x2b8424(0x137))),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x168)]('\x20\x20─'['repeat'](0x1e))),console[_0x2b8424(0x15b)](_0x2b8424(0x154)+(_0x3fe24f[_0x2b8424(0x163)]||a29_0x26c375[_0x2b8424(0x177)]('(not\x20set)'))),console['log'](_0x2b8424(0x164)+_0x3fe24f[_0x2b8424(0x160)]);const _0x17d2d6=isLegacyCompatConfigKey(_0x2b8424(0x16d))?a29_0x26c375[_0x2b8424(0x168)](_0x3fe24f[_0x2b8424(0x16d)]+_0x2b8424(0x14c)):_0x3fe24f[_0x2b8424(0x16d)];console[_0x2b8424(0x15b)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x17d2d6),console[_0x2b8424(0x15b)](_0x2b8424(0x14f)+(_0x3fe24f[_0x2b8424(0x170)]||a29_0x26c375[_0x2b8424(0x168)]('(none)'))),console['log'](_0x2b8424(0x13d)+(_0x3fe24f[_0x2b8424(0x172)]||a29_0x26c375['gray'](_0x2b8424(0x17d)))),console['log'](_0x2b8424(0x15e)+(_0x3fe24f[_0x2b8424(0x16a)]||a29_0x26c375['gray'](_0x2b8424(0x165)+DEFAULT_CONFIG_VALUES[_0x2b8424(0x16a)]+')'))),console[_0x2b8424(0x15b)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3fe24f[_0x2b8424(0x13f)]??a29_0x26c375[_0x2b8424(0x168)](_0x2b8424(0x189)))),console[_0x2b8424(0x15b)](_0x2b8424(0x166)+_0x3fe24f['riskLevel']),console['log'](_0x2b8424(0x174)+_0x3fe24f[_0x2b8424(0x181)]),console['log'](_0x2b8424(0x161)+AUTH_MODE[_0x2b8424(0x186)]),console[_0x2b8424(0x15b)](_0x2b8424(0x138)+(_0x3fe24f[_0x2b8424(0x141)]?a29_0x26c375[_0x2b8424(0x14a)]('(set,\x20length='+_0x3fe24f[_0x2b8424(0x141)][_0x2b8424(0x169)]+')'):a29_0x26c375[_0x2b8424(0x168)]('(none)'))),console[_0x2b8424(0x15b)](),console[_0x2b8424(0x15b)](a29_0x26c375['bold'](_0x2b8424(0x17a))),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x168)](_0x2b8424(0x147)['repeat'](0x1e))),console['log'](_0x2b8424(0x149)+getApiDomain()),console[_0x2b8424(0x15b)](_0x2b8424(0x16c)+getUserDomain()),console['log'](_0x2b8424(0x140)+getRuntimeDomain()),console['log'](),console['log'](a29_0x26c375[_0x2b8424(0x13b)](_0x2b8424(0x145))),console[_0x2b8424(0x15b)](a29_0x26c375[_0x2b8424(0x168)](_0x2b8424(0x147)[_0x2b8424(0x16f)](0x1e)));const _0x50e8fe=inspectServiceRegistry();console['log'](_0x2b8424(0x13c)+_0x50e8fe[_0x2b8424(0x134)]),console[_0x2b8424(0x15b)](_0x2b8424(0x151)+formatServiceRegistryStatus(_0x50e8fe)),console[_0x2b8424(0x15b)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x50e8fe[_0x2b8424(0x133)]),console[_0x2b8424(0x15b)]('\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x50e8fe[_0x2b8424(0x146)]);for(const _0x4b5e64 of _0x50e8fe[_0x2b8424(0x144)]){console[_0x2b8424(0x15b)]('\x20\x20'+(_0x4b5e64[_0x2b8424(0x142)]+':')[_0x2b8424(0x167)](0x11)+'\x20'+(_0x4b5e64['name']||a29_0x26c375['gray'](_0x2b8424(0x150)))+'\x20('+_0x4b5e64[_0x2b8424(0x146)]+_0x2b8424(0x176)),console[_0x2b8424(0x15b)]('\x20\x20'+''[_0x2b8424(0x167)](0x11)+_0x2b8424(0x173)+_0x4b5e64[_0x2b8424(0x185)][_0x2b8424(0x13a)]);}return console[_0x2b8424(0x15b)](),console[_0x2b8424(0x15b)](a29_0x26c375['bold'](_0x2b8424(0x17b))),console['log'](a29_0x26c375[_0x2b8424(0x168)]('\x20\x20─'[_0x2b8424(0x16f)](0x1e))),console[_0x2b8424(0x15b)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0x26c375[_0x2b8424(0x14a)](AUTH_MODE[_0x2b8424(0x186)]+_0x2b8424(0x152))),console[_0x2b8424(0x15b)](_0x2b8424(0x148)+a29_0x26c375['gray'](_0x2b8424(0x14d))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x53c7b4){const _0x5d2113=a29_0x3bf6;if(_0x53c7b4[_0x5d2113(0x184)]==='ok')return a29_0x26c375[_0x5d2113(0x14a)](_0x5d2113(0x17f));if(_0x53c7b4[_0x5d2113(0x184)]===_0x5d2113(0x15d))return a29_0x26c375[_0x5d2113(0x168)](_0x5d2113(0x178));if(_0x53c7b4['status']===_0x5d2113(0x175))return a29_0x26c375[_0x5d2113(0x16e)](_0x5d2113(0x139));return a29_0x26c375[_0x5d2113(0x177)](_0x5d2113(0x16b)+(_0x53c7b4[_0x5d2113(0x159)]?':\x20'+_0x53c7b4[_0x5d2113(0x159)]:''));}export const doctorDefinition={'service':a29_0x1f439e(0x14b),'command':'check','description':a29_0x1f439e(0x136),'risk':a29_0x1f439e(0x156),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x5ddd5d=a29_0x1f38;(function(_0x1823f7,_0x33170e){const _0xdd8977=a29_0x1f38,_0x30724d=_0x1823f7();while(!![]){try{const _0x95f3d7=-parseInt(_0xdd8977(0x9c))/0x1*(-parseInt(_0xdd8977(0x94))/0x2)+parseInt(_0xdd8977(0x8e))/0x3*(-parseInt(_0xdd8977(0x9d))/0x4)+-parseInt(_0xdd8977(0xb7))/0x5*(parseInt(_0xdd8977(0xa0))/0x6)+-parseInt(_0xdd8977(0x6f))/0x7+-parseInt(_0xdd8977(0x65))/0x8*(-parseInt(_0xdd8977(0xa5))/0x9)+-parseInt(_0xdd8977(0x8a))/0xa+parseInt(_0xdd8977(0xb8))/0xb;if(_0x95f3d7===_0x33170e)break;else _0x30724d['push'](_0x30724d['shift']());}catch(_0x4527e4){_0x30724d['push'](_0x30724d['shift']());}}}(a29_0x4399,0xacf7d));import a29_0x5d7c31 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a29_0x1f38(_0x5592db,_0x295ff8){_0x5592db=_0x5592db-0x64;const _0x4399e6=a29_0x4399();let _0x1f381b=_0x4399e6[_0x5592db];return _0x1f381b;}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_0x4399(){const _0x5e66c3=['\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','305zbghDA','10296880FswKEa','\x20(accessKey)','locale','\x20doctor','gray','33688PguYau','status','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','(not\x20found)','(default)','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','appCode','2671431DQXuiX','doctor','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','Project','\x20\x20Service\x20Tree','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','\x20\x20API\x20Endpoints','\x20commands)','(default:\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','currentApp','✓\x20Loaded','bold','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','platform','env','format','4129940dHhtMg','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Merged\x20Config','12ZfFGSG','empty','services','serviceCode','serviceCount','(set,\x20length=','1507028LNlyEk','padEnd','verbose','yellow','read','defaultApp','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','log','1eqktoY','290552AIgSCr','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(none)','115266Wrctxx','ClientAk','✓\x20Valid\x20JSON','name','version','2727QNXVFm','\x20\x20─','repeat','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','registryPath','\x20\x20Config\x20JSON','check','red','(unnamed)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','green','message','riskLevel','(no\x20file)'];a29_0x4399=function(){return _0x5e66c3;};return a29_0x4399();}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x97c1b8){const _0xad34f5=a29_0x1f38,_0x4c2e6d=getCliVersion(),_0x33a3f1=buildConfigFromFlags({});await initGlobalEnvironment(_0x33a3f1),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x85)](CLI_BIN_NAME+_0xad34f5(0xbb))),console['log'](a29_0x5d7c31[_0xad34f5(0x64)]('─'[_0xad34f5(0xa7)](0x32))),console[_0xad34f5(0x9b)](_0xad34f5(0x6d)+_0x4c2e6d),console[_0xad34f5(0x9b)](_0xad34f5(0xb6)+process[_0xad34f5(0xa4)]),console[_0xad34f5(0x9b)](_0xad34f5(0x80)+process[_0xad34f5(0x87)]+'\x20'+process['arch']),console[_0xad34f5(0x9b)](),console['log'](a29_0x5d7c31[_0xad34f5(0x85)]('\x20\x20Config\x20Files')),console['log'](a29_0x5d7c31[_0xad34f5(0x64)]('\x20\x20─'[_0xad34f5(0xa7)](0x1e)));const _0x225e7d=getGlobalConfigPath(),_0x26e60f=getProjectConfigPath();console[_0xad34f5(0x9b)](_0xad34f5(0x71)+(_0x225e7d||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x6b)))),console[_0xad34f5(0x9b)](_0xad34f5(0xa8)+(_0x26e60f||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x6b)))),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x85)](_0xad34f5(0xaa))),console[_0xad34f5(0x9b)](a29_0x5d7c31['gray']('\x20\x20─'[_0xad34f5(0xa7)](0x1e)));const _0x301bc=(_0x108fd2,_0x43aa47)=>{const _0x1522bf=_0xad34f5;if(!_0x43aa47){console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0x64)](_0x1522bf(0xb3)));return;}const _0x119510=inspectCliConfigJsonFile(_0x43aa47);if(_0x119510[_0x1522bf(0x66)]==='ok')console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2['padEnd'](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0xb0)](_0x1522bf(0xa2)));else{if(_0x119510[_0x1522bf(0x66)]===_0x1522bf(0x8f))console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0x97)](_0x1522bf(0xb5)));else _0x119510[_0x1522bf(0x66)]===_0x1522bf(0x72)?console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0x64)]('(missing)')):(console[_0x1522bf(0x9b)]('\x20\x20'+_0x108fd2['padEnd'](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0xac)]('✗\x20Invalid\x20JSON')),console[_0x1522bf(0x9b)]('\x20\x20'+''[_0x1522bf(0x95)](0x11)+'\x20'+a29_0x5d7c31[_0x1522bf(0xac)](_0x119510[_0x1522bf(0xb1)])));}};_0x301bc('Global',_0x225e7d),_0x301bc(_0xad34f5(0x77),_0x26e60f),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x85)](_0xad34f5(0x8d))),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0xa6)[_0xad34f5(0xa7)](0x1e))),console[_0xad34f5(0x9b)](_0xad34f5(0x81)+(_0x33a3f1[_0xad34f5(0x6e)]||a29_0x5d7c31[_0xad34f5(0xac)]('(not\x20set)'))),console[_0xad34f5(0x9b)](_0xad34f5(0x7b)+_0x33a3f1[_0xad34f5(0x88)]);const _0x581c94=isLegacyCompatConfigKey(_0xad34f5(0xba))?a29_0x5d7c31[_0xad34f5(0x64)](_0x33a3f1[_0xad34f5(0xba)]+'\x20(legacy/compat\x20only)'):_0x33a3f1[_0xad34f5(0xba)];console['log'](_0xad34f5(0x68)+_0x581c94),console[_0xad34f5(0x9b)](_0xad34f5(0x9e)+(_0x33a3f1[_0xad34f5(0x99)]||a29_0x5d7c31[_0xad34f5(0x64)]('(none)'))),console[_0xad34f5(0x9b)](_0xad34f5(0x86)+(_0x33a3f1[_0xad34f5(0x83)]||a29_0x5d7c31['gray'](_0xad34f5(0x9f)))),console['log']('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x33a3f1[_0xad34f5(0x89)]||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x7f)+DEFAULT_CONFIG_VALUES[_0xad34f5(0x89)]+')'))),console[_0xad34f5(0x9b)](_0xad34f5(0x75)+(_0x33a3f1['pageSize']??a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x6c)))),console[_0xad34f5(0x9b)](_0xad34f5(0x82)+_0x33a3f1[_0xad34f5(0xb2)]),console[_0xad34f5(0x9b)](_0xad34f5(0xae)+_0x33a3f1[_0xad34f5(0x96)]),console[_0xad34f5(0x9b)](_0xad34f5(0x6a)+AUTH_MODE['ClientAk']),console['log'](_0xad34f5(0xb4)+(_0x33a3f1['accessKey']?a29_0x5d7c31[_0xad34f5(0xb0)](_0xad34f5(0x93)+_0x33a3f1[_0xad34f5(0x76)]['length']+')'):a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x9f)))),console[_0xad34f5(0x9b)](),console[_0xad34f5(0x9b)](a29_0x5d7c31['bold'](_0xad34f5(0x7d))),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)]('\x20\x20─'[_0xad34f5(0xa7)](0x1e))),console[_0xad34f5(0x9b)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0xad34f5(0x9b)](_0xad34f5(0x7a)+getUserDomain()),console['log'](_0xad34f5(0x8c)+getRuntimeDomain()),console[_0xad34f5(0x9b)](),console['log'](a29_0x5d7c31[_0xad34f5(0x85)](_0xad34f5(0x78))),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)]('\x20\x20─'[_0xad34f5(0xa7)](0x1e)));const _0x533f08=inspectServiceRegistry();console[_0xad34f5(0x9b)](_0xad34f5(0x9a)+_0x533f08[_0xad34f5(0xa9)]),console[_0xad34f5(0x9b)](_0xad34f5(0x69)+formatServiceRegistryStatus(_0x533f08)),console[_0xad34f5(0x9b)](_0xad34f5(0x73)+_0x533f08[_0xad34f5(0x92)]),console[_0xad34f5(0x9b)](_0xad34f5(0xaf)+_0x533f08[_0xad34f5(0x7c)]);for(const _0x204014 of _0x533f08[_0xad34f5(0x90)]){console['log']('\x20\x20'+(_0x204014[_0xad34f5(0x91)]+':')['padEnd'](0x11)+'\x20'+(_0x204014[_0xad34f5(0xa3)]||a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0xad)))+'\x20('+_0x204014[_0xad34f5(0x7c)]+_0xad34f5(0x7e)),console[_0xad34f5(0x9b)]('\x20\x20'+''[_0xad34f5(0x95)](0x11)+'\x20Imported\x20from:\x20'+_0x204014['source']['path']);}return console[_0xad34f5(0x9b)](),console['log'](a29_0x5d7c31[_0xad34f5(0x85)]('\x20\x20Auth')),console[_0xad34f5(0x9b)](a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0xa6)[_0xad34f5(0xa7)](0x1e))),console[_0xad34f5(0x9b)](_0xad34f5(0x8b)+a29_0x5d7c31[_0xad34f5(0xb0)](AUTH_MODE[_0xad34f5(0xa1)]+_0xad34f5(0xb9))),console[_0xad34f5(0x9b)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x5d7c31[_0xad34f5(0x64)](_0xad34f5(0x67))),console[_0xad34f5(0x9b)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2c36c3){const _0x37a0c3=a29_0x1f38;if(_0x2c36c3['status']==='ok')return a29_0x5d7c31[_0x37a0c3(0xb0)](_0x37a0c3(0x84));if(_0x2c36c3[_0x37a0c3(0x66)]===_0x37a0c3(0x72))return a29_0x5d7c31[_0x37a0c3(0x64)]('(not\x20found)');if(_0x2c36c3[_0x37a0c3(0x66)]===_0x37a0c3(0x8f))return a29_0x5d7c31[_0x37a0c3(0x97)](_0x37a0c3(0x74));return a29_0x5d7c31[_0x37a0c3(0xac)]('✗\x20Invalid'+(_0x2c36c3['message']?':\x20'+_0x2c36c3[_0x37a0c3(0xb1)]:''));}export const doctorDefinition={'service':a29_0x5ddd5d(0x70),'command':a29_0x5ddd5d(0xab),'description':a29_0x5ddd5d(0x79),'risk':a29_0x5ddd5d(0x98),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x597ec5=a30_0x310a;function a30_0x310a(_0x25cf22,_0x5c66c3){_0x25cf22=_0x25cf22-0x8a;const _0xb11f87=a30_0xb11f();let _0x310ae3=_0xb11f87[_0x25cf22];return _0x310ae3;}(function(_0x40601e,_0x559713){const _0x554e21=a30_0x310a,_0x4b5b1e=_0x40601e();while(!![]){try{const _0x40c8e4=parseInt(_0x554e21(0x94))/0x1+parseInt(_0x554e21(0x99))/0x2*(-parseInt(_0x554e21(0xaa))/0x3)+parseInt(_0x554e21(0x97))/0x4+parseInt(_0x554e21(0xa9))/0x5+parseInt(_0x554e21(0xad))/0x6*(-parseInt(_0x554e21(0xa5))/0x7)+-parseInt(_0x554e21(0x9d))/0x8*(parseInt(_0x554e21(0x92))/0x9)+parseInt(_0x554e21(0xab))/0xa;if(_0x40c8e4===_0x559713)break;else _0x4b5b1e['push'](_0x4b5b1e['shift']());}catch(_0x57c25f){_0x4b5b1e['push'](_0x4b5b1e['shift']());}}}(a30_0xb11f,0x997b8));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a30_0xb11f(){const _0x155c81=['read','POST','boolean','203PXjhoV','filepath','str','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','5150960iBVXHO','3bqspBX','6107300ymGhzl','/client/uploadFile','12288xPqzAT','write','Preview:\x20upload\x20','Uploaded\x20file:\x20','File','Path\x20to\x20the\x20local\x20file\x20to\x20upload','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','bool','string','filePath','upload','27kWBCkb','appCode','89887gmJbku','description','path','2727248zyeCHf','build','2486214RiZule','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','file','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','1283888vDsLuf','body','query-url','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','\x20to\x20runtime\x20app\x20'];a30_0xb11f=function(){return _0x155c81;};return a30_0xb11f();}const FILE_FLAG={'name':a30_0x597ec5(0x9b),'type':'string','required':!![],'description':a30_0x597ec5(0x8c)},FILEPATH_FLAG={'name':a30_0x597ec5(0xa6),'type':a30_0x597ec5(0x8f),'required':!![],'description':a30_0x597ec5(0x9c)},DOWNLOAD_FLAG={'name':'download','type':a30_0x597ec5(0xa4),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':'long-term','type':a30_0x597ec5(0xa4),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x4c46b9){const _0x45c248=_0x4c46b9['trim']();if(!_0x45c248)throw CliErrors['validation']('filePath\x20is\x20required.');return _0x45c248;}const fileUpload={'service':a30_0x597ec5(0x9b),'command':a30_0x597ec5(0x91),'description':a30_0x597ec5(0xa0),'risk':a30_0x597ec5(0xae),'flags':[FILE_FLAG],async 'dryRun'(_0x14604b){const _0x2eddf4=a30_0x597ec5,_0xc3f80d=requireRuntimeUploadFile(_0x14604b[_0x2eddf4(0xa7)](_0x2eddf4(0x9b)),'File');return dryRun(_0x2eddf4(0xa3),_0x2eddf4(0xac))[_0x2eddf4(0x9e)]({'appCode':_0x14604b[_0x2eddf4(0x93)],'multipart':{'file':_0xc3f80d}})[_0x2eddf4(0x95)](_0x2eddf4(0xaf)+_0xc3f80d['path']+_0x2eddf4(0xa1)+_0x14604b[_0x2eddf4(0x93)])[_0x2eddf4(0x98)]();},async 'execute'(_0x335c33){const _0x101b41=a30_0x597ec5,_0x5564d9=requireRuntimeUploadFile(_0x335c33['str']('file'),_0x101b41(0x8b)),_0x542987=await uploadRuntimeFile(_0x335c33[_0x101b41(0x93)],_0x5564d9[_0x101b41(0x96)]);return{'ok':!![],'data':_0x542987,'message':_0x542987[_0x101b41(0x90)]?_0x101b41(0x8a)+_0x542987[_0x101b41(0x90)]+_0x101b41(0x8d):_0x101b41(0x9a)};}},fileQueryUrl={'service':'file','command':a30_0x597ec5(0x9f),'description':a30_0x597ec5(0xa8),'risk':a30_0x597ec5(0xa2),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x36cf23){const _0x363fb9=a30_0x597ec5,_0x274a46=requireFilePath(_0x36cf23[_0x363fb9(0xa7)]('filepath')),_0x1b8e2d=await queryRuntimeFileUrl(_0x274a46,{'download':_0x36cf23[_0x363fb9(0x8e)]('download'),'longTerm':_0x36cf23[_0x363fb9(0x8e)]('long-term')});return{'ok':!![],'data':_0x1b8e2d};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x28e410=a30_0x56de;(function(_0x52b705,_0x321f53){const _0x4ec36a=a30_0x56de,_0x1213b4=_0x52b705();while(!![]){try{const _0x3df847=-parseInt(_0x4ec36a(0xf5))/0x1*(-parseInt(_0x4ec36a(0xe4))/0x2)+-parseInt(_0x4ec36a(0x102))/0x3+-parseInt(_0x4ec36a(0xda))/0x4+-parseInt(_0x4ec36a(0xe1))/0x5+-parseInt(_0x4ec36a(0xf3))/0x6*(parseInt(_0x4ec36a(0xdb))/0x7)+parseInt(_0x4ec36a(0xdd))/0x8*(-parseInt(_0x4ec36a(0xe6))/0x9)+parseInt(_0x4ec36a(0xf9))/0xa;if(_0x3df847===_0x321f53)break;else _0x1213b4['push'](_0x1213b4['shift']());}catch(_0x242ac7){_0x1213b4['push'](_0x1213b4['shift']());}}}(a30_0x5e07,0x36d9c));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x56de(_0x26d72a,_0x234645){_0x26d72a=_0x26d72a-0xda;const _0x5e0725=a30_0x5e07();let _0x56de5a=_0x5e0725[_0x26d72a];return _0x56de5a;}function a30_0x5e07(){const _0xc7c848=['2574XYgdhu','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','\x20to\x20runtime\x20app\x20','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','File','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','path','body','/client/uploadFile','filePath\x20is\x20required.','build','bool','filepath','18DsuXJx','string','10xEKTUZ','str','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','boolean','11265400DoqdIb','Path\x20to\x20the\x20local\x20file\x20to\x20upload','query-url','appCode','trim','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','filePath','upload','file','519534WZmZst','1393648cFDHHs','1687EITCpN','download','6752SAeNnC','long-term','Uploaded\x20file:\x20','description','1375125GOCefB','POST','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','27370GjRPKi','Preview:\x20upload\x20'];a30_0x5e07=function(){return _0xc7c848;};return a30_0x5e07();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x28e410(0x101),'type':a30_0x28e410(0xf4),'required':!![],'description':a30_0x28e410(0xfa)},FILEPATH_FLAG={'name':a30_0x28e410(0xf2),'type':'string','required':!![],'description':a30_0x28e410(0xe9)},DOWNLOAD_FLAG={'name':a30_0x28e410(0xdc),'type':a30_0x28e410(0xf8),'description':a30_0x28e410(0xf7)},LONG_TERM_FLAG={'name':a30_0x28e410(0xde),'type':a30_0x28e410(0xf8),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x2d1435){const _0x5dd292=a30_0x28e410,_0x52f2e6=_0x2d1435[_0x5dd292(0xfd)]();if(!_0x52f2e6)throw CliErrors['validation'](_0x5dd292(0xef));return _0x52f2e6;}const fileUpload={'service':a30_0x28e410(0x101),'command':a30_0x28e410(0x100),'description':a30_0x28e410(0xe3),'risk':'write','flags':[FILE_FLAG],async 'dryRun'(_0x5ac52e){const _0x50c95f=a30_0x28e410,_0x12b365=requireRuntimeUploadFile(_0x5ac52e['str'](_0x50c95f(0x101)),'File');return dryRun(_0x50c95f(0xe2),_0x50c95f(0xee))[_0x50c95f(0xed)]({'appCode':_0x5ac52e['appCode'],'multipart':{'file':_0x12b365}})[_0x50c95f(0xe0)](_0x50c95f(0xe5)+_0x12b365['path']+_0x50c95f(0xe8)+_0x5ac52e[_0x50c95f(0xfc)])[_0x50c95f(0xf0)]();},async 'execute'(_0x3d0f3f){const _0x3c540b=a30_0x28e410,_0x48a16f=requireRuntimeUploadFile(_0x3d0f3f[_0x3c540b(0xf6)](_0x3c540b(0x101)),_0x3c540b(0xea)),_0x83e8=await uploadRuntimeFile(_0x3d0f3f['appCode'],_0x48a16f[_0x3c540b(0xec)]);return{'ok':!![],'data':_0x83e8,'message':_0x83e8[_0x3c540b(0xff)]?_0x3c540b(0xdf)+_0x83e8[_0x3c540b(0xff)]+_0x3c540b(0xe7):_0x3c540b(0xeb)};}},fileQueryUrl={'service':a30_0x28e410(0x101),'command':a30_0x28e410(0xfb),'description':a30_0x28e410(0xfe),'risk':'read','flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x1ac934){const _0x1b7487=a30_0x28e410,_0x432e67=requireFilePath(_0x1ac934[_0x1b7487(0xf6)](_0x1b7487(0xf2))),_0x19215f=await queryRuntimeFileUrl(_0x432e67,{'download':_0x1ac934['bool']('download'),'longTerm':_0x1ac934[_0x1b7487(0xf1)](_0x1b7487(0xde))});return{'ok':!![],'data':_0x19215f};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x29554f=a31_0xf3c6;(function(_0x2ce32a,_0x17aa7e){const _0x2f5146=a31_0xf3c6,_0x2e43ea=_0x2ce32a();while(!![]){try{const _0x40c28e=parseInt(_0x2f5146(0x1c3))/0x1+-parseInt(_0x2f5146(0x1d7))/0x2*(-parseInt(_0x2f5146(0x1cb))/0x3)+-parseInt(_0x2f5146(0x1ac))/0x4*(parseInt(_0x2f5146(0x1bb))/0x5)+parseInt(_0x2f5146(0x1b2))/0x6+parseInt(_0x2f5146(0x1d4))/0x7+parseInt(_0x2f5146(0x1bf))/0x8*(-parseInt(_0x2f5146(0x1a3))/0x9)+-parseInt(_0x2f5146(0x1c7))/0xa;if(_0x40c28e===_0x17aa7e)break;else _0x2e43ea['push'](_0x2e43ea['shift']());}catch(_0x4efd27){_0x2e43ea['push'](_0x2e43ea['shift']());}}}(a31_0x1ba4,0xe4322));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':a31_0x29554f(0x1c1),'type':'string','description':a31_0x29554f(0x1c4)},{'name':a31_0x29554f(0x19c),'type':a31_0x29554f(0x1b3),'description':a31_0x29554f(0x19e)+DEFAULT_CONFIG_VALUES[a31_0x29554f(0x19c)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x29554f(0x1be),'type':a31_0x29554f(0x1c6),'description':a31_0x29554f(0x1db)+PRODUCT_CONFIG['newConfigFileName']+a31_0x29554f(0x1d3),'default':![]},{'name':a31_0x29554f(0x1bd),'type':a31_0x29554f(0x1c6),'description':a31_0x29554f(0x1d1),'default':![]}];export const initImportFlagDefs=[{'name':a31_0x29554f(0x1d5),'type':'string','description':a31_0x29554f(0x1a0),'required':!![]},{'name':'appcode','type':a31_0x29554f(0x1b3),'description':a31_0x29554f(0x19f)},{'name':a31_0x29554f(0x19c),'type':a31_0x29554f(0x1b3),'description':a31_0x29554f(0x1b1),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x29554f(0x1be),'type':a31_0x29554f(0x1c6),'description':a31_0x29554f(0x1db)+PRODUCT_CONFIG['newConfigFileName']+a31_0x29554f(0x1d3),'default':![]},{'name':a31_0x29554f(0x1bd),'type':a31_0x29554f(0x1c6),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];function a31_0x1ba4(){const _0x36e28e=['apps','Aborted.','removeListener','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','SIGINT','60cWQxxY','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Invalid\x20env\x20\x22','defaultApp','validation','Override\x20imported\x20default\x20env','10218660JyUNsc','string','\x0aInitialized\x20','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','log','app','apiDir','object','cancelled','91225jHySFd','project','yes','global','3928XQePFj','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`.','appcode','once','45099bnSOLm','App\x20code\x20for\x20the\x20project','flagMissing','boolean','16868290fTfpQB','stdin','stdout','):\x20','311385aFVsbg','\x22.\x20Allowed:\x20','[Y/n]','App\x20code\x20cannot\x20be\x20empty.','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','trim','Skip\x20confirmation\x20when\x20overwriting','includes',')\x20instead\x20of\x20project','8823563DzWXbU','file','message','4RRcpeY','race','App\x20code','\x20\x20env:\x20\x20\x20\x20\x20','Write\x20to\x20global\x20(~/','riskLevel','Initialized\x20','\x20\x20config:\x20\x20','entries','User\x20aborted\x20prompt','Source\x20file\x20not\x20found:\x20','toLowerCase','close','env','name','Target\x20environment\x20(default\x20','Override\x20imported\x20default\x20appcode','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','\x20\x20appcode:\x20','parse','5886VnpjaA','cwd','[y/N]','Failed\x20to\x20parse\x20source\x20file:\x20'];a31_0x1ba4=function(){return _0x36e28e;};return a31_0x1ba4();}export async function runInit(_0x974b17){const _0x1cec18=a31_0x29554f,_0x181033=isNonInteractiveMode(_0x974b17),_0x4c916a=_0x974b17[_0x1cec18(0x1be)]?'global':_0x1cec18(0x1bc),_0x133b68=resolveWriteConfigPath(_0x4c916a);try{_0x181033?await runNonInteractive(_0x974b17,_0x133b68):await runInteractive(_0x974b17,_0x133b68);}catch(_0x263d21){if(_0x263d21 instanceof AbortPrompt)throw CliErrors[_0x1cec18(0x1ba)]();throw _0x263d21;}}export async function runInitImport(_0x5d08ca){const _0x16d455=a31_0x29554f,_0x22d084=_0x5d08ca[_0x16d455(0x1be)]?_0x16d455(0x1be):'project',_0xd60604=resolveWriteConfigPath(_0x22d084);await runFromImport(_0x5d08ca,_0xd60604);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x29554f(0x1b8)]);async function runFromImport(_0xe8eb23,_0x4291ba){const _0x5b0f30=a31_0x29554f,_0x2b444c=resolveFilePath(_0xe8eb23[_0x5b0f30(0x1d5)]);if(!existsSync(_0x2b444c))throw CliErrors[_0x5b0f30(0x1b0)](_0x5b0f30(0x1e1)+_0x2b444c);const _0x5da79c=readSourceFile(_0x2b444c),_0x5b30d7=convertToRuntimeConfig(_0x5da79c);_0xe8eb23[_0x5b0f30(0x1c1)]&&(_0x5b30d7[_0x5b0f30(0x1c1)]=String(_0xe8eb23['appcode']));_0xe8eb23[_0x5b0f30(0x19c)]&&(_0x5b30d7['env']=resolveInitEnv(_0xe8eb23));if(!_0x5b30d7[_0x5b0f30(0x1c1)])throw CliErrors[_0x5b0f30(0x1b0)](_0x5b0f30(0x1ad),_0x5b0f30(0x1c0));await writeInitConfig(_0x4291ba,_0x5b30d7,_0xe8eb23),console[_0x5b0f30(0x1b6)]('Imported\x20from\x20'+_0x2b444c),console[_0x5b0f30(0x1b6)](_0x5b0f30(0x1de)+_0x4291ba),console[_0x5b0f30(0x1b6)](_0x5b0f30(0x1a1)+_0x5b30d7[_0x5b0f30(0x1c1)]);if(_0x5b30d7[_0x5b0f30(0x1af)])console[_0x5b0f30(0x1b6)]('\x20\x20default:\x20'+_0x5b30d7['defaultApp']);}function convertToRuntimeConfig(_0x486e81){const _0x42f292=a31_0x29554f;if(_0x486e81[_0x42f292(0x1a7)]&&typeof _0x486e81[_0x42f292(0x1a7)]===_0x42f292(0x1b9))throw CliErrors[_0x42f292(0x1b0)](_0x42f292(0x1cf),_0x42f292(0x1aa));const _0x1d4d03={};for(const _0x1ff6c2 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x486e81[_0x1ff6c2]!==undefined&&(_0x1d4d03[_0x1ff6c2]=_0x486e81[_0x1ff6c2]);}return!_0x1d4d03[_0x42f292(0x1dc)]&&(_0x1d4d03[_0x42f292(0x1dc)]=DEFAULT_CONFIG_VALUES[_0x42f292(0x1dc)]),_0x1d4d03;}async function runNonInteractive(_0xda659d,_0x480c1b){const _0x4d3bc5=a31_0x29554f,_0x1cf92d=_0xda659d[_0x4d3bc5(0x1c1)];if(!_0x1cf92d)throw CliErrors[_0x4d3bc5(0x1c5)](_0x4d3bc5(0x1c1),'Usage:\x20'+CLI_BIN_NAME+_0x4d3bc5(0x1b5));const _0x3f28e5=resolveInitEnv(_0xda659d);await writeInitConfig(_0x480c1b,{'appcode':_0x1cf92d,'env':_0x3f28e5},_0xda659d),console[_0x4d3bc5(0x1b6)](_0x4d3bc5(0x1dd)+_0x480c1b),console[_0x4d3bc5(0x1b6)](_0x4d3bc5(0x1a1)+_0x1cf92d),console['log']('\x20\x20env:\x20\x20\x20\x20\x20'+_0x3f28e5);}async function runInteractive(_0x6ebcac,_0xb72f9b){const _0x4bad59=a31_0x29554f,_0x324d59=loadExisting(_0xb72f9b),_0x128f3c=typeof _0x324d59?.[_0x4bad59(0x1c1)]===_0x4bad59(0x1b3)?_0x324d59[_0x4bad59(0x1c1)]:'',_0x3d8a5f=resolveInitEnv(_0x6ebcac);console['log'](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG['newConfigFileName']+'\x0a');if(existsSync(_0xb72f9b)&&!_0x6ebcac[_0x4bad59(0x1bd)]){const _0x80219a=await promptYesNo('File\x20'+_0xb72f9b+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x80219a){console[_0x4bad59(0x1b6)](_0x4bad59(0x1a8));return;}}const _0x51824d=typeof _0x6ebcac['appcode']===_0x4bad59(0x1b3)?_0x6ebcac[_0x4bad59(0x1c1)]['trim']():'';let _0x5d85fe=_0x51824d;!_0x5d85fe&&(_0x5d85fe=await promptInput(_0x4bad59(0x1d9),_0x128f3c));if(!_0x5d85fe[_0x4bad59(0x1d0)]())throw CliErrors[_0x4bad59(0x1b0)](_0x4bad59(0x1ce));await writeInitConfig(_0xb72f9b,{'appcode':_0x5d85fe['trim'](),'env':_0x3d8a5f},_0x6ebcac),console[_0x4bad59(0x1b6)](_0x4bad59(0x1b4)+_0xb72f9b),console[_0x4bad59(0x1b6)]('\x20\x20appcode:\x20'+_0x5d85fe['trim']()),console[_0x4bad59(0x1b6)](_0x4bad59(0x1da)+_0x3d8a5f);}async function writeInitConfig(_0x33db92,_0x1046a7,_0x45de76){const _0x1c517e=a31_0x29554f;let _0x566f55={};existsSync(_0x33db92)&&!_0x45de76[_0x1c517e(0x1bd)]&&(_0x566f55=readConfigFile(_0x33db92));for(const [_0x4ed219,_0x5cd337]of Object[_0x1c517e(0x1df)](_0x1046a7)){_0x5cd337!==undefined&&(_0x566f55[_0x4ed219]=_0x5cd337);}if(_0x566f55[_0x1c517e(0x1b7)])delete _0x566f55[_0x1c517e(0x1b7)];writeConfigFile(_0x33db92,_0x566f55);}function a31_0xf3c6(_0x4bbe3c,_0x220225){_0x4bbe3c=_0x4bbe3c-0x19b;const _0x1ba4a2=a31_0x1ba4();let _0xf3c627=_0x1ba4a2[_0x4bbe3c];return _0xf3c627;}class AbortPrompt extends Error{constructor(){const _0x5d8f4a=a31_0x29554f;super(_0x5d8f4a(0x1e0)),this[_0x5d8f4a(0x19d)]='AbortPrompt';}}function createSafeRl(){const _0x583e25=a31_0x29554f,_0x1e628e=createInterface({'input':process[_0x583e25(0x1c8)],'output':process[_0x583e25(0x1c9)]});let _0x3da64d;const _0x2157aa=new Promise((_0x2c99a6,_0x1fdcec)=>{const _0x2131ab=_0x583e25;_0x3da64d=()=>{_0x3da64d&&(_0x1e628e['removeListener']('SIGINT',_0x3da64d),_0x3da64d=undefined);try{_0x1e628e['close']();}catch{}_0x1fdcec(new AbortPrompt());},_0x1e628e[_0x2131ab(0x1c2)]('SIGINT',_0x3da64d);}),_0x29e149=()=>{const _0x421414=_0x583e25;_0x3da64d&&(_0x1e628e[_0x421414(0x1a9)](_0x421414(0x1ab),_0x3da64d),_0x3da64d=undefined);try{_0x1e628e[_0x421414(0x19b)]();}catch{}};return{'rl':_0x1e628e,'abortPromise':_0x2157aa,'disposeSuccess':_0x29e149};}async function promptInput(_0x5bc13a,_0x48b4e4){const {rl:_0x189eb8,abortPromise:_0x2cc0dd,disposeSuccess:_0x55c271}=createSafeRl(),_0x3e1871=new Promise(_0x8764da=>{const _0x3f7088=a31_0xf3c6,_0x4d94ea=_0x48b4e4?'\x20\x20'+_0x5bc13a+'\x20('+_0x48b4e4+_0x3f7088(0x1ca):'\x20\x20'+_0x5bc13a+':\x20';_0x189eb8['question'](_0x4d94ea,_0x33c13f=>{const _0xed5f12=_0x3f7088;_0x55c271(),_0x8764da(_0x33c13f[_0xed5f12(0x1d0)]()||_0x48b4e4);});});return Promise['race']([_0x3e1871,_0x2cc0dd]);}async function promptYesNo(_0x5513a5,_0x1f3a99){const _0x4b08d=a31_0x29554f,{rl:_0xe32136,abortPromise:_0x481f13,disposeSuccess:_0x11d8ad}=createSafeRl(),_0x27ff19=new Promise(_0x1b6443=>{const _0xc95b21=a31_0xf3c6,_0x33eb58=_0x1f3a99?_0xc95b21(0x1cd):_0xc95b21(0x1a5);_0xe32136['question']('\x20\x20'+_0x5513a5+'\x20'+_0x33eb58+':\x20',_0x16ad9d=>{const _0x3277b4=_0xc95b21;_0x11d8ad();const _0x10bd75=_0x16ad9d[_0x3277b4(0x1d0)]()[_0x3277b4(0x1e2)]();if(_0x10bd75==='y'||_0x10bd75===_0x3277b4(0x1bd))_0x1b6443(!![]);else{if(_0x10bd75==='n'||_0x10bd75==='no')_0x1b6443(![]);else _0x1b6443(_0x1f3a99);}});});return Promise[_0x4b08d(0x1d8)]([_0x27ff19,_0x481f13]);}function loadExisting(_0x251fba){if(!existsSync(_0x251fba))return null;return readConfigFile(_0x251fba);}function resolveFilePath(_0x79d528){const _0x5cf306=a31_0x29554f;return isAbsolute(_0x79d528)?_0x79d528:resolve(process[_0x5cf306(0x1a4)](),_0x79d528);}function readSourceFile(_0x367886){const _0x40dcf9=a31_0x29554f;try{const _0x39e024=readFileSync(_0x367886,{'encoding':'utf8'});return JSON[_0x40dcf9(0x1a2)](_0x39e024);}catch(_0x5d8141){throw CliErrors['validation'](_0x40dcf9(0x1a6)+_0x5d8141[_0x40dcf9(0x1d6)]);}}function resolveInitEnv(_0x4cc0f2){const _0xa8123b=a31_0x29554f,_0x23e260=_0x4cc0f2['env'];if(_0x23e260===undefined||_0x23e260==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0xa8123b(0x1d2)](_0x23e260))throw CliErrors[_0xa8123b(0x1b0)](_0xa8123b(0x1ae)+_0x23e260+_0xa8123b(0x1cc)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x23e260;}
1
+ const a31_0x5b54d4=a31_0x5f11;(function(_0x420fd3,_0x3553d9){const _0xf9ec53=a31_0x5f11,_0x10e5e8=_0x420fd3();while(!![]){try{const _0x3f30a1=-parseInt(_0xf9ec53(0xf8))/0x1*(-parseInt(_0xf9ec53(0x135))/0x2)+-parseInt(_0xf9ec53(0x105))/0x3+parseInt(_0xf9ec53(0xff))/0x4+-parseInt(_0xf9ec53(0x106))/0x5+-parseInt(_0xf9ec53(0x107))/0x6+parseInt(_0xf9ec53(0x120))/0x7*(parseInt(_0xf9ec53(0x125))/0x8)+parseInt(_0xf9ec53(0x121))/0x9;if(_0x3f30a1===_0x3553d9)break;else _0x10e5e8['push'](_0x10e5e8['shift']());}catch(_0x4b8f82){_0x10e5e8['push'](_0x10e5e8['shift']());}}}(a31_0x5424,0xd6c29));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':a31_0x5b54d4(0x133),'type':'string','description':a31_0x5b54d4(0x122)},{'name':a31_0x5b54d4(0x112),'type':a31_0x5b54d4(0x11c),'description':a31_0x5b54d4(0x11a)+DEFAULT_CONFIG_VALUES[a31_0x5b54d4(0x112)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a31_0x5b54d4(0x132)+PRODUCT_CONFIG[a31_0x5b54d4(0x11b)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x5b54d4(0x111),'type':a31_0x5b54d4(0xf7),'description':a31_0x5b54d4(0x114),'default':![]}];export const initImportFlagDefs=[{'name':a31_0x5b54d4(0xfd),'type':'string','description':a31_0x5b54d4(0x119),'required':!![]},{'name':a31_0x5b54d4(0x133),'type':a31_0x5b54d4(0x11c),'description':a31_0x5b54d4(0x115)},{'name':a31_0x5b54d4(0x112),'type':a31_0x5b54d4(0x11c),'description':a31_0x5b54d4(0xf6),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x5b54d4(0x136),'type':a31_0x5b54d4(0xf7),'description':a31_0x5b54d4(0x132)+PRODUCT_CONFIG[a31_0x5b54d4(0x11b)]+a31_0x5b54d4(0xfc),'default':![]},{'name':a31_0x5b54d4(0x111),'type':a31_0x5b54d4(0xf7),'description':a31_0x5b54d4(0x114),'default':![]}];export async function runInit(_0x5ea89a){const _0x5f1520=a31_0x5b54d4,_0x46c85e=isNonInteractiveMode(_0x5ea89a),_0x171182=_0x5ea89a[_0x5f1520(0x136)]?_0x5f1520(0x136):_0x5f1520(0x10f),_0xe0a3fd=resolveWriteConfigPath(_0x171182);try{_0x46c85e?await runNonInteractive(_0x5ea89a,_0xe0a3fd):await runInteractive(_0x5ea89a,_0xe0a3fd);}catch(_0x57a6e8){if(_0x57a6e8 instanceof AbortPrompt)throw CliErrors[_0x5f1520(0x123)]();throw _0x57a6e8;}}export async function runInitImport(_0x2361ea){const _0x337275=a31_0x5b54d4,_0x43cfa4=_0x2361ea[_0x337275(0x136)]?_0x337275(0x136):_0x337275(0x10f),_0xaa062d=resolveWriteConfigPath(_0x43cfa4);await runFromImport(_0x2361ea,_0xaa062d);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x5b54d4(0x10b)]);async function runFromImport(_0x28a320,_0x4872dc){const _0x406e71=a31_0x5b54d4,_0x315aed=resolveFilePath(_0x28a320[_0x406e71(0xfd)]);if(!existsSync(_0x315aed))throw CliErrors[_0x406e71(0x137)](_0x406e71(0x131)+_0x315aed);const _0x210713=readSourceFile(_0x315aed),_0x9d679d=convertToRuntimeConfig(_0x210713);_0x28a320[_0x406e71(0x133)]&&(_0x9d679d['appcode']=String(_0x28a320[_0x406e71(0x133)]));_0x28a320[_0x406e71(0x112)]&&(_0x9d679d['env']=resolveInitEnv(_0x28a320));if(!_0x9d679d[_0x406e71(0x133)])throw CliErrors['validation'](_0x406e71(0x110),'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(_0x4872dc,_0x9d679d,_0x28a320),console[_0x406e71(0x12d)]('Imported\x20from\x20'+_0x315aed),console[_0x406e71(0x12d)]('\x20\x20config:\x20\x20'+_0x4872dc),console[_0x406e71(0x12d)](_0x406e71(0x127)+_0x9d679d['appcode']);if(_0x9d679d['defaultApp'])console['log'](_0x406e71(0x126)+_0x9d679d[_0x406e71(0x100)]);}function convertToRuntimeConfig(_0x40cc91){const _0x42ebd4=a31_0x5b54d4;if(_0x40cc91[_0x42ebd4(0xfa)]&&typeof _0x40cc91[_0x42ebd4(0xfa)]==='object')throw CliErrors[_0x42ebd4(0x137)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x4b11f2={};for(const _0x475361 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x40cc91[_0x475361]!==undefined&&(_0x4b11f2[_0x475361]=_0x40cc91[_0x475361]);}return!_0x4b11f2[_0x42ebd4(0x12f)]&&(_0x4b11f2['riskLevel']=DEFAULT_CONFIG_VALUES[_0x42ebd4(0x12f)]),_0x4b11f2;}async function runNonInteractive(_0x3be8a3,_0x27326e){const _0x1750e1=a31_0x5b54d4,_0x126146=_0x3be8a3[_0x1750e1(0x133)];if(!_0x126146)throw CliErrors[_0x1750e1(0x102)](_0x1750e1(0x133),_0x1750e1(0x12c)+CLI_BIN_NAME+_0x1750e1(0x109));const _0x23de8b=resolveInitEnv(_0x3be8a3);await writeInitConfig(_0x27326e,{'appcode':_0x126146,'env':_0x23de8b},_0x3be8a3),console[_0x1750e1(0x12d)](_0x1750e1(0x11f)+_0x27326e),console[_0x1750e1(0x12d)](_0x1750e1(0x127)+_0x126146),console[_0x1750e1(0x12d)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x23de8b);}async function runInteractive(_0x59861b,_0x40390c){const _0x4ab33b=a31_0x5b54d4,_0x26456a=loadExisting(_0x40390c),_0x10431c=typeof _0x26456a?.['appcode']===_0x4ab33b(0x11c)?_0x26456a[_0x4ab33b(0x133)]:'',_0xe7fb01=resolveInitEnv(_0x59861b);console['log'](CLI_BIN_NAME+_0x4ab33b(0x124)+PRODUCT_CONFIG[_0x4ab33b(0x11b)]+'\x0a');if(existsSync(_0x40390c)&&!_0x59861b['yes']){const _0x192c2b=await promptYesNo('File\x20'+_0x40390c+_0x4ab33b(0x117),![]);if(!_0x192c2b){console[_0x4ab33b(0x12d)](_0x4ab33b(0xf9));return;}}const _0x10579f=typeof _0x59861b[_0x4ab33b(0x133)]===_0x4ab33b(0x11c)?_0x59861b[_0x4ab33b(0x133)][_0x4ab33b(0x10d)]():'';let _0x33ac8b=_0x10579f;!_0x33ac8b&&(_0x33ac8b=await promptInput(_0x4ab33b(0x103),_0x10431c));if(!_0x33ac8b[_0x4ab33b(0x10d)]())throw CliErrors['validation'](_0x4ab33b(0x134));await writeInitConfig(_0x40390c,{'appcode':_0x33ac8b[_0x4ab33b(0x10d)](),'env':_0xe7fb01},_0x59861b),console['log'](_0x4ab33b(0x10a)+_0x40390c),console['log'](_0x4ab33b(0x127)+_0x33ac8b[_0x4ab33b(0x10d)]()),console[_0x4ab33b(0x12d)](_0x4ab33b(0x10c)+_0xe7fb01);}function a31_0x5424(){const _0xc087cd=['race','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Target\x20environment\x20(default\x20','newConfigFileName','string','utf8','[Y/n]','Initialized\x20','7JlmEDP','11383092RvjJnf','App\x20code\x20for\x20the\x20project','cancelled','\x20init\x20—\x20Create\x20','178072fBAqIz','\x20\x20default:\x20','\x20\x20appcode:\x20','includes','AbortPrompt','name','close','Usage:\x20','log','cwd','riskLevel','removeListener','Source\x20file\x20not\x20found:\x20','Write\x20to\x20global\x20(~/','appcode','App\x20code\x20cannot\x20be\x20empty.','642MZXPjq','global','validation','parse','Failed\x20to\x20parse\x20source\x20file:\x20','Override\x20imported\x20default\x20env','boolean','1736PYcEfD','Aborted.','apps','[y/N]',')\x20instead\x20of\x20project','file','entries','4722372jyjqqd','defaultApp','question','flagMissing','App\x20code','stdin','2228373invAIZ','1417050ZLSQJP','6714228GnaOfW','SIGINT','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','\x0aInitialized\x20','apiDir','\x20\x20env:\x20\x20\x20\x20\x20','trim','Invalid\x20env\x20\x22','project','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','yes','env','stdout','Skip\x20confirmation\x20when\x20overwriting','Override\x20imported\x20default\x20appcode','app','\x20already\x20exists.\x20Overwrite?'];a31_0x5424=function(){return _0xc087cd;};return a31_0x5424();}async function writeInitConfig(_0x1aac77,_0x1dac4f,_0x58a490){const _0x5668f0=a31_0x5b54d4;let _0x14fe29={};existsSync(_0x1aac77)&&!_0x58a490[_0x5668f0(0x111)]&&(_0x14fe29=readConfigFile(_0x1aac77));for(const [_0x267ecf,_0x59dc34]of Object[_0x5668f0(0xfe)](_0x1dac4f)){_0x59dc34!==undefined&&(_0x14fe29[_0x267ecf]=_0x59dc34);}if(_0x14fe29[_0x5668f0(0x116)])delete _0x14fe29[_0x5668f0(0x116)];writeConfigFile(_0x1aac77,_0x14fe29);}class AbortPrompt extends Error{constructor(){const _0x2a2e97=a31_0x5b54d4;super('User\x20aborted\x20prompt'),this[_0x2a2e97(0x12a)]=_0x2a2e97(0x129);}}function createSafeRl(){const _0x238363=a31_0x5b54d4,_0x194019=createInterface({'input':process[_0x238363(0x104)],'output':process[_0x238363(0x113)]});let _0x117750;const _0x477178=new Promise((_0xedc184,_0x91dc6c)=>{const _0x3d4495=_0x238363;_0x117750=()=>{const _0x2227de=a31_0x5f11;_0x117750&&(_0x194019[_0x2227de(0x130)](_0x2227de(0x108),_0x117750),_0x117750=undefined);try{_0x194019[_0x2227de(0x12b)]();}catch{}_0x91dc6c(new AbortPrompt());},_0x194019['once'](_0x3d4495(0x108),_0x117750);}),_0x44a097=()=>{const _0x8fcc28=_0x238363;_0x117750&&(_0x194019['removeListener'](_0x8fcc28(0x108),_0x117750),_0x117750=undefined);try{_0x194019[_0x8fcc28(0x12b)]();}catch{}};return{'rl':_0x194019,'abortPromise':_0x477178,'disposeSuccess':_0x44a097};}async function promptInput(_0x3503df,_0x2419c6){const _0x2ee126=a31_0x5b54d4,{rl:_0x18b100,abortPromise:_0x1508e4,disposeSuccess:_0x5dd710}=createSafeRl(),_0x1ed2d3=new Promise(_0x30d502=>{const _0x420d9a=a31_0x5f11,_0x5a0bad=_0x2419c6?'\x20\x20'+_0x3503df+'\x20('+_0x2419c6+'):\x20':'\x20\x20'+_0x3503df+':\x20';_0x18b100[_0x420d9a(0x101)](_0x5a0bad,_0x56a5ac=>{const _0x55d02b=_0x420d9a;_0x5dd710(),_0x30d502(_0x56a5ac[_0x55d02b(0x10d)]()||_0x2419c6);});});return Promise[_0x2ee126(0x118)]([_0x1ed2d3,_0x1508e4]);}function a31_0x5f11(_0x10416e,_0x1c05b6){_0x10416e=_0x10416e-0xf5;const _0x542498=a31_0x5424();let _0x5f11b4=_0x542498[_0x10416e];return _0x5f11b4;}async function promptYesNo(_0x4bf353,_0x39291a){const _0x2639dd=a31_0x5b54d4,{rl:_0x49f635,abortPromise:_0x1449fb,disposeSuccess:_0x5af9e6}=createSafeRl(),_0x59d930=new Promise(_0x5f0315=>{const _0x177016=a31_0x5f11,_0x7da50f=_0x39291a?_0x177016(0x11e):_0x177016(0xfb);_0x49f635[_0x177016(0x101)]('\x20\x20'+_0x4bf353+'\x20'+_0x7da50f+':\x20',_0x54e27c=>{const _0x1b93ec=_0x177016;_0x5af9e6();const _0x510422=_0x54e27c[_0x1b93ec(0x10d)]()['toLowerCase']();if(_0x510422==='y'||_0x510422===_0x1b93ec(0x111))_0x5f0315(!![]);else{if(_0x510422==='n'||_0x510422==='no')_0x5f0315(![]);else _0x5f0315(_0x39291a);}});});return Promise[_0x2639dd(0x118)]([_0x59d930,_0x1449fb]);}function loadExisting(_0x54cf05){if(!existsSync(_0x54cf05))return null;return readConfigFile(_0x54cf05);}function resolveFilePath(_0x25008b){const _0x91bd7d=a31_0x5b54d4;return isAbsolute(_0x25008b)?_0x25008b:resolve(process[_0x91bd7d(0x12e)](),_0x25008b);}function readSourceFile(_0x309a18){const _0x18ed16=a31_0x5b54d4;try{const _0x89bb58=readFileSync(_0x309a18,{'encoding':_0x18ed16(0x11d)});return JSON[_0x18ed16(0x138)](_0x89bb58);}catch(_0x30b38f){throw CliErrors[_0x18ed16(0x137)](_0x18ed16(0xf5)+_0x30b38f['message']);}}function resolveInitEnv(_0x5536d0){const _0x25d4ac=a31_0x5b54d4,_0x4f69f5=_0x5536d0[_0x25d4ac(0x112)];if(_0x4f69f5===undefined||_0x4f69f5==='')return DEFAULT_CONFIG_VALUES[_0x25d4ac(0x112)];if(!RUNTIME_ENV_VALUES[_0x25d4ac(0x128)](_0x4f69f5))throw CliErrors[_0x25d4ac(0x137)](_0x25d4ac(0x10e)+_0x4f69f5+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x4f69f5;}
@@ -1 +1 @@
1
- const a32_0x50c9f5=a32_0x3eab;(function(_0x12a542,_0x32e023){const _0x5ba6c4=a32_0x3eab,_0x3e9883=_0x12a542();while(!![]){try{const _0x263370=-parseInt(_0x5ba6c4(0x1bd))/0x1+parseInt(_0x5ba6c4(0x1a8))/0x2*(-parseInt(_0x5ba6c4(0x1d1))/0x3)+parseInt(_0x5ba6c4(0x1ba))/0x4+parseInt(_0x5ba6c4(0x1d4))/0x5+-parseInt(_0x5ba6c4(0x1cc))/0x6*(parseInt(_0x5ba6c4(0x1c8))/0x7)+-parseInt(_0x5ba6c4(0x1d6))/0x8+parseInt(_0x5ba6c4(0x1a3))/0x9;if(_0x263370===_0x32e023)break;else _0x3e9883['push'](_0x3e9883['shift']());}catch(_0xe1809){_0x3e9883['push'](_0x3e9883['shift']());}}}(a32_0x2ecd,0x214c7));function a32_0x2ecd(){const _0x3cc246=['trim','45594tQKDiw','map','/client/knowledge-base/personal/','string','detail','21255Acdsve','docId','number','108580xemMBH','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','897816tOthQp','Updated\x20KB\x20entry\x20','isFinite','Search\x20query\x20is\x20required.','body','version','/client/knowledge-base/personal/create','scope','ragStatus','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','File\x20is\x20not\x20a\x20regular\x20file:\x20','1324476LIyHIw','flag','Personal\x20knowledge-base\x20entry\x20title','metadata','Personal\x20knowledge-base\x20entry\x20ID','8inSZLy','file','read','File\x20not\x20found:\x20','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','str','isFile','weightedScore','userId','File\x20path\x20is\x20required.','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','description','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','createTime','appCode','validation','length','content','758132hwirNP','title','ragErrorMessage','66257zJBMsH','utf8','Created\x20KB\x20entry\x20','topk','updateTime','POST','write','Override\x20the\x20existing\x20entry\x20title','verbose','create','num','14uLKftw','query','list'];a32_0x2ecd=function(){return _0x3cc246;};return a32_0x2ecd();}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_0x3eab(_0x2962db,_0xa6cff4){_0x2962db=_0x2962db-0x19f;const _0x2ecd21=a32_0x2ecd();let _0x3eab4d=_0x2ecd21[_0x2962db];return _0x3eab4d;}const TITLE_FLAG={'name':a32_0x50c9f5(0x1bb),'type':a32_0x50c9f5(0x1cf),'required':!![],'description':a32_0x50c9f5(0x1a5)},FILE_FLAG={'name':a32_0x50c9f5(0x1a9),'type':'string','required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x50c9f5(0x1c9),'type':a32_0x50c9f5(0x1cf),'required':!![],'description':a32_0x50c9f5(0x1ac)},TOPK_FLAG={'name':a32_0x50c9f5(0x1c0),'type':a32_0x50c9f5(0x1d3),'description':a32_0x50c9f5(0x1b2)};function readKnowledgeFile(_0x4d7187){const _0x112f88=a32_0x50c9f5;if(!_0x4d7187)throw CliErrors[_0x112f88(0x1b7)](_0x112f88(0x1b1));if(!existsSync(_0x4d7187))throw CliErrors[_0x112f88(0x1b7)](_0x112f88(0x1ab)+_0x4d7187);if(!statSync(_0x4d7187)[_0x112f88(0x1ae)]())throw CliErrors[_0x112f88(0x1b7)](_0x112f88(0x1a2)+_0x4d7187);return readFileSync(_0x4d7187,_0x112f88(0x1be));}function summarizePersonalItem(_0x1b591a){const _0x3ac97a=a32_0x50c9f5;return{'id':_0x1b591a['id'],'title':_0x1b591a[_0x3ac97a(0x1bb)],'version':_0x1b591a['version'],'ragStatus':_0x1b591a[_0x3ac97a(0x1a0)],'ragErrorMessage':_0x1b591a[_0x3ac97a(0x1bc)],'updateTime':_0x1b591a['updateTime']};}function detailPersonalItem(_0x15c8b6){const _0x54abe7=a32_0x50c9f5;return{'id':_0x15c8b6['id'],'appCode':_0x15c8b6['appCode'],'scope':_0x15c8b6[_0x54abe7(0x19f)],'userId':_0x15c8b6[_0x54abe7(0x1b0)],'title':_0x15c8b6[_0x54abe7(0x1bb)],'content':_0x15c8b6[_0x54abe7(0x1b9)]??'','version':_0x15c8b6[_0x54abe7(0x1db)],'ragStatus':_0x15c8b6['ragStatus'],'ragErrorMessage':_0x15c8b6[_0x54abe7(0x1bc)],'createTime':_0x15c8b6[_0x54abe7(0x1b5)],'updateTime':_0x15c8b6[_0x54abe7(0x1c1)]};}function summarizeSearchHit(_0xca9d83){const _0x5796f7=a32_0x50c9f5;return{'scope':_0xca9d83[_0x5796f7(0x19f)],'title':_0xca9d83['title'],'docId':_0xca9d83[_0x5796f7(0x1d2)],'score':_0xca9d83['score'],'weightedScore':_0xca9d83[_0x5796f7(0x1af)],'content':_0xca9d83[_0x5796f7(0x1b9)],'metadata':_0xca9d83[_0x5796f7(0x1a6)]};}function readTopK(_0x2d64b3){const _0x595ceb=a32_0x50c9f5,_0x5333e8=_0x2d64b3[_0x595ceb(0x1a4)](_0x595ceb(0x1c0));if(_0x5333e8===undefined||_0x5333e8===null||_0x5333e8==='')return undefined;const _0x17e842=_0x2d64b3[_0x595ceb(0x1c7)](_0x595ceb(0x1c0));if(!Number[_0x595ceb(0x1d8)](_0x17e842)||_0x17e842<0x1)throw CliErrors[_0x595ceb(0x1b7)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x17e842;}const kbList={'service':'kb','command':a32_0x50c9f5(0x1ca),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x50c9f5(0x1aa),'flags':[VERBOSE_FLAG],async 'execute'(_0x3b6927){const _0x4a34d8=a32_0x50c9f5,_0x3ec98c=await listPersonalKnowledgeBaseItems(_0x3b6927[_0x4a34d8(0x1b6)]);if(_0x3b6927['bool'](_0x4a34d8(0x1c5)))return{'ok':!![],'data':{'total':_0x3ec98c[_0x4a34d8(0x1b8)],'items':_0x3ec98c}};return{'ok':!![],'data':{'total':_0x3ec98c['length'],'items':_0x3ec98c[_0x4a34d8(0x1cd)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x50c9f5(0x1d0),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a32_0x50c9f5(0x1aa),'flags':[{...ID_FLAG,'description':a32_0x50c9f5(0x1a7)}],async 'execute'(_0x12227a){const _0x4af626=a32_0x50c9f5,_0x1c286a=await getPersonalKnowledgeBaseItem(_0x12227a[_0x4af626(0x1c7)]('id'),_0x12227a[_0x4af626(0x1b6)]);return{'ok':!![],'data':detailPersonalItem(_0x1c286a)};}},kbCreate={'service':'kb','command':a32_0x50c9f5(0x1c6),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':'write','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x537e1f){const _0x34e14e=a32_0x50c9f5,_0x588a3c=_0x537e1f[_0x34e14e(0x1ad)](_0x34e14e(0x1bb)),_0x5e861e=readKnowledgeFile(_0x537e1f[_0x34e14e(0x1ad)]('file')),_0x454174=await createPersonalKnowledgeBaseItem(_0x537e1f['appCode'],{'title':_0x588a3c,'content':_0x5e861e});return{'ok':!![],'data':summarizePersonalItem(_0x454174),'message':_0x34e14e(0x1bf)+_0x454174['id']+'\x20('+_0x454174[_0x34e14e(0x1bb)]+')'};},async 'dryRun'(_0xf4e577){const _0x45dc5e=a32_0x50c9f5,_0x1e636a=_0xf4e577['str'](_0x45dc5e(0x1bb)),_0xf5b96d=readKnowledgeFile(_0xf4e577[_0x45dc5e(0x1ad)](_0x45dc5e(0x1a9)));return dryRun(_0x45dc5e(0x1c2),_0x45dc5e(0x1dc))[_0x45dc5e(0x1da)]({'appCode':_0xf4e577[_0x45dc5e(0x1b6)],'title':_0x1e636a,'content':_0xf5b96d})[_0x45dc5e(0x1b3)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x1e636a+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':a32_0x50c9f5(0x1b4),'risk':a32_0x50c9f5(0x1c3),'flags':[{...ID_FLAG,'description':a32_0x50c9f5(0x1a7)},{...TITLE_FLAG,'required':![],'description':a32_0x50c9f5(0x1c4)},FILE_FLAG],async 'execute'(_0x447518){const _0x4288a3=a32_0x50c9f5,_0x596d7a=_0x447518[_0x4288a3(0x1c7)]('id'),_0x4c2af4=readKnowledgeFile(_0x447518[_0x4288a3(0x1ad)](_0x4288a3(0x1a9))),_0x2fa098=_0x447518[_0x4288a3(0x1ad)](_0x4288a3(0x1bb))||(await getPersonalKnowledgeBaseItem(_0x596d7a,_0x447518['appCode']))[_0x4288a3(0x1bb)],_0x3f29cd=await updatePersonalKnowledgeBaseItem(_0x596d7a,_0x447518[_0x4288a3(0x1b6)],{'title':_0x2fa098,'content':_0x4c2af4});return{'ok':!![],'data':summarizePersonalItem(_0x3f29cd),'message':_0x4288a3(0x1d7)+_0x3f29cd['id']+'\x20('+_0x3f29cd[_0x4288a3(0x1bb)]+')'};},async 'dryRun'(_0x4d84f6){const _0x4c07c3=a32_0x50c9f5,_0x2f7c33=_0x4d84f6['num']('id'),_0x1e0704=readKnowledgeFile(_0x4d84f6[_0x4c07c3(0x1ad)](_0x4c07c3(0x1a9))),_0x90e9ad=_0x4d84f6[_0x4c07c3(0x1ad)]('title')||(await getPersonalKnowledgeBaseItem(_0x2f7c33,_0x4d84f6[_0x4c07c3(0x1b6)]))[_0x4c07c3(0x1bb)];return dryRun('POST',_0x4c07c3(0x1ce)+_0x2f7c33+'/update')[_0x4c07c3(0x1da)]({'appCode':_0x4d84f6[_0x4c07c3(0x1b6)],'title':_0x90e9ad,'content':_0x1e0704})[_0x4c07c3(0x1b3)](_0x4c07c3(0x1d5)+_0x2f7c33)['build']();}},kbSearch={'service':'kb','command':'search','description':a32_0x50c9f5(0x1a1),'risk':a32_0x50c9f5(0x1aa),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x11b0e9){const _0x2a4a2d=a32_0x50c9f5;if(!_0x11b0e9[_0x2a4a2d(0x1ad)](_0x2a4a2d(0x1c9))[_0x2a4a2d(0x1cb)]())throw CliErrors['validation'](_0x2a4a2d(0x1d9));readTopK(_0x11b0e9);},async 'execute'(_0x52e594){const _0x30a629=a32_0x50c9f5,_0x40eff8=_0x52e594['str']('query')[_0x30a629(0x1cb)](),_0x529ab8=readTopK(_0x52e594),_0x34432e=await searchKnowledgeBase(_0x52e594[_0x30a629(0x1b6)],{'query':_0x40eff8,'topK':_0x529ab8});return{'ok':!![],'data':{'total':_0x34432e[_0x30a629(0x1b8)],'hits':_0x34432e[_0x30a629(0x1cd)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x33542e=a32_0x1d02;(function(_0x3f87b9,_0x1bf006){const _0x93ef7f=a32_0x1d02,_0x114783=_0x3f87b9();while(!![]){try{const _0x583fbf=parseInt(_0x93ef7f(0x193))/0x1+-parseInt(_0x93ef7f(0x195))/0x2+parseInt(_0x93ef7f(0x192))/0x3+parseInt(_0x93ef7f(0x1be))/0x4*(parseInt(_0x93ef7f(0x18b))/0x5)+-parseInt(_0x93ef7f(0x1af))/0x6+parseInt(_0x93ef7f(0x1b1))/0x7+-parseInt(_0x93ef7f(0x18d))/0x8;if(_0x583fbf===_0x1bf006)break;else _0x114783['push'](_0x114783['shift']());}catch(_0x5a768c){_0x114783['push'](_0x114783['shift']());}}}(a32_0x44bc,0x6edc8));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';function a32_0x44bc(){const _0x898d9d=['ragStatus','file','1973550ysWBnv','594871lAIgkd','validation','1472226dfMoBT','scope','updateTime','version','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','File\x20path\x20is\x20required.','map','description','topk','File\x20is\x20not\x20a\x20regular\x20file:\x20','length','score','isFile','ragErrorMessage','bool','str','Override\x20the\x20existing\x20entry\x20title','createTime','verbose','query','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','POST','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','list','build','Personal\x20knowledge-base\x20entry\x20ID','161838CLYmie','write','2611441dIVgBS','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','trim','appCode','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','utf8','num','userId','string','/client/knowledge-base/personal/create','/client/knowledge-base/personal/','number','content','92RNopjR','search','metadata','File\x20not\x20found:\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','--topk\x20must\x20be\x20a\x20positive\x20number.','flag','title','detail','76655iKEmdq','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','6089784nKkkwz','create','body'];a32_0x44bc=function(){return _0x898d9d;};return a32_0x44bc();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x33542e(0x189),'type':a32_0x33542e(0x1b9),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x33542e(0x191),'type':a32_0x33542e(0x1b9),'required':!![],'description':a32_0x33542e(0x1b2)},QUERY_FLAG={'name':'query','type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x33542e(0x19d),'type':a32_0x33542e(0x1bc),'description':a32_0x33542e(0x199)};function readKnowledgeFile(_0x533ea1){const _0x1be4ab=a32_0x33542e;if(!_0x533ea1)throw CliErrors['validation'](_0x1be4ab(0x19a));if(!existsSync(_0x533ea1))throw CliErrors['validation'](_0x1be4ab(0x1c1)+_0x533ea1);if(!statSync(_0x533ea1)[_0x1be4ab(0x1a1)]())throw CliErrors[_0x1be4ab(0x194)](_0x1be4ab(0x19e)+_0x533ea1);return readFileSync(_0x533ea1,_0x1be4ab(0x1b6));}function summarizePersonalItem(_0x368ec2){const _0x37dfc1=a32_0x33542e;return{'id':_0x368ec2['id'],'title':_0x368ec2[_0x37dfc1(0x189)],'version':_0x368ec2[_0x37dfc1(0x198)],'ragStatus':_0x368ec2[_0x37dfc1(0x190)],'ragErrorMessage':_0x368ec2[_0x37dfc1(0x1a2)],'updateTime':_0x368ec2['updateTime']};}function detailPersonalItem(_0x1e304c){const _0x1167f6=a32_0x33542e;return{'id':_0x1e304c['id'],'appCode':_0x1e304c[_0x1167f6(0x1b4)],'scope':_0x1e304c[_0x1167f6(0x196)],'userId':_0x1e304c[_0x1167f6(0x1b8)],'title':_0x1e304c['title'],'content':_0x1e304c[_0x1167f6(0x1bd)]??'','version':_0x1e304c[_0x1167f6(0x198)],'ragStatus':_0x1e304c['ragStatus'],'ragErrorMessage':_0x1e304c[_0x1167f6(0x1a2)],'createTime':_0x1e304c[_0x1167f6(0x1a6)],'updateTime':_0x1e304c[_0x1167f6(0x197)]};}function summarizeSearchHit(_0x3d6c42){const _0x3a8c01=a32_0x33542e;return{'scope':_0x3d6c42[_0x3a8c01(0x196)],'title':_0x3d6c42[_0x3a8c01(0x189)],'docId':_0x3d6c42['docId'],'score':_0x3d6c42[_0x3a8c01(0x1a0)],'weightedScore':_0x3d6c42['weightedScore'],'content':_0x3d6c42[_0x3a8c01(0x1bd)],'metadata':_0x3d6c42[_0x3a8c01(0x1c0)]};}function readTopK(_0x406463){const _0x4bfdf8=a32_0x33542e,_0x46c96d=_0x406463[_0x4bfdf8(0x188)](_0x4bfdf8(0x19d));if(_0x46c96d===undefined||_0x46c96d===null||_0x46c96d==='')return undefined;const _0x2f8ada=_0x406463['num']('topk');if(!Number['isFinite'](_0x2f8ada)||_0x2f8ada<0x1)throw CliErrors[_0x4bfdf8(0x194)](_0x4bfdf8(0x187));return _0x2f8ada;}function a32_0x1d02(_0x5480e2,_0x492f3f){_0x5480e2=_0x5480e2-0x187;const _0x44bcde=a32_0x44bc();let _0x1d0277=_0x44bcde[_0x5480e2];return _0x1d0277;}const kbList={'service':'kb','command':a32_0x33542e(0x1ac),'description':a32_0x33542e(0x1a9),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x409d3f){const _0x59da07=a32_0x33542e,_0x5280d6=await listPersonalKnowledgeBaseItems(_0x409d3f[_0x59da07(0x1b4)]);if(_0x409d3f[_0x59da07(0x1a3)](_0x59da07(0x1a7)))return{'ok':!![],'data':{'total':_0x5280d6[_0x59da07(0x19f)],'items':_0x5280d6}};return{'ok':!![],'data':{'total':_0x5280d6[_0x59da07(0x19f)],'items':_0x5280d6[_0x59da07(0x19b)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x33542e(0x18a),'description':a32_0x33542e(0x1c2),'risk':'read','flags':[{...ID_FLAG,'description':a32_0x33542e(0x1ae)}],async 'execute'(_0x2130d8){const _0x54a402=a32_0x33542e,_0x51140d=await getPersonalKnowledgeBaseItem(_0x2130d8[_0x54a402(0x1b7)]('id'),_0x2130d8[_0x54a402(0x1b4)]);return{'ok':!![],'data':detailPersonalItem(_0x51140d)};}},kbCreate={'service':'kb','command':a32_0x33542e(0x18e),'description':a32_0x33542e(0x18c),'risk':a32_0x33542e(0x1b0),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x16102e){const _0x68d89d=a32_0x33542e,_0x9b4bf=_0x16102e[_0x68d89d(0x1a4)]('title'),_0x2aa14e=readKnowledgeFile(_0x16102e[_0x68d89d(0x1a4)](_0x68d89d(0x191))),_0x409451=await createPersonalKnowledgeBaseItem(_0x16102e['appCode'],{'title':_0x9b4bf,'content':_0x2aa14e});return{'ok':!![],'data':summarizePersonalItem(_0x409451),'message':'Created\x20KB\x20entry\x20'+_0x409451['id']+'\x20('+_0x409451[_0x68d89d(0x189)]+')'};},async 'dryRun'(_0x5c243d){const _0x4b7f5e=a32_0x33542e,_0x2a5363=_0x5c243d[_0x4b7f5e(0x1a4)](_0x4b7f5e(0x189)),_0x539e4a=readKnowledgeFile(_0x5c243d[_0x4b7f5e(0x1a4)](_0x4b7f5e(0x191)));return dryRun('POST',_0x4b7f5e(0x1ba))[_0x4b7f5e(0x18f)]({'appCode':_0x5c243d[_0x4b7f5e(0x1b4)],'title':_0x2a5363,'content':_0x539e4a})[_0x4b7f5e(0x19c)](_0x4b7f5e(0x1b5)+_0x2a5363+'\x22')[_0x4b7f5e(0x1ad)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x33542e(0x1ab),'risk':a32_0x33542e(0x1b0),'flags':[{...ID_FLAG,'description':a32_0x33542e(0x1ae)},{...TITLE_FLAG,'required':![],'description':a32_0x33542e(0x1a5)},FILE_FLAG],async 'execute'(_0x2a122b){const _0x29ebc0=a32_0x33542e,_0x13a3d0=_0x2a122b['num']('id'),_0x415c0c=readKnowledgeFile(_0x2a122b[_0x29ebc0(0x1a4)]('file')),_0x323215=_0x2a122b[_0x29ebc0(0x1a4)]('title')||(await getPersonalKnowledgeBaseItem(_0x13a3d0,_0x2a122b[_0x29ebc0(0x1b4)]))['title'],_0x1c2440=await updatePersonalKnowledgeBaseItem(_0x13a3d0,_0x2a122b['appCode'],{'title':_0x323215,'content':_0x415c0c});return{'ok':!![],'data':summarizePersonalItem(_0x1c2440),'message':'Updated\x20KB\x20entry\x20'+_0x1c2440['id']+'\x20('+_0x1c2440[_0x29ebc0(0x189)]+')'};},async 'dryRun'(_0x2baa62){const _0x6796df=a32_0x33542e,_0x390b1e=_0x2baa62['num']('id'),_0x1de8a6=readKnowledgeFile(_0x2baa62['str'](_0x6796df(0x191))),_0x2ab96a=_0x2baa62['str'](_0x6796df(0x189))||(await getPersonalKnowledgeBaseItem(_0x390b1e,_0x2baa62['appCode']))[_0x6796df(0x189)];return dryRun(_0x6796df(0x1aa),_0x6796df(0x1bb)+_0x390b1e+'/update')['body']({'appCode':_0x2baa62[_0x6796df(0x1b4)],'title':_0x2ab96a,'content':_0x1de8a6})[_0x6796df(0x19c)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x390b1e)[_0x6796df(0x1ad)]();}},kbSearch={'service':'kb','command':a32_0x33542e(0x1bf),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x1e2e78){const _0x330c5b=a32_0x33542e;if(!_0x1e2e78[_0x330c5b(0x1a4)](_0x330c5b(0x1a8))[_0x330c5b(0x1b3)]())throw CliErrors[_0x330c5b(0x194)]('Search\x20query\x20is\x20required.');readTopK(_0x1e2e78);},async 'execute'(_0x4d30ce){const _0x4b99ec=a32_0x33542e,_0x150a1f=_0x4d30ce[_0x4b99ec(0x1a4)]('query')[_0x4b99ec(0x1b3)](),_0x4bf3b6=readTopK(_0x4d30ce),_0x2d0e68=await searchKnowledgeBase(_0x4d30ce[_0x4b99ec(0x1b4)],{'query':_0x150a1f,'topK':_0x4bf3b6});return{'ok':!![],'data':{'total':_0x2d0e68[_0x4b99ec(0x19f)],'hits':_0x2d0e68[_0x4b99ec(0x19b)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x3d2842=a33_0x3ed4;(function(_0x1b5109,_0x2ba244){const _0xa1804c=a33_0x3ed4,_0x3f82ad=_0x1b5109();while(!![]){try{const _0x31c8f6=parseInt(_0xa1804c(0x106))/0x1*(parseInt(_0xa1804c(0x115))/0x2)+parseInt(_0xa1804c(0x114))/0x3+-parseInt(_0xa1804c(0x103))/0x4*(-parseInt(_0xa1804c(0x11d))/0x5)+-parseInt(_0xa1804c(0x110))/0x6+-parseInt(_0xa1804c(0x10f))/0x7*(parseInt(_0xa1804c(0x10b))/0x8)+parseInt(_0xa1804c(0x102))/0x9+-parseInt(_0xa1804c(0x10c))/0xa*(parseInt(_0xa1804c(0x124))/0xb);if(_0x31c8f6===_0x2ba244)break;else _0x3f82ad['push'](_0x3f82ad['shift']());}catch(_0x3d81ed){_0x3f82ad['push'](_0x3f82ad['shift']());}}}(a33_0x72f3,0xed06e));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x7f7929){const _0x179a6c=a33_0x3ed4;if(_0x7f7929[_0x179a6c(0x125)]===0x0){console[_0x179a6c(0x108)](_0x179a6c(0x119));return;}console[_0x179a6c(0x108)]('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x7f7929[_0x179a6c(0x111)]((_0x2a6411,_0x11bd8f)=>{const _0x223759=_0x179a6c,_0x2dee8c=new Date(_0x2a6411[_0x223759(0x113)])[_0x223759(0x101)]('en-US'),_0x4654b4=_0x2a6411[_0x223759(0x117)]===_0x223759(0x11e)?'√':_0x2a6411[_0x223759(0x117)]==='error'?'×':_0x2a6411[_0x223759(0x117)]==='warn'?'!':'i';console[_0x223759(0x108)](_0x11bd8f+0x1+'.\x20'+_0x4654b4+'\x20['+_0x2a6411[_0x223759(0x11f)]+']\x20'+_0x2a6411[_0x223759(0x121)]),console[_0x223759(0x108)]('\x20\x20\x20Time:\x20'+_0x2dee8c),_0x2a6411[_0x223759(0x10a)]&&console[_0x223759(0x108)](_0x223759(0x11a)+_0x2a6411[_0x223759(0x10a)]+'ms'),_0x2a6411[_0x223759(0x120)]&&Object[_0x223759(0x11c)](_0x2a6411[_0x223759(0x120)])['length']>0x0&&console[_0x223759(0x108)](_0x223759(0x107)+JSON[_0x223759(0x122)](_0x2a6411['details'],null,0x2)),console['log']('');});}function a33_0x3ed4(_0x2d9257,_0x480619){_0x2d9257=_0x2d9257-0x101;const _0x72f310=a33_0x72f3();let _0x3ed4e2=_0x72f310[_0x2d9257];return _0x3ed4e2;}function a33_0x72f3(){const _0x3c71d0=['1110912PKCJDQ','forEach','readLogs','timestamp','5552667CBpgrE','2614SScKvu','View\x20command\x20history\x20logs','level','clear','*\x20No\x20logs\x20found','\x20\x20\x20Duration:\x20','write','keys','5zZZBMQ','success','command','details','message','stringify','*\x20Logs\x20cleared','17138lPLmvw','length','toLocaleString','5075586zqJmrK','2084332UkHVjp','show','read','776ymdXIv','\x20\x20\x20Details:\x20','log','logs','duration','4140648Gemlim','11290TxDEpq','clearLogs','Clear\x20command\x20history\x20logs','14UBytnv'];a33_0x72f3=function(){return _0x3c71d0;};return a33_0x72f3();}export const logsDefinitions=[{'service':a33_0x3d2842(0x109),'command':a33_0x3d2842(0x104),'description':a33_0x3d2842(0x116),'risk':a33_0x3d2842(0x105),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x16a32b){const _0x495727=a33_0x3d2842;return printLogs(logger[_0x495727(0x112)]()),{'ok':!![]};}},{'service':a33_0x3d2842(0x109),'command':a33_0x3d2842(0x118),'description':a33_0x3d2842(0x10e),'risk':a33_0x3d2842(0x11b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5b1595){const _0x3d534d=a33_0x3d2842;return logger[_0x3d534d(0x10d)](),console[_0x3d534d(0x108)](_0x3d534d(0x123)),{'ok':!![]};}}];
1
+ const a33_0x2c8c2a=a33_0x2368;(function(_0x3026a3,_0x465c7a){const _0xf9f2f1=a33_0x2368,_0x430d28=_0x3026a3();while(!![]){try{const _0x7fb68a=parseInt(_0xf9f2f1(0x6f))/0x1*(parseInt(_0xf9f2f1(0x65))/0x2)+-parseInt(_0xf9f2f1(0x78))/0x3*(-parseInt(_0xf9f2f1(0x86))/0x4)+parseInt(_0xf9f2f1(0x84))/0x5+parseInt(_0xf9f2f1(0x75))/0x6+-parseInt(_0xf9f2f1(0x77))/0x7+-parseInt(_0xf9f2f1(0x6b))/0x8*(parseInt(_0xf9f2f1(0x87))/0x9)+-parseInt(_0xf9f2f1(0x7c))/0xa;if(_0x7fb68a===_0x465c7a)break;else _0x430d28['push'](_0x430d28['shift']());}catch(_0x4ab028){_0x430d28['push'](_0x430d28['shift']());}}}(a33_0x1867,0xdaf2b));import{logger}from'../../utils/logger.js';function a33_0x2368(_0x205178,_0x2548a8){_0x205178=_0x205178-0x64;const _0x1867a6=a33_0x1867();let _0x236844=_0x1867a6[_0x205178];return _0x236844;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x2626f1){const _0x35fd1b=a33_0x2368;if(_0x2626f1[_0x35fd1b(0x6c)]===0x0){console['log'](_0x35fd1b(0x7e));return;}console[_0x35fd1b(0x83)]('*\x20'+CLI_DISPLAY_NAME+_0x35fd1b(0x74)),_0x2626f1[_0x35fd1b(0x6e)]((_0x3c9e83,_0x50a17f)=>{const _0x1abd63=_0x35fd1b,_0x590743=new Date(_0x3c9e83['timestamp'])[_0x1abd63(0x81)]('en-US'),_0x272676=_0x3c9e83[_0x1abd63(0x85)]===_0x1abd63(0x7a)?'√':_0x3c9e83['level']===_0x1abd63(0x6d)?'×':_0x3c9e83[_0x1abd63(0x85)]===_0x1abd63(0x80)?'!':'i';console[_0x1abd63(0x83)](_0x50a17f+0x1+'.\x20'+_0x272676+'\x20['+_0x3c9e83[_0x1abd63(0x7f)]+']\x20'+_0x3c9e83[_0x1abd63(0x7d)]),console[_0x1abd63(0x83)](_0x1abd63(0x69)+_0x590743),_0x3c9e83[_0x1abd63(0x6a)]&&console['log'](_0x1abd63(0x67)+_0x3c9e83['duration']+'ms'),_0x3c9e83[_0x1abd63(0x66)]&&Object[_0x1abd63(0x76)](_0x3c9e83['details'])['length']>0x0&&console[_0x1abd63(0x83)](_0x1abd63(0x68)+JSON['stringify'](_0x3c9e83['details'],null,0x2)),console['log']('');});}function a33_0x1867(){const _0x70be17=['2543850yEWXVh','*\x20Logs\x20cleared','13516EMyens','details','\x20\x20\x20Duration:\x20','\x20\x20\x20Details:\x20','\x20\x20\x20Time:\x20','duration','8kUVOXG','length','error','forEach','236EPZFYz','write','show','logs','readLogs','\x20logs:\x0a','1893876uvWNGL','keys','11161626IVFzeV','39dLDsZc','View\x20command\x20history\x20logs','success','clearLogs','16850490NjWATU','message','*\x20No\x20logs\x20found','command','warn','toLocaleString','read','log','5365360sIAOPF','level','453976pyapgX'];a33_0x1867=function(){return _0x70be17;};return a33_0x1867();}export const logsDefinitions=[{'service':a33_0x2c8c2a(0x72),'command':a33_0x2c8c2a(0x71),'description':a33_0x2c8c2a(0x79),'risk':a33_0x2c8c2a(0x82),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xbc3297){const _0x11d714=a33_0x2c8c2a;return printLogs(logger[_0x11d714(0x73)]()),{'ok':!![]};}},{'service':a33_0x2c8c2a(0x72),'command':'clear','description':'Clear\x20command\x20history\x20logs','risk':a33_0x2c8c2a(0x70),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1b011f){const _0x429b68=a33_0x2c8c2a;return logger[_0x429b68(0x7b)](),console['log'](_0x429b68(0x64)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x5d950a=a34_0x3fbe;function a34_0x5385(){const _0x382e83=['POST','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','recognize','idCard','\x20OCR\x20from\x20URL','idcard','2724unhqpg','validation','26246avTTdp','filter','build','image-file','60QoSqJm','\x20OCR','image-url','path','/client/uploadFile','apiError','345555bIMmxC','imageUrl','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','4685226UykOXs','2416182CMyIBx','count','156234GjrmPj','scene','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/client/ocr','3916260eioUHr','8gnZUbW','form','<filePath\x20returned\x20by\x20/client/uploadFile>','general','description','str','Preview:\x20recognize\x20','ocr','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','Table','2CKFkXm','body','fileName','General','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','611878nLezIL','write','130dlUZgy','filePath','toLowerCase','imageFile','File\x20URL\x20response\x20missing\x20fileUrl.','string','invoice','trim','.\x20Supported\x20scenes:\x20','appCode'];a34_0x5385=function(){return _0x382e83;};return a34_0x5385();}(function(_0x109553,_0x4e4fea){const _0x355128=a34_0x3fbe,_0x567a8a=_0x109553();while(!![]){try{const _0xf670fc=-parseInt(_0x355128(0x184))/0x1*(parseInt(_0x355128(0x17f))/0x2)+parseInt(_0x355128(0x1a8))/0x3*(-parseInt(_0x355128(0x19c))/0x4)+parseInt(_0x355128(0x1ac))/0x5+parseInt(_0x355128(0x1a6))/0x6+parseInt(_0x355128(0x1a5))/0x7*(parseInt(_0x355128(0x1ad))/0x8)+-parseInt(_0x355128(0x1a2))/0x9*(-parseInt(_0x355128(0x186))/0xa)+-parseInt(_0x355128(0x198))/0xb*(parseInt(_0x355128(0x196))/0xc);if(_0xf670fc===_0x4e4fea)break;else _0x567a8a['push'](_0x567a8a['shift']());}catch(_0x4ad062){_0x567a8a['push'](_0x567a8a['shift']());}}}(a34_0x5385,0x66794));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_0x5d950a(0x18c),a34_0x5d950a(0x178),a34_0x5d950a(0x1ae),a34_0x5d950a(0x193)],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a34_0x5d950a(0x182),'form':a34_0x5d950a(0x17e),'idCard':'IdCard'},SCENE_FLAG={'name':a34_0x5d950a(0x1a9),'type':a34_0x5d950a(0x18b),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x5d950a(0x191)},IMAGE_FILE_FLAG={'name':a34_0x5d950a(0x19b),'type':a34_0x5d950a(0x18b),'description':a34_0x5d950a(0x183)},IMAGE_URL_FLAG={'name':a34_0x5d950a(0x19e),'type':a34_0x5d950a(0x18b),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x13496f){const _0x172b49=a34_0x5d950a,_0x47b2e5=_0x13496f['trim']()[_0x172b49(0x188)]();if(_0x47b2e5===_0x172b49(0x195))return'idCard';if(_0x47b2e5==='invoice'||_0x47b2e5===_0x172b49(0x178)||_0x47b2e5===_0x172b49(0x1ae))return _0x47b2e5;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0x13496f+_0x172b49(0x18e)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x42018d){const _0x328505=a34_0x5d950a,_0x1c6f70=_0x42018d[_0x328505(0x17a)](_0x328505(0x19b))[_0x328505(0x18d)](),_0x237596=_0x42018d[_0x328505(0x17a)](_0x328505(0x19e))['trim']();return{'imageFile':_0x1c6f70,'imageUrl':_0x237596,'count':[_0x1c6f70,_0x237596][_0x328505(0x199)](Boolean)['length']};}function validateInputSelection(_0xc99795){const _0x14d426=a34_0x5d950a,_0x4c3a46=selectedInputs(_0xc99795);if(_0x4c3a46[_0x14d426(0x1a7)]!==0x1)throw CliErrors[_0x14d426(0x197)](_0x14d426(0x1aa));return _0x4c3a46;}function withScene(_0x24acfe,_0x3f7e5d,_0x3c7be0){const _0x39d42c=a34_0x5d950a;return{..._0x24acfe,'scene':_0x3f7e5d,..._0x3c7be0?{'sourceFile':{'fileName':_0x3c7be0[_0x39d42c(0x181)],'filePath':_0x3c7be0[_0x39d42c(0x187)]}}:{}};}function a34_0x3fbe(_0x39c43d,_0x2461e7){_0x39c43d=_0x39c43d-0x178;const _0x538532=a34_0x5385();let _0x3fbe7b=_0x538532[_0x39c43d];return _0x3fbe7b;}const ocrRecognize={'service':a34_0x5d950a(0x17c),'command':a34_0x5d950a(0x192),'description':'Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','risk':a34_0x5d950a(0x185),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4ed4c5){const _0x5697ca=a34_0x5d950a,_0x5182a3=normalizeScene(_0x4ed4c5['str'](_0x5697ca(0x1a9))),_0x1ad0e4=SCENE_TO_LEGACY_TYPE[_0x5182a3],_0x48c686=validateInputSelection(_0x4ed4c5);if(_0x48c686[_0x5697ca(0x1a3)])return dryRun(_0x5697ca(0x190),_0x5697ca(0x1ab))[_0x5697ca(0x180)]({'appCode':_0x4ed4c5['appCode'],'url':_0x48c686[_0x5697ca(0x1a3)],'type':_0x1ad0e4})[_0x5697ca(0x179)](_0x5697ca(0x17b)+_0x5182a3+_0x5697ca(0x194))['build']();const _0x280c2c=requireRuntimeUploadFile(_0x48c686[_0x5697ca(0x189)],'image-file');return dryRun('POST','/client/uploadFile')[_0x5697ca(0x180)]({'steps':[{'method':'POST','url':_0x5697ca(0x1a0),'body':{'appCode':_0x4ed4c5[_0x5697ca(0x18f)],'multipart':{'file':_0x280c2c}}},{'method':_0x5697ca(0x190),'url':'/client/queryFileUrl','body':{'filePath':_0x5697ca(0x1af),'downloadFlag':![]}},{'method':_0x5697ca(0x190),'url':_0x5697ca(0x1ab),'body':{'appCode':_0x4ed4c5[_0x5697ca(0x18f)],'url':_0x5697ca(0x17d),'type':_0x1ad0e4}}]})[_0x5697ca(0x179)](_0x5697ca(0x1a4)+_0x5182a3+_0x5697ca(0x19d))[_0x5697ca(0x19a)]();},async 'execute'(_0x395c3b){const _0x1b31cf=a34_0x5d950a,_0x3f8d59=normalizeScene(_0x395c3b[_0x1b31cf(0x17a)](_0x1b31cf(0x1a9))),_0x399d7d=SCENE_TO_LEGACY_TYPE[_0x3f8d59],_0x3278a4=validateInputSelection(_0x395c3b);if(_0x3278a4[_0x1b31cf(0x1a3)]){const _0xbeab42=await recognizeRuntimeOcr(_0x395c3b[_0x1b31cf(0x18f)],{'url':_0x3278a4['imageUrl'],'type':_0x399d7d});return{'ok':!![],'data':withScene(_0xbeab42,_0x3f8d59)};}const _0x2f2557=requireRuntimeUploadFile(_0x3278a4[_0x1b31cf(0x189)],_0x1b31cf(0x19b)),_0x5a183e=await uploadRuntimeFile(_0x395c3b[_0x1b31cf(0x18f)],_0x2f2557[_0x1b31cf(0x19f)]);if(!_0x5a183e[_0x1b31cf(0x187)])throw CliErrors[_0x1b31cf(0x1a1)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x69b448=await queryRuntimeFileUrl(_0x5a183e[_0x1b31cf(0x187)],{'download':![]});if(!_0x69b448['fileUrl'])throw CliErrors[_0x1b31cf(0x1a1)](_0x1b31cf(0x18a));const _0x3e3217=await recognizeRuntimeOcr(_0x395c3b[_0x1b31cf(0x18f)],{'url':_0x69b448['fileUrl'],'type':_0x399d7d});return{'ok':!![],'data':withScene(_0x3e3217,_0x3f8d59,_0x5a183e)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x32345f=a34_0x1667;(function(_0x34f06a,_0x564518){const _0x2ef896=a34_0x1667,_0x35cb31=_0x34f06a();while(!![]){try{const _0x292612=-parseInt(_0x2ef896(0x134))/0x1*(-parseInt(_0x2ef896(0x132))/0x2)+-parseInt(_0x2ef896(0x12a))/0x3+parseInt(_0x2ef896(0x131))/0x4+-parseInt(_0x2ef896(0x11d))/0x5*(parseInt(_0x2ef896(0x107))/0x6)+parseInt(_0x2ef896(0x11c))/0x7+parseInt(_0x2ef896(0x124))/0x8+-parseInt(_0x2ef896(0x103))/0x9;if(_0x292612===_0x564518)break;else _0x35cb31['push'](_0x35cb31['shift']());}catch(_0x27624e){_0x35cb31['push'](_0x35cb31['shift']());}}}(a34_0x25a2,0x94d30));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=['invoice',a34_0x32345f(0x118),a34_0x32345f(0x119),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':'Invoice','general':a34_0x32345f(0x116),'form':a34_0x32345f(0x120),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':'string','required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x32345f(0x10c)},IMAGE_FILE_FLAG={'name':a34_0x32345f(0x123),'type':a34_0x32345f(0x100),'description':a34_0x32345f(0x112)},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x32345f(0x100),'description':a34_0x32345f(0x12b)};function normalizeScene(_0xb6c6ea){const _0x4d9fb5=a34_0x32345f,_0x1b563a=_0xb6c6ea[_0x4d9fb5(0x130)]()['toLowerCase']();if(_0x1b563a===_0x4d9fb5(0x127))return _0x4d9fb5(0x11a);if(_0x1b563a===_0x4d9fb5(0x101)||_0x1b563a==='general'||_0x1b563a===_0x4d9fb5(0x119))return _0x1b563a;throw CliErrors['validation']('Unsupported\x20OCR\x20scene:\x20'+_0xb6c6ea+_0x4d9fb5(0x102)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0xef87b2){const _0x2d9196=a34_0x32345f,_0x24dad7=_0xef87b2[_0x2d9196(0x11f)]('image-file')[_0x2d9196(0x130)](),_0x15313c=_0xef87b2[_0x2d9196(0x11f)](_0x2d9196(0x113))['trim']();return{'imageFile':_0x24dad7,'imageUrl':_0x15313c,'count':[_0x24dad7,_0x15313c][_0x2d9196(0x126)](Boolean)['length']};}function a34_0x1667(_0x28688c,_0x27f3ae){_0x28688c=_0x28688c-0x100;const _0x25a23c=a34_0x25a2();let _0x166711=_0x25a23c[_0x28688c];return _0x166711;}function validateInputSelection(_0x7dad10){const _0x54482d=a34_0x32345f,_0x4df5aa=selectedInputs(_0x7dad10);if(_0x4df5aa[_0x54482d(0x121)]!==0x1)throw CliErrors[_0x54482d(0x11e)](_0x54482d(0x110));return _0x4df5aa;}function withScene(_0x5e6a06,_0x915a6e,_0x5cbb78){const _0x4239ec=a34_0x32345f;return{..._0x5e6a06,'scene':_0x915a6e,..._0x5cbb78?{'sourceFile':{'fileName':_0x5cbb78[_0x4239ec(0x114)],'filePath':_0x5cbb78[_0x4239ec(0x133)]}}:{}};}const ocrRecognize={'service':a34_0x32345f(0x128),'command':'recognize','description':a34_0x32345f(0x10a),'risk':a34_0x32345f(0x129),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x246154){const _0x243b73=a34_0x32345f,_0x33cfee=normalizeScene(_0x246154[_0x243b73(0x11f)](_0x243b73(0x10f))),_0x527275=SCENE_TO_LEGACY_TYPE[_0x33cfee],_0x519c8c=validateInputSelection(_0x246154);if(_0x519c8c[_0x243b73(0x115)])return dryRun('POST',_0x243b73(0x10e))[_0x243b73(0x12c)]({'appCode':_0x246154[_0x243b73(0x111)],'url':_0x519c8c[_0x243b73(0x115)],'type':_0x527275})['description'](_0x243b73(0x122)+_0x33cfee+_0x243b73(0x105))['build']();const _0xe8d2f=requireRuntimeUploadFile(_0x519c8c[_0x243b73(0x12e)],_0x243b73(0x123));return dryRun(_0x243b73(0x10d),_0x243b73(0x104))[_0x243b73(0x12c)]({'steps':[{'method':_0x243b73(0x10d),'url':_0x243b73(0x104),'body':{'appCode':_0x246154['appCode'],'multipart':{'file':_0xe8d2f}}},{'method':_0x243b73(0x10d),'url':'/client/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':_0x243b73(0x10d),'url':_0x243b73(0x10e),'body':{'appCode':_0x246154['appCode'],'url':_0x243b73(0x10b),'type':_0x527275}}]})[_0x243b73(0x109)](_0x243b73(0x108)+_0x33cfee+_0x243b73(0x125))[_0x243b73(0x12f)]();},async 'execute'(_0x4ad5d){const _0x9ad5fd=a34_0x32345f,_0x396389=normalizeScene(_0x4ad5d['str']('scene')),_0x1c0eaf=SCENE_TO_LEGACY_TYPE[_0x396389],_0x3a1e3c=validateInputSelection(_0x4ad5d);if(_0x3a1e3c[_0x9ad5fd(0x115)]){const _0x215a11=await recognizeRuntimeOcr(_0x4ad5d[_0x9ad5fd(0x111)],{'url':_0x3a1e3c[_0x9ad5fd(0x115)],'type':_0x1c0eaf});return{'ok':!![],'data':withScene(_0x215a11,_0x396389)};}const _0x9ad9f=requireRuntimeUploadFile(_0x3a1e3c[_0x9ad5fd(0x12e)],'image-file'),_0x360d22=await uploadRuntimeFile(_0x4ad5d[_0x9ad5fd(0x111)],_0x9ad9f['path']);if(!_0x360d22['filePath'])throw CliErrors['apiError'](_0x9ad5fd(0x11b));const _0x30696f=await queryRuntimeFileUrl(_0x360d22['filePath'],{'download':![]});if(!_0x30696f[_0x9ad5fd(0x12d)])throw CliErrors[_0x9ad5fd(0x117)](_0x9ad5fd(0x106));const _0x554ca5=await recognizeRuntimeOcr(_0x4ad5d[_0x9ad5fd(0x111)],{'url':_0x30696f[_0x9ad5fd(0x12d)],'type':_0x1c0eaf});return{'ok':!![],'data':withScene(_0x554ca5,_0x396389,_0x360d22)};}};function a34_0x25a2(){const _0x249535=['write','1473339xaWVkx','Publicly\x20accessible\x20image\x20or\x20file\x20URL','body','fileUrl','imageFile','build','trim','1214020LSeCJb','2104636JgGGDA','filePath','1MzVWkl','string','invoice','.\x20Supported\x20scenes:\x20','2037870PAFHes','/client/uploadFile','\x20OCR\x20from\x20URL','File\x20URL\x20response\x20missing\x20fileUrl.','348186LmhjBZ','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','description','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','POST','/client/ocr','scene','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','appCode','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','image-url','fileName','imageUrl','General','apiError','general','form','idCard','File\x20upload\x20response\x20missing\x20filePath.','6217512gojjKF','80LQjnhv','validation','str','Table','count','Preview:\x20recognize\x20','image-file','92672dLknIF','\x20OCR','filter','idcard','ocr'];a34_0x25a2=function(){return _0x249535;};return a34_0x25a2();}export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x47bfaa=a35_0x2304;(function(_0x146239,_0x9a872b){const _0xddaf6=a35_0x2304,_0x494d8b=_0x146239();while(!![]){try{const _0x18a09c=-parseInt(_0xddaf6(0x119))/0x1+parseInt(_0xddaf6(0x114))/0x2*(-parseInt(_0xddaf6(0xe8))/0x3)+parseInt(_0xddaf6(0xe9))/0x4+parseInt(_0xddaf6(0x102))/0x5+parseInt(_0xddaf6(0x121))/0x6*(-parseInt(_0xddaf6(0xfd))/0x7)+parseInt(_0xddaf6(0x113))/0x8*(parseInt(_0xddaf6(0x120))/0x9)+-parseInt(_0xddaf6(0x11a))/0xa;if(_0x18a09c===_0x9a872b)break;else _0x494d8b['push'](_0x494d8b['shift']());}catch(_0x28d9f3){_0x494d8b['push'](_0x494d8b['shift']());}}}(a35_0x2c33,0xabc92));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';function a35_0x2c33(){const _0x440568=['verbose','gmtModified','Personal\x20BFF\x20description','Personal\x20BFF\x20script\x20ID','description','sourceSessionId','76827GTAJBm','4688892dJcriH','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','build','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','POST','Update\x20a\x20personal\x20BFF\x20by\x20id','updateTime','Optional\x20source\x20RuntimeAgent\x20session\x20id','string','createTime','body','str','Preview:\x20create\x20personal\x20BFF\x20','functionName','map','/client/runtime-bff/personal/create','Updated\x20personal\x20BFF\x20','isFile','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','utf8','7trdvKf','scriptContent','personal-bff','source-session-id','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','2727820VbzNTA','name','params','flag','Preview:\x20update\x20personal\x20BFF\x20','File\x20is\x20not\x20a\x20regular\x20file:\x20','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','exec','appCode','read','test','gmtCreate','/client/runtime-bff/personal/','file','bool','update','num','479112dOmOUu','34jLbqQX','high-risk-write','File\x20not\x20found:\x20','File\x20path\x20is\x20required.','createUserId','581295YpMuIV','2198760GExORb','isArray','scriptType','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','validation','write','108NDyRiG','2977782tpXdIn','trim','keys','Created\x20personal\x20BFF\x20'];a35_0x2c33=function(){return _0x440568;};return a35_0x2c33();}import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a35_0x2304(_0x1c9a67,_0x50af77){_0x1c9a67=_0x1c9a67-0xdf;const _0x2c33e0=a35_0x2c33();let _0x230442=_0x2c33e0[_0x1c9a67];return _0x230442;}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_0x47bfaa(0x10f),'type':a35_0x47bfaa(0xf1),'description':a35_0x47bfaa(0xec)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x47bfaa(0xf1),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':'description','type':a35_0x47bfaa(0xf1),'description':a35_0x47bfaa(0xe4)},SOURCE_SESSION_FLAG={'name':a35_0x47bfaa(0x100),'type':a35_0x47bfaa(0xf1),'description':a35_0x47bfaa(0xf0)};function normalizeFunctionName(_0x20cbf7){const _0x2035ba=a35_0x47bfaa,_0x508f5d=String(_0x20cbf7||'')['trim']();if(!_0x508f5d||!FUNCTION_NAME_PATTERN[_0x2035ba(0x10c)](_0x508f5d))throw CliErrors[_0x2035ba(0x11e)](_0x2035ba(0xea));return _0x508f5d;}function readScriptFile(_0x560eae){const _0x41fb0b=a35_0x47bfaa;if(!_0x560eae)throw CliErrors[_0x41fb0b(0x11e)](_0x41fb0b(0x117));if(!existsSync(_0x560eae))throw CliErrors[_0x41fb0b(0x11e)](_0x41fb0b(0x116)+_0x560eae);if(!statSync(_0x560eae)[_0x41fb0b(0xfa)]())throw CliErrors[_0x41fb0b(0x11e)](_0x41fb0b(0x107)+_0x560eae);const _0x18158a=readFileSync(_0x560eae,_0x41fb0b(0xfc));if(!_0x18158a[_0x41fb0b(0xdf)]())throw CliErrors[_0x41fb0b(0x11e)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x18158a;}function optionalTrimmed(_0x22b26e){const _0x5a17a8=a35_0x47bfaa,_0xfe434d=String(_0x22b26e||'')[_0x5a17a8(0xdf)]();return _0xfe434d||undefined;}function summarizeBff(_0x5305fb){const _0x4cb122=a35_0x47bfaa;return{'id':_0x5305fb['id'],'appCode':_0x5305fb['appCode'],'functionName':_0x5305fb[_0x4cb122(0xf6)],'description':_0x5305fb[_0x4cb122(0xe6)],'scriptType':_0x5305fb[_0x4cb122(0x11c)],'version':_0x5305fb['version'],'gmtModified':_0x5305fb[_0x4cb122(0xe3)],'updateTime':_0x5305fb[_0x4cb122(0xef)]};}function detailBff(_0x5dc0e3){const _0x5ecb66=a35_0x47bfaa;return{'id':_0x5dc0e3['id'],'appCode':_0x5dc0e3['appCode'],'functionName':_0x5dc0e3[_0x5ecb66(0xf6)],'description':_0x5dc0e3['description'],'scriptType':_0x5dc0e3[_0x5ecb66(0x11c)],'scriptContent':_0x5dc0e3[_0x5ecb66(0xfe)]??'','config':_0x5dc0e3['config'],'version':_0x5dc0e3['version'],'createUserId':_0x5dc0e3[_0x5ecb66(0x118)],'gmtCreate':_0x5dc0e3[_0x5ecb66(0x10d)],'gmtModified':_0x5dc0e3[_0x5ecb66(0xe3)],'createTime':_0x5dc0e3[_0x5ecb66(0xf2)],'updateTime':_0x5dc0e3[_0x5ecb66(0xef)]};}function buildCreateInput(_0x216ee9){const _0x25d6af=a35_0x47bfaa;return{'functionName':normalizeFunctionName(_0x216ee9['str'](_0x25d6af(0x103))),...optionalTrimmed(_0x216ee9[_0x25d6af(0xf4)](_0x25d6af(0xe6)))?{'description':optionalTrimmed(_0x216ee9[_0x25d6af(0xf4)](_0x25d6af(0xe6)))}:{},'scriptContent':readScriptFile(_0x216ee9[_0x25d6af(0xf4)](_0x25d6af(0x10f))),...optionalTrimmed(_0x216ee9[_0x25d6af(0xf4)](_0x25d6af(0x100)))?{'sourceSessionId':optionalTrimmed(_0x216ee9[_0x25d6af(0xf4)](_0x25d6af(0x100)))}:{}};}function buildUpdateInput(_0x3c34e2){const _0x249090=a35_0x47bfaa,_0x5a5352={};optionalTrimmed(_0x3c34e2[_0x249090(0xf4)](_0x249090(0x103)))&&(_0x5a5352[_0x249090(0xf6)]=normalizeFunctionName(_0x3c34e2[_0x249090(0xf4)](_0x249090(0x103))));_0x3c34e2[_0x249090(0x105)]('description')!==undefined&&(_0x5a5352['description']=_0x3c34e2[_0x249090(0xf4)]('description'));optionalTrimmed(_0x3c34e2[_0x249090(0xf4)](_0x249090(0x10f)))&&(_0x5a5352[_0x249090(0xfe)]=readScriptFile(_0x3c34e2[_0x249090(0xf4)]('file')));_0x3c34e2[_0x249090(0x105)]('source-session-id')!==undefined&&(_0x5a5352[_0x249090(0xe7)]=_0x3c34e2['str'](_0x249090(0x100)));if(Object[_0x249090(0xe0)](_0x5a5352)['length']===0x0)throw CliErrors[_0x249090(0x11e)]('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x5a5352;}function parseExecParams(_0x27674c){const _0x11e2d9=a35_0x47bfaa,_0x187656=parseJsonParams(_0x27674c)??{};if(Array[_0x11e2d9(0x11b)](_0x187656))throw CliErrors[_0x11e2d9(0x11e)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x187656;}const personalBffList={'service':'personal-bff','command':'list','description':a35_0x47bfaa(0x11d),'risk':a35_0x47bfaa(0x10b),'flags':[VERBOSE_FLAG],async 'execute'(_0x397945){const _0x205c66=a35_0x47bfaa,_0x109e64=await listPersonalBffs(_0x397945[_0x205c66(0x10a)]);return{'ok':!![],'data':{'total':_0x109e64['length'],'items':_0x397945[_0x205c66(0x110)](_0x205c66(0xe2))?_0x109e64:_0x109e64[_0x205c66(0xf7)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':'detail','description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a35_0x47bfaa(0xe5)}],async 'execute'(_0x418843){const _0x397337=a35_0x47bfaa,_0x198831=await getPersonalBff(_0x418843[_0x397337(0x112)]('id'),_0x418843[_0x397337(0x10a)]);return{'ok':!![],'data':detailBff(_0x198831)};}},personalBffCreate={'service':a35_0x47bfaa(0xff),'command':'create','description':a35_0x47bfaa(0x108),'risk':a35_0x47bfaa(0x11f),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x35f000){const _0x434f06=a35_0x47bfaa,_0x53093e=buildCreateInput(_0x35f000),_0xce79dd=await createPersonalBff(_0x35f000[_0x434f06(0x10a)],_0x53093e);return{'ok':!![],'data':detailBff(_0xce79dd),'message':_0x434f06(0xe1)+_0xce79dd['id']+(_0xce79dd[_0x434f06(0xf6)]?'\x20('+_0xce79dd[_0x434f06(0xf6)]+')':'')};},async 'dryRun'(_0x4facac){const _0x4245a7=a35_0x47bfaa,_0xcd7b12=buildCreateInput(_0x4facac);return dryRun(_0x4245a7(0xed),_0x4245a7(0xf8))[_0x4245a7(0xf3)]({'appCode':_0x4facac[_0x4245a7(0x10a)],..._0xcd7b12})[_0x4245a7(0xe6)](_0x4245a7(0xf5)+_0xcd7b12[_0x4245a7(0xf6)])[_0x4245a7(0xeb)]();}},personalBffUpdate={'service':a35_0x47bfaa(0xff),'command':a35_0x47bfaa(0x111),'description':a35_0x47bfaa(0xee),'risk':'write','flags':[{...ID_FLAG,'description':a35_0x47bfaa(0xe5)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x130190){const _0x1e9d6c=a35_0x47bfaa,_0x2877d2=_0x130190[_0x1e9d6c(0x112)]('id'),_0xcbdb13=buildUpdateInput(_0x130190),_0x1f8b02=await updatePersonalBff(_0x2877d2,_0x130190[_0x1e9d6c(0x10a)],_0xcbdb13);return{'ok':!![],'data':detailBff(_0x1f8b02),'message':_0x1e9d6c(0xf9)+_0x1f8b02['id']+(_0x1f8b02[_0x1e9d6c(0xf6)]?'\x20('+_0x1f8b02[_0x1e9d6c(0xf6)]+')':'')};},async 'dryRun'(_0x394cc9){const _0x546b29=a35_0x47bfaa,_0x3b91ed=_0x394cc9[_0x546b29(0x112)]('id'),_0x477af4=buildUpdateInput(_0x394cc9);return dryRun(_0x546b29(0xed),_0x546b29(0x10e)+_0x3b91ed+'/update')[_0x546b29(0xf3)]({'appCode':_0x394cc9[_0x546b29(0x10a)],..._0x477af4})[_0x546b29(0xe6)](_0x546b29(0x106)+_0x3b91ed)[_0x546b29(0xeb)]();}},personalBffExec={'service':'personal-bff','command':a35_0x47bfaa(0x109),'description':a35_0x47bfaa(0xfb),'risk':a35_0x47bfaa(0x115),'flags':[{...ID_FLAG,'description':a35_0x47bfaa(0xe5)},{...PARAMS_FLAG,'description':a35_0x47bfaa(0x101)}],async 'validate'(_0x2d6845){const _0x5080c0=a35_0x47bfaa;parseExecParams(_0x2d6845[_0x5080c0(0xf4)](_0x5080c0(0x104)));},async 'execute'(_0x3679f1){const _0x47cb64=a35_0x47bfaa,_0x170d39=_0x3679f1[_0x47cb64(0x112)]('id'),_0x59bf02=parseExecParams(_0x3679f1[_0x47cb64(0xf4)](_0x47cb64(0x104))),_0x23fbde=await executePersonalBff(_0x170d39,_0x3679f1['appCode'],_0x59bf02);return{'ok':!![],'data':{'result':_0x23fbde},'message':'Executed\x20personal\x20BFF\x20'+_0x170d39};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x2a786e=a35_0x3254;(function(_0x35c149,_0x27dfa1){const _0x2fde04=a35_0x3254,_0x1caa45=_0x35c149();while(!![]){try{const _0x1a7ef5=parseInt(_0x2fde04(0xee))/0x1*(-parseInt(_0x2fde04(0x100))/0x2)+-parseInt(_0x2fde04(0xf0))/0x3+parseInt(_0x2fde04(0x110))/0x4*(parseInt(_0x2fde04(0xfa))/0x5)+parseInt(_0x2fde04(0x125))/0x6+-parseInt(_0x2fde04(0xfb))/0x7*(parseInt(_0x2fde04(0x10e))/0x8)+-parseInt(_0x2fde04(0xfc))/0x9*(parseInt(_0x2fde04(0x111))/0xa)+parseInt(_0x2fde04(0xe7))/0xb;if(_0x1a7ef5===_0x27dfa1)break;else _0x1caa45['push'](_0x1caa45['shift']());}catch(_0x4a1069){_0x1caa45['push'](_0x1caa45['shift']());}}}(a35_0x864a,0xba37f));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';function a35_0x3254(_0x4ceb70,_0x489e38){_0x4ceb70=_0x4ceb70-0xe4;const _0x864a9d=a35_0x864a();let _0x3254af=_0x864a9d[_0x4ceb70];return _0x3254af;}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_0x2a786e(0x123),'type':a35_0x2a786e(0xf2),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a35_0x2a786e(0xeb),'type':a35_0x2a786e(0xf2),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':'description','type':a35_0x2a786e(0xf2),'description':a35_0x2a786e(0x106)},SOURCE_SESSION_FLAG={'name':a35_0x2a786e(0x126),'type':a35_0x2a786e(0xf2),'description':a35_0x2a786e(0xf9)};function normalizeFunctionName(_0x82207b){const _0x2a4680=a35_0x2a786e,_0x17ed96=String(_0x82207b||'')[_0x2a4680(0x11b)]();if(!_0x17ed96||!FUNCTION_NAME_PATTERN[_0x2a4680(0xf6)](_0x17ed96))throw CliErrors['validation'](_0x2a4680(0x122));return _0x17ed96;}function readScriptFile(_0x40c655){const _0xcf4d62=a35_0x2a786e;if(!_0x40c655)throw CliErrors[_0xcf4d62(0xf3)](_0xcf4d62(0x116));if(!existsSync(_0x40c655))throw CliErrors[_0xcf4d62(0xf3)]('File\x20not\x20found:\x20'+_0x40c655);if(!statSync(_0x40c655)['isFile']())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x40c655);const _0x1f6508=readFileSync(_0x40c655,_0xcf4d62(0x112));if(!_0x1f6508[_0xcf4d62(0x11b)]())throw CliErrors['validation']('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x1f6508;}function optionalTrimmed(_0x24960a){const _0x20999b=String(_0x24960a||'')['trim']();return _0x20999b||undefined;}function a35_0x864a(){const _0x1991f3=['update','Optional\x20source\x20RuntimeAgent\x20session\x20id','181820ICmMko','922908reFeJT','423PfhGNI','Show\x20one\x20personal\x20BFF\x20by\x20id','map','updateTime','148qeaiqF','exec','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','body','write','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','Personal\x20BFF\x20description','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','POST','gmtModified','personal-bff','scriptType','length','8Xpwlfy','createUserId','52lfifsv','96290ntkMeS','utf8','str','--params\x20must\x20be\x20a\x20JSON\x20object.','/client/runtime-bff/personal/','File\x20path\x20is\x20required.','Executed\x20personal\x20BFF\x20','version','gmtCreate','config','trim','keys','Preview:\x20update\x20personal\x20BFF\x20','Preview:\x20create\x20personal\x20BFF\x20','params','functionName','sourceSessionId','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','file','Update\x20a\x20personal\x20BFF\x20by\x20id','5363904CuopGa','source-session-id','build','Updated\x20personal\x20BFF\x20','list','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','7824509NeCaea','create','scriptContent','Personal\x20BFF\x20script\x20ID','name','description','verbose','2185GXSXgj','appCode','1707561gNblFF','read','string','validation','bool','flag','test','num'];a35_0x864a=function(){return _0x1991f3;};return a35_0x864a();}function summarizeBff(_0x1908b0){const _0x4e5b3f=a35_0x2a786e;return{'id':_0x1908b0['id'],'appCode':_0x1908b0[_0x4e5b3f(0xef)],'functionName':_0x1908b0[_0x4e5b3f(0x120)],'description':_0x1908b0[_0x4e5b3f(0xec)],'scriptType':_0x1908b0[_0x4e5b3f(0x10c)],'version':_0x1908b0['version'],'gmtModified':_0x1908b0[_0x4e5b3f(0x10a)],'updateTime':_0x1908b0[_0x4e5b3f(0xff)]};}function detailBff(_0x22afe2){const _0xa09fd4=a35_0x2a786e;return{'id':_0x22afe2['id'],'appCode':_0x22afe2['appCode'],'functionName':_0x22afe2[_0xa09fd4(0x120)],'description':_0x22afe2['description'],'scriptType':_0x22afe2[_0xa09fd4(0x10c)],'scriptContent':_0x22afe2['scriptContent']??'','config':_0x22afe2[_0xa09fd4(0x11a)],'version':_0x22afe2[_0xa09fd4(0x118)],'createUserId':_0x22afe2[_0xa09fd4(0x10f)],'gmtCreate':_0x22afe2[_0xa09fd4(0x119)],'gmtModified':_0x22afe2[_0xa09fd4(0x10a)],'createTime':_0x22afe2['createTime'],'updateTime':_0x22afe2[_0xa09fd4(0xff)]};}function buildCreateInput(_0x4e2230){const _0x1dd9cf=a35_0x2a786e;return{'functionName':normalizeFunctionName(_0x4e2230[_0x1dd9cf(0x113)]('name')),...optionalTrimmed(_0x4e2230[_0x1dd9cf(0x113)]('description'))?{'description':optionalTrimmed(_0x4e2230[_0x1dd9cf(0x113)](_0x1dd9cf(0xec)))}:{},'scriptContent':readScriptFile(_0x4e2230[_0x1dd9cf(0x113)](_0x1dd9cf(0x123))),...optionalTrimmed(_0x4e2230[_0x1dd9cf(0x113)](_0x1dd9cf(0x126)))?{'sourceSessionId':optionalTrimmed(_0x4e2230['str']('source-session-id'))}:{}};}function buildUpdateInput(_0x30ab84){const _0x34126d=a35_0x2a786e,_0x2c6f8c={};optionalTrimmed(_0x30ab84[_0x34126d(0x113)]('name'))&&(_0x2c6f8c[_0x34126d(0x120)]=normalizeFunctionName(_0x30ab84[_0x34126d(0x113)](_0x34126d(0xeb))));_0x30ab84[_0x34126d(0xf5)](_0x34126d(0xec))!==undefined&&(_0x2c6f8c[_0x34126d(0xec)]=_0x30ab84['str']('description'));optionalTrimmed(_0x30ab84[_0x34126d(0x113)](_0x34126d(0x123)))&&(_0x2c6f8c[_0x34126d(0xe9)]=readScriptFile(_0x30ab84['str']('file')));_0x30ab84['flag']('source-session-id')!==undefined&&(_0x2c6f8c[_0x34126d(0x121)]=_0x30ab84[_0x34126d(0x113)](_0x34126d(0x126)));if(Object[_0x34126d(0x11c)](_0x2c6f8c)[_0x34126d(0x10d)]===0x0)throw CliErrors['validation'](_0x34126d(0x107));return _0x2c6f8c;}function parseExecParams(_0x5c9bbc){const _0x1b1049=a35_0x2a786e,_0x386c83=parseJsonParams(_0x5c9bbc)??{};if(Array['isArray'](_0x386c83))throw CliErrors['validation'](_0x1b1049(0x114));return _0x386c83;}const personalBffList={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0xe5),'description':a35_0x2a786e(0xe6),'risk':a35_0x2a786e(0xf1),'flags':[VERBOSE_FLAG],async 'execute'(_0x5caa52){const _0x4006ea=a35_0x2a786e,_0x140497=await listPersonalBffs(_0x5caa52['appCode']);return{'ok':!![],'data':{'total':_0x140497[_0x4006ea(0x10d)],'items':_0x5caa52[_0x4006ea(0xf4)](_0x4006ea(0xed))?_0x140497:_0x140497[_0x4006ea(0xfe)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':'detail','description':a35_0x2a786e(0xfd),'risk':a35_0x2a786e(0xf1),'flags':[{...ID_FLAG,'description':a35_0x2a786e(0xea)}],async 'execute'(_0x43171e){const _0x11cab5=a35_0x2a786e,_0x47d490=await getPersonalBff(_0x43171e[_0x11cab5(0xf7)]('id'),_0x43171e[_0x11cab5(0xef)]);return{'ok':!![],'data':detailBff(_0x47d490)};}},personalBffCreate={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0xe8),'description':a35_0x2a786e(0x105),'risk':a35_0x2a786e(0x104),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x381b46){const _0x31be55=a35_0x2a786e,_0x408010=buildCreateInput(_0x381b46),_0x409bf5=await createPersonalBff(_0x381b46['appCode'],_0x408010);return{'ok':!![],'data':detailBff(_0x409bf5),'message':'Created\x20personal\x20BFF\x20'+_0x409bf5['id']+(_0x409bf5[_0x31be55(0x120)]?'\x20('+_0x409bf5[_0x31be55(0x120)]+')':'')};},async 'dryRun'(_0x54ad7b){const _0x40614c=a35_0x2a786e,_0x4d360e=buildCreateInput(_0x54ad7b);return dryRun(_0x40614c(0x109),'/client/runtime-bff/personal/create')['body']({'appCode':_0x54ad7b[_0x40614c(0xef)],..._0x4d360e})[_0x40614c(0xec)](_0x40614c(0x11e)+_0x4d360e[_0x40614c(0x120)])[_0x40614c(0x127)]();}},personalBffUpdate={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0xf8),'description':a35_0x2a786e(0x124),'risk':a35_0x2a786e(0x104),'flags':[{...ID_FLAG,'description':a35_0x2a786e(0xea)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x36c762){const _0x19eb01=a35_0x2a786e,_0x23bf6f=_0x36c762[_0x19eb01(0xf7)]('id'),_0x1fbe39=buildUpdateInput(_0x36c762),_0x1d86d6=await updatePersonalBff(_0x23bf6f,_0x36c762['appCode'],_0x1fbe39);return{'ok':!![],'data':detailBff(_0x1d86d6),'message':_0x19eb01(0xe4)+_0x1d86d6['id']+(_0x1d86d6['functionName']?'\x20('+_0x1d86d6[_0x19eb01(0x120)]+')':'')};},async 'dryRun'(_0x19f2d0){const _0x3aaeee=a35_0x2a786e,_0x383795=_0x19f2d0[_0x3aaeee(0xf7)]('id'),_0x494eb1=buildUpdateInput(_0x19f2d0);return dryRun('POST',_0x3aaeee(0x115)+_0x383795+'/update')[_0x3aaeee(0x103)]({'appCode':_0x19f2d0['appCode'],..._0x494eb1})['description'](_0x3aaeee(0x11d)+_0x383795)[_0x3aaeee(0x127)]();}},personalBffExec={'service':a35_0x2a786e(0x10b),'command':a35_0x2a786e(0x101),'description':a35_0x2a786e(0x108),'risk':'high-risk-write','flags':[{...ID_FLAG,'description':a35_0x2a786e(0xea)},{...PARAMS_FLAG,'description':a35_0x2a786e(0x102)}],async 'validate'(_0x1c92e7){const _0x56ee20=a35_0x2a786e;parseExecParams(_0x1c92e7[_0x56ee20(0x113)](_0x56ee20(0x11f)));},async 'execute'(_0x833669){const _0x40b114=a35_0x2a786e,_0x41dfce=_0x833669[_0x40b114(0xf7)]('id'),_0x334adb=parseExecParams(_0x833669[_0x40b114(0x113)](_0x40b114(0x11f))),_0xd4e642=await executePersonalBff(_0x41dfce,_0x833669['appCode'],_0x334adb);return{'ok':!![],'data':{'result':_0xd4e642},'message':_0x40b114(0x117)+_0x41dfce};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x4b117f=a36_0x27e4;(function(_0x54a4f7,_0x2ea409){const _0x58a593=a36_0x27e4,_0x12bc27=_0x54a4f7();while(!![]){try{const _0x30c25e=-parseInt(_0x58a593(0x1bb))/0x1+-parseInt(_0x58a593(0x1b5))/0x2+parseInt(_0x58a593(0x1d4))/0x3+parseInt(_0x58a593(0x1c6))/0x4+parseInt(_0x58a593(0x1d8))/0x5*(-parseInt(_0x58a593(0x1cc))/0x6)+-parseInt(_0x58a593(0x1b3))/0x7+parseInt(_0x58a593(0x1ac))/0x8*(parseInt(_0x58a593(0x1b7))/0x9);if(_0x30c25e===_0x2ea409)break;else _0x12bc27['push'](_0x12bc27['shift']());}catch(_0x11d922){_0x12bc27['push'](_0x12bc27['shift']());}}}(a36_0x5a8d,0xc1a21));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';function a36_0x27e4(_0x192385,_0x30690f){_0x192385=_0x192385-0x1a9;const _0x5a8d47=a36_0x5a8d();let _0x27e454=_0x5a8d47[_0x192385];return _0x27e454;}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';function a36_0x5a8d(){const _0x19661e=['get','defaultCommand','30614232lJJxHe','command','from','write','login','list','Logs','10145352GnZAwS','isSingleCommand','1997710AjYNDM','Workspace','9vUbaDE','Datasets','Service\x20Tree','push','981175YQhqPl','Agent\x20Schedules','SQL\x20Queries','\x20\x20[write]','Diagnostics','Personal\x20BFF','CLI\x20Built-in\x20Skill','App\x20Management','service','show','Self\x20Update','875716RSZlaw','Knowledge\x20Base','API\x20Documentation','read','\x20\x20[high-risk-write]','Artifacts','606bnWykZ','run','risk','map','set','OCR','Schema','Instant\x20API','1311774BSkJvw','has','File','values','12895ABBJEn','BFF\x20Scripts','description'];a36_0x5a8d=function(){return _0x19661e;};return a36_0x5a8d();}import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';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 registerDefinitions(_0x10b44a){const _0x283503=a36_0x27e4;for(const _0x14037e of _0x10b44a){definitions['set'](_0x14037e[_0x283503(0x1c3)]+':'+_0x14037e[_0x283503(0x1ad)],_0x14037e);let _0x18f7db=serviceGroups[_0x283503(0x1aa)](_0x14037e['service']);!_0x18f7db&&(_0x18f7db=[],serviceGroups[_0x283503(0x1d0)](_0x14037e['service'],_0x18f7db)),_0x18f7db[_0x283503(0x1ba)](_0x14037e);}}function registerService(_0x2669d9,_0x532195,_0x420a22){const _0x5c3ed5=a36_0x27e4;registerDefinitions(_0x532195);const _0x41608f=_0x1b42a8=>_0x1b42a8===_0x5c3ed5(0x1c9)?'':_0x1b42a8===_0x5c3ed5(0x1af)?_0x5c3ed5(0x1be):_0x5c3ed5(0x1ca),_0x49a990={'service':_0x532195[0x0][_0x5c3ed5(0x1c3)],'label':_0x2669d9,'commands':_0x532195[_0x5c3ed5(0x1cf)](_0x3210df=>({'command':_0x3210df[_0x5c3ed5(0x1ad)],'description':_0x3210df[_0x5c3ed5(0x1a9)],'tag':_0x41608f(_0x3210df[_0x5c3ed5(0x1ce)])})),'defaultCommand':_0x420a22?.[_0x5c3ed5(0x1ab)]??(_0x420a22?.[_0x5c3ed5(0x1b4)]?_0x532195[0x0][_0x5c3ed5(0x1ad)]:undefined),'isSingleCommand':_0x420a22?.[_0x5c3ed5(0x1b4)]};serviceRegistry[_0x5c3ed5(0x1ba)](_0x49a990),serviceByName[_0x5c3ed5(0x1d0)](_0x49a990['service'],_0x49a990);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x4b117f(0x1b0)}),registerService(a36_0x4b117f(0x1c2),appDefinitions,{'defaultCommand':'list'}),registerService(a36_0x4b117f(0x1b6),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x4b117f(0x1b1)}),registerService(a36_0x4b117f(0x1c8),apiDocDefinitions),registerService(a36_0x4b117f(0x1b8),datasetDefinitions),registerService(a36_0x4b117f(0x1d3),dataDefinitions),registerService(a36_0x4b117f(0x1bd),sqlDefinitions),registerService(a36_0x4b117f(0x1d9),bffDefinitions),registerService(a36_0x4b117f(0x1c0),personalBffDefinitions),registerService(a36_0x4b117f(0x1cb),artifactDefinitions),registerService(a36_0x4b117f(0x1d6),fileDefinitions),registerService(a36_0x4b117f(0x1d1),ocrDefinitions),registerService(a36_0x4b117f(0x1c7),kbDefinitions),registerService(a36_0x4b117f(0x1bc),scheduleDefinitions,{'defaultCommand':a36_0x4b117f(0x1b1)}),registerService(a36_0x4b117f(0x1b9),serviceDefinitions,{'defaultCommand':a36_0x4b117f(0x1b1)}),registerService('Skills',skillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x4b117f(0x1c1),cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x4b117f(0x1c5),[updateDefinition],{'defaultCommand':a36_0x4b117f(0x1cd),'isSingleCommand':!![]}),registerService(a36_0x4b117f(0x1bf),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x4b117f(0x1d2),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x4b117f(0x1b2),logsDefinitions,{'defaultCommand':a36_0x4b117f(0x1c4)});export function findDefinition(_0x83d788,_0x2ae1e0){const _0x4ae211=a36_0x4b117f;return definitions[_0x4ae211(0x1aa)](_0x83d788+':'+_0x2ae1e0);}export function isKnownService(_0xc420ad){const _0x58a4e5=a36_0x4b117f;return serviceByName[_0x58a4e5(0x1d5)](_0xc420ad);}export function getServiceEntry(_0x5b8621){const _0x12c2bd=a36_0x4b117f;return serviceByName[_0x12c2bd(0x1aa)](_0x5b8621);}export function getAllDefinitions(){const _0x2c18f2=a36_0x4b117f;return Array[_0x2c18f2(0x1ae)](definitions[_0x2c18f2(0x1d7)]());}
1
+ const a36_0x171eec=a36_0x1fe6;(function(_0x13e0cc,_0x4a5bbf){const _0x1a9aa1=a36_0x1fe6,_0x13c5d3=_0x13e0cc();while(!![]){try{const _0x486e93=parseInt(_0x1a9aa1(0x180))/0x1+-parseInt(_0x1a9aa1(0x175))/0x2*(-parseInt(_0x1a9aa1(0x164))/0x3)+-parseInt(_0x1a9aa1(0x169))/0x4*(-parseInt(_0x1a9aa1(0x17c))/0x5)+parseInt(_0x1a9aa1(0x179))/0x6*(-parseInt(_0x1a9aa1(0x167))/0x7)+-parseInt(_0x1a9aa1(0x16e))/0x8+parseInt(_0x1a9aa1(0x16c))/0x9+parseInt(_0x1a9aa1(0x16d))/0xa;if(_0x486e93===_0x4a5bbf)break;else _0x13c5d3['push'](_0x13c5d3['shift']());}catch(_0x5a2e85){_0x13c5d3['push'](_0x13c5d3['shift']());}}}(a36_0x5765,0x5c9fc));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a36_0x1fe6(_0x47afda,_0x50a716){_0x47afda=_0x47afda-0x159;const _0x576579=a36_0x5765();let _0x1fe602=_0x576579[_0x47afda];return _0x1fe602;}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';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=[];function a36_0x5765(){const _0x2ace1e=['Instant\x20API','Agent\x20Schedules','2146131WOWSqd','5784810mCbCpH','5840832vJoPlc','service','read','get','install','Workspace','command','307778pcMWzo','Service\x20Tree','\x20\x20[write]','Knowledge\x20Base','65694YYBeoG','set','Artifacts','15SCRehO','CLI\x20Built-in\x20Skill','risk','show','280161WNGlPv','Skills','isSingleCommand','has','values','Logs','from','list','App\x20Management','Configuration','\x20\x20[high-risk-write]','push','File','Authentication','6dUIJLy','run','OCR','371wWnMWs','description','379880KHPJkk'];a36_0x5765=function(){return _0x2ace1e;};return a36_0x5765();}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x42cd07){const _0x1fa3b1=a36_0x1fe6;for(const _0x3749ae of _0x42cd07){definitions[_0x1fa3b1(0x17a)](_0x3749ae[_0x1fa3b1(0x16f)]+':'+_0x3749ae[_0x1fa3b1(0x174)],_0x3749ae);let _0x37243d=serviceGroups[_0x1fa3b1(0x171)](_0x3749ae[_0x1fa3b1(0x16f)]);!_0x37243d&&(_0x37243d=[],serviceGroups['set'](_0x3749ae[_0x1fa3b1(0x16f)],_0x37243d)),_0x37243d['push'](_0x3749ae);}}function registerService(_0x496b97,_0x3d8af8,_0x3114ea){const _0x1cee62=a36_0x1fe6;registerDefinitions(_0x3d8af8);const _0x4e80dc=_0x5e9115=>_0x5e9115===_0x1cee62(0x170)?'':_0x5e9115==='write'?_0x1cee62(0x177):_0x1cee62(0x160),_0x5ec0c8={'service':_0x3d8af8[0x0][_0x1cee62(0x16f)],'label':_0x496b97,'commands':_0x3d8af8['map'](_0x85608c=>({'command':_0x85608c[_0x1cee62(0x174)],'description':_0x85608c[_0x1cee62(0x168)],'tag':_0x4e80dc(_0x85608c[_0x1cee62(0x17e)])})),'defaultCommand':_0x3114ea?.['defaultCommand']??(_0x3114ea?.['isSingleCommand']?_0x3d8af8[0x0]['command']:undefined),'isSingleCommand':_0x3114ea?.[_0x1cee62(0x182)]};serviceRegistry[_0x1cee62(0x161)](_0x5ec0c8),serviceByName[_0x1cee62(0x17a)](_0x5ec0c8[_0x1cee62(0x16f)],_0x5ec0c8);}registerService(a36_0x171eec(0x163),authDefinitions,{'defaultCommand':'login'}),registerService(a36_0x171eec(0x15e),appDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService(a36_0x171eec(0x173),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a36_0x171eec(0x15f),configDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService('API\x20Documentation',apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a36_0x171eec(0x16a),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService(a36_0x171eec(0x17b),artifactDefinitions),registerService(a36_0x171eec(0x162),fileDefinitions),registerService(a36_0x171eec(0x166),ocrDefinitions),registerService(a36_0x171eec(0x178),kbDefinitions),registerService(a36_0x171eec(0x16b),scheduleDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService(a36_0x171eec(0x176),serviceDefinitions,{'defaultCommand':a36_0x171eec(0x15d)}),registerService(a36_0x171eec(0x181),skillDefinitions,{'defaultCommand':a36_0x171eec(0x172)}),registerService(a36_0x171eec(0x17d),cliSkillDefinitions,{'defaultCommand':a36_0x171eec(0x172)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x171eec(0x165),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x171eec(0x15b),logsDefinitions,{'defaultCommand':a36_0x171eec(0x17f)});export function findDefinition(_0x50412f,_0x3b62bc){const _0x33ec29=a36_0x171eec;return definitions[_0x33ec29(0x171)](_0x50412f+':'+_0x3b62bc);}export function isKnownService(_0x4a5b60){const _0x5581ab=a36_0x171eec;return serviceByName[_0x5581ab(0x159)](_0x4a5b60);}export function getServiceEntry(_0x337ac4){const _0xb37f90=a36_0x171eec;return serviceByName[_0xb37f90(0x171)](_0x337ac4);}export function getAllDefinitions(){const _0x220447=a36_0x171eec;return Array[_0x220447(0x15c)](definitions[_0x220447(0x15a)]());}
@@ -1 +1 @@
1
- const a37_0x56bfa2=a37_0x1d6c;(function(_0x6cabf8,_0x5c3fcb){const _0x5308a2=a37_0x1d6c,_0x3ac372=_0x6cabf8();while(!![]){try{const _0x12de52=-parseInt(_0x5308a2(0xc1))/0x1+-parseInt(_0x5308a2(0x84))/0x2+-parseInt(_0x5308a2(0xbe))/0x3+-parseInt(_0x5308a2(0x88))/0x4*(parseInt(_0x5308a2(0x8c))/0x5)+-parseInt(_0x5308a2(0xaf))/0x6*(-parseInt(_0x5308a2(0xbb))/0x7)+parseInt(_0x5308a2(0xc7))/0x8+parseInt(_0x5308a2(0xac))/0x9*(parseInt(_0x5308a2(0xbd))/0xa);if(_0x12de52===_0x5c3fcb)break;else _0x3ac372['push'](_0x3ac372['shift']());}catch(_0x5e9fae){_0x3ac372['push'](_0x3ac372['shift']());}}}(a37_0x5771,0x1fa3f));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_0x56bfa2(0x8e),'type':a37_0x56bfa2(0x82),'required':!![],'enum':[a37_0x56bfa2(0x91),a37_0x56bfa2(0x98)],'description':a37_0x56bfa2(0x80)},CRON_FLAG={'name':a37_0x56bfa2(0xb9),'type':'string','description':a37_0x56bfa2(0xb1)},SCHEDULED_AT_FLAG={'name':a37_0x56bfa2(0xb4),'type':'string','description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':'title','type':a37_0x56bfa2(0x82),'required':!![],'description':a37_0x56bfa2(0x9a)},PROMPT_FLAG={'name':a37_0x56bfa2(0x9e),'type':a37_0x56bfa2(0x82),'required':!![],'description':a37_0x56bfa2(0xb2)},CHANNEL_FLAG={'name':a37_0x56bfa2(0xa2),'type':a37_0x56bfa2(0x82),'enum':[a37_0x56bfa2(0x97),a37_0x56bfa2(0xab)],'default':'premium','description':a37_0x56bfa2(0xbf)},SCHEDULE_ID_FLAG={'name':'schedule-id','type':a37_0x56bfa2(0x82),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x56bfa2(0x86)}},LIMIT_FLAG={'name':a37_0x56bfa2(0xb7),'type':a37_0x56bfa2(0x89),'default':0x14,'description':a37_0x56bfa2(0xa6)},CURSOR_FLAG={'name':'cursor','type':'string','description':a37_0x56bfa2(0x96)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x184df8){const _0x2e19e6=a37_0x56bfa2,_0x36b9a0=_0x184df8[_0x2e19e6(0xc4)](_0x2e19e6(0x8e)),_0x4a0996=_0x184df8[_0x2e19e6(0xc4)](_0x2e19e6(0xc8))['trim'](),_0x17d6ed=_0x184df8[_0x2e19e6(0xc4)](_0x2e19e6(0x9e))['trim'](),_0x5079ca=_0x184df8[_0x2e19e6(0xc4)]('channel'),_0x3cdf5b=_0x184df8[_0x2e19e6(0xc4)]('cron'),_0x104e0a=_0x184df8[_0x2e19e6(0xc4)]('scheduled-at');if(!_0x4a0996)throw CliErrors['validation'](_0x2e19e6(0xc0));if(!_0x17d6ed)throw CliErrors[_0x2e19e6(0x9c)]('--prompt\x20must\x20not\x20be\x20blank.');if(_0x36b9a0===_0x2e19e6(0x91)){if(!_0x3cdf5b||_0x104e0a)throw CliErrors[_0x2e19e6(0x9c)](_0x2e19e6(0x90));return{'kind':_0x36b9a0,'timezone':_0x2e19e6(0xaa),'cron':_0x3cdf5b,'title':_0x4a0996,'prompt':_0x17d6ed,'channel':_0x5079ca};}if(_0x36b9a0===_0x2e19e6(0x98)){if(!_0x104e0a||_0x3cdf5b)throw CliErrors[_0x2e19e6(0x9c)](_0x2e19e6(0xa4));return{'kind':_0x36b9a0,'timezone':_0x2e19e6(0xaa),'scheduledAt':_0x104e0a,'title':_0x4a0996,'prompt':_0x17d6ed,'channel':_0x5079ca};}throw CliErrors[_0x2e19e6(0x9c)](_0x2e19e6(0xb8));}function a37_0x1d6c(_0xafa3d2,_0x22d7d1){_0xafa3d2=_0xafa3d2-0x7f;const _0x5771e7=a37_0x5771();let _0x1d6c3a=_0x5771e7[_0xafa3d2];return _0x1d6c3a;}function scheduleCollectionPath(_0x141cce){const _0xf90489=a37_0x56bfa2;return'/api/harness/apps/'+encodeURIComponent(_0x141cce)+_0xf90489(0xc5);}function a37_0x5771(){const _0x8e17ff=['appCode','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','limit','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','cron','\x20from\x20schedule\x20','14tGtPIC','Preview:\x20run\x20schedule\x20','10SJUppd','685776uwkLCa','Task\x20channel:\x20auto\x20or\x20premium','--title\x20must\x20not\x20be\x20blank.','123839IjSjQO','/run','Show\x20one\x20schedule\x20by\x20schedule\x20ID','str','/schedules','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','612536Muyseu','title','trim','Schedule\x20kind:\x20CRON\x20or\x20ONCE','validate','string','length','245084eyIdUh','delete','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','Preview:\x20create\x20an\x20Agent\x20schedule','12XvQBzq','number','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','Schedule\x20input\x20is\x20valid','121615UkXsSS','read','kind','description','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','CRON','scheduleId','run','schedule','num','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','auto','ONCE','Preview:\x20delete\x20schedule\x20','Schedule\x20title','schedule-id','validation','body','prompt','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','\x20immediately','channel','list','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','cursor','Page\x20size\x20from\x201\x20to\x20100','Created\x20','DELETE','high-risk-write','UTC','premium','3268116EWpeHY','detail','POST','713550rvwGcr','taskId','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','build','scheduled-at'];a37_0x5771=function(){return _0x8e17ff;};return a37_0x5771();}function scheduleItemPath(_0x21fd98,_0x2e2e28){return scheduleCollectionPath(_0x21fd98)+'/'+encodeURIComponent(_0x2e2e28);}const scheduleValidate={'service':'schedule','command':a37_0x56bfa2(0x81),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a37_0x56bfa2(0x8d),'flags':INPUT_FLAGS,async 'validate'(_0x12d24f){readScheduleInput(_0x12d24f);},async 'execute'(_0x1fe752){const _0x15afdb=a37_0x56bfa2,_0x1e837b=readScheduleInput(_0x1fe752),_0x31782f=await validateRuntimeSchedule(_0x1fe752[_0x15afdb(0xb5)],_0x1e837b);return{'ok':!![],'data':_0x31782f,'message':_0x15afdb(0x8b)};}},scheduleCreate={'service':'schedule','command':'create','description':a37_0x56bfa2(0xb6),'risk':a37_0x56bfa2(0xa9),'flags':INPUT_FLAGS,async 'validate'(_0x3ac025){readScheduleInput(_0x3ac025);},async 'execute'(_0x21f9ef){const _0x571123=a37_0x56bfa2,_0x460f92=readScheduleInput(_0x21f9ef),_0x1ae3cd=await validateRuntimeSchedule(_0x21f9ef[_0x571123(0xb5)],_0x460f92),_0x196b12=await createRuntimeSchedule(_0x21f9ef['appCode'],_0x1ae3cd);return{'ok':!![],'data':_0x196b12,'message':_0x571123(0xa7)+_0x196b12[_0x571123(0x8e)]+'\x20schedule\x20'+_0x196b12[_0x571123(0x92)]};},async 'dryRun'(_0x2fd733){const _0xd3a85a=a37_0x56bfa2,_0x357ddf=readScheduleInput(_0x2fd733);return dryRun(_0xd3a85a(0xae),scheduleCollectionPath(_0x2fd733[_0xd3a85a(0xb5)]))[_0xd3a85a(0x9d)](_0x357ddf)[_0xd3a85a(0x8f)](_0xd3a85a(0x87))[_0xd3a85a(0xb3)]();}},scheduleList={'service':'schedule','command':a37_0x56bfa2(0xa3),'description':a37_0x56bfa2(0xa0),'risk':'read','flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x4b2f53){const _0x9ea056=a37_0x56bfa2,_0x3ca702=_0x4b2f53[_0x9ea056(0x95)](_0x9ea056(0xb7));if(!Number['isSafeInteger'](_0x3ca702)||_0x3ca702<0x1||_0x3ca702>0x64)throw CliErrors[_0x9ea056(0x9c)](_0x9ea056(0xc6));const _0x5765e5=_0x4b2f53[_0x9ea056(0xc4)](_0x9ea056(0xa5));if(_0x5765e5&&(_0x5765e5[_0x9ea056(0x83)]>0x400||_0x5765e5[_0x9ea056(0x7f)]()!==_0x5765e5))throw CliErrors[_0x9ea056(0x9c)](_0x9ea056(0x8a));},async 'execute'(_0x1dcbda){const _0x11ad70=a37_0x56bfa2,_0x1923f2=_0x1dcbda['str'](_0x11ad70(0xa5)),_0xc564da=await listRuntimeSchedules(_0x1dcbda[_0x11ad70(0xb5)],{'limit':_0x1dcbda[_0x11ad70(0x95)](_0x11ad70(0xb7)),..._0x1923f2?{'cursor':_0x1923f2}:{}});return{'ok':!![],'data':_0xc564da};}},scheduleDetail={'service':a37_0x56bfa2(0x94),'command':a37_0x56bfa2(0xad),'description':a37_0x56bfa2(0xc3),'risk':a37_0x56bfa2(0x8d),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xb2df3e){const _0x3762cc=a37_0x56bfa2,_0x3bb432=await getRuntimeSchedule(_0xb2df3e['appCode'],_0xb2df3e[_0x3762cc(0xc4)](_0x3762cc(0x9b)));return{'ok':!![],'data':_0x3bb432};}},scheduleRun={'service':'schedule','command':a37_0x56bfa2(0x93),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':a37_0x56bfa2(0xa9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x25abb1){const _0x5bf4c3=a37_0x56bfa2,_0x1270de=_0x25abb1[_0x5bf4c3(0xc4)](_0x5bf4c3(0x9b)),_0x478bff=await runRuntimeSchedule(_0x25abb1[_0x5bf4c3(0xb5)],_0x1270de);return{'ok':!![],'data':_0x478bff,'message':'Queued\x20Task\x20'+_0x478bff[_0x5bf4c3(0xb0)]+_0x5bf4c3(0xba)+_0x1270de};},async 'dryRun'(_0x10842f){const _0x3c0ecc=a37_0x56bfa2,_0x20457d=_0x10842f[_0x3c0ecc(0xc4)]('schedule-id');return dryRun(_0x3c0ecc(0xae),scheduleItemPath(_0x10842f['appCode'],_0x20457d)+_0x3c0ecc(0xc2))[_0x3c0ecc(0x8f)](_0x3c0ecc(0xbc)+_0x20457d+_0x3c0ecc(0xa1))[_0x3c0ecc(0xb3)]();}},scheduleDelete={'service':a37_0x56bfa2(0x94),'command':a37_0x56bfa2(0x85),'description':a37_0x56bfa2(0x9f),'risk':a37_0x56bfa2(0xa9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1bf05a){const _0x44870b=a37_0x56bfa2,_0x50d1e7=_0x1bf05a[_0x44870b(0xc4)](_0x44870b(0x9b)),_0xb964d8=await deleteRuntimeSchedule(_0x1bf05a[_0x44870b(0xb5)],_0x50d1e7);return{'ok':!![],'data':_0xb964d8,'message':'Deleted\x20schedule\x20'+_0x50d1e7};},async 'dryRun'(_0x5c8d05){const _0x40888c=a37_0x56bfa2,_0x174952=_0x5c8d05['str'](_0x40888c(0x9b));return dryRun(_0x40888c(0xa8),scheduleItemPath(_0x5c8d05[_0x40888c(0xb5)],_0x174952))['description'](_0x40888c(0x99)+_0x174952)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x5efa81=a37_0x57f1;(function(_0x436796,_0x5abc9b){const _0x3dbbfb=a37_0x57f1,_0x10c7c0=_0x436796();while(!![]){try{const _0x195665=parseInt(_0x3dbbfb(0xb1))/0x1*(parseInt(_0x3dbbfb(0x91))/0x2)+-parseInt(_0x3dbbfb(0x97))/0x3*(parseInt(_0x3dbbfb(0x95))/0x4)+-parseInt(_0x3dbbfb(0xa2))/0x5*(-parseInt(_0x3dbbfb(0xcc))/0x6)+-parseInt(_0x3dbbfb(0x88))/0x7+-parseInt(_0x3dbbfb(0x92))/0x8+parseInt(_0x3dbbfb(0xc5))/0x9+parseInt(_0x3dbbfb(0xca))/0xa*(parseInt(_0x3dbbfb(0xaa))/0xb);if(_0x195665===_0x5abc9b)break;else _0x10c7c0['push'](_0x10c7c0['shift']());}catch(_0x40b898){_0x10c7c0['push'](_0x10c7c0['shift']());}}}(a37_0x3e8f,0x68788));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a37_0x57f1(_0x28c83a,_0x3ed20f){_0x28c83a=_0x28c83a-0x88;const _0x3e8fd7=a37_0x3e8f();let _0x57f197=_0x3e8fd7[_0x28c83a];return _0x57f197;}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_0x5efa81(0xb7),'type':'string','required':!![],'enum':[a37_0x5efa81(0xa6),a37_0x5efa81(0xc8)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':'cron','type':'string','description':a37_0x5efa81(0x8c)},SCHEDULED_AT_FLAG={'name':a37_0x5efa81(0xa9),'type':a37_0x5efa81(0xae),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x5efa81(0xb6),'type':a37_0x5efa81(0xae),'required':!![],'description':a37_0x5efa81(0x8a)},PROMPT_FLAG={'name':a37_0x5efa81(0xa7),'type':a37_0x5efa81(0xae),'required':!![],'description':a37_0x5efa81(0xb0)},CHANNEL_FLAG={'name':a37_0x5efa81(0xbd),'type':a37_0x5efa81(0xae),'enum':[a37_0x5efa81(0x8b),a37_0x5efa81(0x98)],'default':a37_0x5efa81(0x98),'description':a37_0x5efa81(0x8f)},SCHEDULE_ID_FLAG={'name':a37_0x5efa81(0xc3),'type':a37_0x5efa81(0xae),'required':!![],'description':a37_0x5efa81(0xb9),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a37_0x5efa81(0x9a),'type':a37_0x5efa81(0x89),'default':0x14,'description':a37_0x5efa81(0xd0)},CURSOR_FLAG={'name':'cursor','type':'string','description':a37_0x5efa81(0xbf)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x3cb31d){const _0x45a483=a37_0x5efa81,_0x5aac14=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xb7)),_0x5bc459=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xb6))[_0x45a483(0xb2)](),_0xa111c3=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xa7))['trim'](),_0x2ffb61=_0x3cb31d['str'](_0x45a483(0xbd)),_0x3c7166=_0x3cb31d['str'](_0x45a483(0xbe)),_0x4d86c6=_0x3cb31d[_0x45a483(0xac)](_0x45a483(0xa9));if(!_0x5bc459)throw CliErrors[_0x45a483(0x99)](_0x45a483(0xc7));if(!_0xa111c3)throw CliErrors[_0x45a483(0x99)](_0x45a483(0x8e));if(_0x5aac14===_0x45a483(0xa6)){if(!_0x3c7166||_0x4d86c6)throw CliErrors['validation'](_0x45a483(0xb4));return{'kind':_0x5aac14,'timezone':_0x45a483(0xa5),'cron':_0x3c7166,'title':_0x5bc459,'prompt':_0xa111c3,'channel':_0x2ffb61};}if(_0x5aac14==='ONCE'){if(!_0x4d86c6||_0x3c7166)throw CliErrors[_0x45a483(0x99)](_0x45a483(0xa3));return{'kind':_0x5aac14,'timezone':_0x45a483(0xa5),'scheduledAt':_0x4d86c6,'title':_0x5bc459,'prompt':_0xa111c3,'channel':_0x2ffb61};}throw CliErrors[_0x45a483(0x99)](_0x45a483(0xaf));}function scheduleCollectionPath(_0x58ffae){const _0x3daa9f=a37_0x5efa81;return _0x3daa9f(0xc1)+encodeURIComponent(_0x58ffae)+_0x3daa9f(0x8d);}function a37_0x3e8f(){const _0xa1b693=['CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','title','kind','DELETE','Schedule\x20UUID','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Queued\x20Task\x20','\x20from\x20schedule\x20','channel','cron','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','num','/api/harness/apps/','body','schedule-id','POST','293670kvIMDM','appCode','--title\x20must\x20not\x20be\x20blank.','ONCE','scheduleId','3974470vBhzez','schedule','18LYqHaZ','high-risk-write','Preview:\x20run\x20schedule\x20','Schedule\x20input\x20is\x20valid','Page\x20size\x20from\x201\x20to\x20100','/run','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','build','run','4141879mLSxye','number','Schedule\x20title','auto','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','/schedules','--prompt\x20must\x20not\x20be\x20blank.','Task\x20channel:\x20auto\x20or\x20premium','create','913642kvaEzb','584360oiuDfC','cursor','read','4PPbZlm','description','761211CxftHP','premium','validation','limit','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','detail','Created\x20','list','delete','\x20immediately','\x20schedule\x20','103410nnDhgE','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','taskId','UTC','CRON','prompt','Deleted\x20schedule\x20','scheduled-at','22QsPPmK','validate','str','Show\x20one\x20schedule\x20by\x20schedule\x20ID','string','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','1NPpTzw','trim','length'];a37_0x3e8f=function(){return _0xa1b693;};return a37_0x3e8f();}function scheduleItemPath(_0x293602,_0x351300){return scheduleCollectionPath(_0x293602)+'/'+encodeURIComponent(_0x351300);}const scheduleValidate={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0xab),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a37_0x5efa81(0x94),'flags':INPUT_FLAGS,async 'validate'(_0x3131ab){readScheduleInput(_0x3131ab);},async 'execute'(_0x621a16){const _0x499713=a37_0x5efa81,_0x3246da=readScheduleInput(_0x621a16),_0x1a3b46=await validateRuntimeSchedule(_0x621a16[_0x499713(0xc6)],_0x3246da);return{'ok':!![],'data':_0x1a3b46,'message':_0x499713(0xcf)};}},scheduleCreate={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0x90),'description':a37_0x5efa81(0x9b),'risk':a37_0x5efa81(0xcd),'flags':INPUT_FLAGS,async 'validate'(_0x4683c4){readScheduleInput(_0x4683c4);},async 'execute'(_0x197d65){const _0x4e16db=a37_0x5efa81,_0x252fbd=readScheduleInput(_0x197d65),_0x3e96ff=await validateRuntimeSchedule(_0x197d65['appCode'],_0x252fbd),_0x2f13b9=await createRuntimeSchedule(_0x197d65['appCode'],_0x3e96ff);return{'ok':!![],'data':_0x2f13b9,'message':_0x4e16db(0x9d)+_0x2f13b9[_0x4e16db(0xb7)]+_0x4e16db(0xa1)+_0x2f13b9[_0x4e16db(0xc9)]};},async 'dryRun'(_0x18dfb0){const _0x5a33d7=a37_0x5efa81,_0x5b7ab8=readScheduleInput(_0x18dfb0);return dryRun(_0x5a33d7(0xc4),scheduleCollectionPath(_0x18dfb0[_0x5a33d7(0xc6)]))[_0x5a33d7(0xc2)](_0x5b7ab8)[_0x5a33d7(0x96)]('Preview:\x20create\x20an\x20Agent\x20schedule')[_0x5a33d7(0xd3)]();}},scheduleList={'service':'schedule','command':a37_0x5efa81(0x9e),'description':a37_0x5efa81(0xb5),'risk':a37_0x5efa81(0x94),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3ff31a){const _0x148405=a37_0x5efa81,_0x121089=_0x3ff31a[_0x148405(0xc0)](_0x148405(0x9a));if(!Number['isSafeInteger'](_0x121089)||_0x121089<0x1||_0x121089>0x64)throw CliErrors[_0x148405(0x99)](_0x148405(0xba));const _0x5300bf=_0x3ff31a[_0x148405(0xac)](_0x148405(0x93));if(_0x5300bf&&(_0x5300bf[_0x148405(0xb3)]>0x400||_0x5300bf[_0x148405(0xb2)]()!==_0x5300bf))throw CliErrors['validation']('--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.');},async 'execute'(_0x4b505b){const _0x3fa18a=a37_0x5efa81,_0xf7b6c1=_0x4b505b[_0x3fa18a(0xac)](_0x3fa18a(0x93)),_0x4bc369=await listRuntimeSchedules(_0x4b505b[_0x3fa18a(0xc6)],{'limit':_0x4b505b[_0x3fa18a(0xc0)](_0x3fa18a(0x9a)),..._0xf7b6c1?{'cursor':_0xf7b6c1}:{}});return{'ok':!![],'data':_0x4bc369};}},scheduleDetail={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0x9c),'description':a37_0x5efa81(0xad),'risk':a37_0x5efa81(0x94),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x19a073){const _0x3afcd9=a37_0x5efa81,_0x47eec2=await getRuntimeSchedule(_0x19a073[_0x3afcd9(0xc6)],_0x19a073[_0x3afcd9(0xac)](_0x3afcd9(0xc3)));return{'ok':!![],'data':_0x47eec2};}},scheduleRun={'service':a37_0x5efa81(0xcb),'command':a37_0x5efa81(0xd4),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':a37_0x5efa81(0xcd),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x3682d7){const _0x580c79=a37_0x5efa81,_0x39d9c5=_0x3682d7[_0x580c79(0xac)](_0x580c79(0xc3)),_0x583880=await runRuntimeSchedule(_0x3682d7[_0x580c79(0xc6)],_0x39d9c5);return{'ok':!![],'data':_0x583880,'message':_0x580c79(0xbb)+_0x583880[_0x580c79(0xa4)]+_0x580c79(0xbc)+_0x39d9c5};},async 'dryRun'(_0x31cfcc){const _0x416090=a37_0x5efa81,_0x20c701=_0x31cfcc['str']('schedule-id');return dryRun(_0x416090(0xc4),scheduleItemPath(_0x31cfcc['appCode'],_0x20c701)+_0x416090(0xd1))[_0x416090(0x96)](_0x416090(0xce)+_0x20c701+_0x416090(0xa0))['build']();}},scheduleDelete={'service':'schedule','command':a37_0x5efa81(0x9f),'description':a37_0x5efa81(0xd2),'risk':'high-risk-write','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x658368){const _0x273d4d=a37_0x5efa81,_0x20f21b=_0x658368[_0x273d4d(0xac)]('schedule-id'),_0x3ed705=await deleteRuntimeSchedule(_0x658368['appCode'],_0x20f21b);return{'ok':!![],'data':_0x3ed705,'message':_0x273d4d(0xa8)+_0x20f21b};},async 'dryRun'(_0x2f4a9c){const _0x5a12a5=a37_0x5efa81,_0x2c2299=_0x2f4a9c[_0x5a12a5(0xac)]('schedule-id');return dryRun(_0x5a12a5(0xb8),scheduleItemPath(_0x2f4a9c[_0x5a12a5(0xc6)],_0x2c2299))[_0x5a12a5(0x96)]('Preview:\x20delete\x20schedule\x20'+_0x2c2299)[_0x5a12a5(0xd3)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- function a38_0x4f3e(_0x122369,_0x5d6bbc){_0x122369=_0x122369-0x19a;const _0x373b00=a38_0x373b();let _0x4f3e71=_0x373b00[_0x122369];return _0x4f3e71;}const a38_0x5f38c9=a38_0x4f3e;function a38_0x373b(){const _0x4afbc0=['8651172QOPyuk','8644540HycRnJ','read','211059ujmKiV','schema','11mALZsw','321nsfyQF','3254335ifYLYg','1965383RWgvDW','2KucJZw','280Azheng','488846nuoMkq','export','6NYCOef','25068kfEfks'];a38_0x373b=function(){return _0x4afbc0;};return a38_0x373b();}(function(_0x584f57,_0x430297){const _0x23d05b=a38_0x4f3e,_0x46f499=_0x584f57();while(!![]){try{const _0x253a5d=parseInt(_0x23d05b(0x19e))/0x1*(-parseInt(_0x23d05b(0x19c))/0x2)+parseInt(_0x23d05b(0x1a8))/0x3*(parseInt(_0x23d05b(0x1a1))/0x4)+parseInt(_0x23d05b(0x19a))/0x5+-parseInt(_0x23d05b(0x1a0))/0x6*(-parseInt(_0x23d05b(0x19b))/0x7)+-parseInt(_0x23d05b(0x19d))/0x8*(parseInt(_0x23d05b(0x1a5))/0x9)+parseInt(_0x23d05b(0x1a3))/0xa+-parseInt(_0x23d05b(0x1a7))/0xb*(parseInt(_0x23d05b(0x1a2))/0xc);if(_0x253a5d===_0x430297)break;else _0x46f499['push'](_0x46f499['shift']());}catch(_0x113211){_0x46f499['push'](_0x46f499['shift']());}}}(a38_0x373b,0x6a781));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x562d03){const _0x116fcf=await buildSchemaPayload();return{'ok':!![],'data':_0x116fcf};}export const schemaDefinition={'service':a38_0x5f38c9(0x1a6),'command':a38_0x5f38c9(0x19f),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a38_0x5f38c9(0x1a4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a38_0x1b3536=a38_0x4e4c;function a38_0x4e4c(_0x547652,_0x455fc6){_0x547652=_0x547652-0xae;const _0x497b6a=a38_0x497b();let _0x4e4c00=_0x497b6a[_0x547652];return _0x4e4c00;}function a38_0x497b(){const _0x31723c=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','export','3691128QtOncp','9YDNvmT','4138296VIbuTp','1358096nnGoke','5evEbXt','7vdUYQC','6209514CMHfzr','schema','1369772XOcZHu','1256681ByPEHB','37213180uEKWxG'];a38_0x497b=function(){return _0x31723c;};return a38_0x497b();}(function(_0x5ae01e,_0xe01728){const _0xea803=a38_0x4e4c,_0x529fe8=_0x5ae01e();while(!![]){try{const _0x4657d7=-parseInt(_0xea803(0xb8))/0x1+-parseInt(_0xea803(0xb7))/0x2+-parseInt(_0xea803(0xaf))/0x3+parseInt(_0xea803(0xb2))/0x4*(-parseInt(_0xea803(0xb3))/0x5)+parseInt(_0xea803(0xb5))/0x6+parseInt(_0xea803(0xb4))/0x7*(-parseInt(_0xea803(0xb1))/0x8)+-parseInt(_0xea803(0xb0))/0x9*(-parseInt(_0xea803(0xb9))/0xa);if(_0x4657d7===_0xe01728)break;else _0x529fe8['push'](_0x529fe8['shift']());}catch(_0x344c21){_0x529fe8['push'](_0x529fe8['shift']());}}}(a38_0x497b,0xb19bb));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x36cc45){const _0x28e414=await buildSchemaPayload();return{'ok':!![],'data':_0x28e414};}export const schemaDefinition={'service':a38_0x1b3536(0xb6),'command':a38_0x1b3536(0xae),'description':a38_0x1b3536(0xba),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};