@lovrabet/lovrabet-cli 2.1.18-beta.2 → 2.1.18-beta.3

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 (127) 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/response.js +1 -1
  90. package/lib/framework/runner-confirmation.js +1 -1
  91. package/lib/framework/runner-error.js +1 -1
  92. package/lib/framework/runner.js +1 -1
  93. package/lib/framework/schema-export.js +1 -1
  94. package/lib/framework/service-order.js +1 -1
  95. package/lib/framework/types.js +1 -1
  96. package/lib/generated/build-info.d.ts +4 -4
  97. package/lib/generated/build-info.js +1 -1
  98. package/lib/help.js +1 -1
  99. package/lib/runtime/event.js +1 -1
  100. package/lib/runtime/index.js +1 -1
  101. package/lib/runtime/queue.js +1 -1
  102. package/lib/runtime/resolve.js +1 -1
  103. package/lib/skills/npx-skills-add.js +1 -1
  104. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  105. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  106. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  107. package/lib/skills/runtime-skill-sync/links.js +1 -1
  108. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  109. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  110. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  111. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  112. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  113. package/lib/skills/runtime-skill-sync/push.js +1 -1
  114. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  115. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  116. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  117. package/lib/skills/runtime-skill-sync.js +1 -1
  118. package/lib/utils/apply-jq-filter.js +1 -1
  119. package/lib/utils/logger.js +1 -1
  120. package/lib/utils/lossless-json.d.ts +7 -14
  121. package/lib/utils/lossless-json.js +1 -1
  122. package/lib/utils/params.js +1 -1
  123. package/lib/utils/platform.js +1 -1
  124. package/lib/utils/update-notice.js +1 -1
  125. package/lib/utils/version.js +1 -1
  126. package/lib/utils/write-cli-side-channel.js +1 -1
  127. package/package.json +1 -1
@@ -1 +1 @@
1
- const a29_0x107042=a29_0x5c3e;(function(_0x5e6f60,_0x3b232d){const _0x3f956c=a29_0x5c3e,_0x1016e3=_0x5e6f60();while(!![]){try{const _0x2352c7=parseInt(_0x3f956c(0x12d))/0x1*(-parseInt(_0x3f956c(0x11d))/0x2)+-parseInt(_0x3f956c(0x117))/0x3+parseInt(_0x3f956c(0x15b))/0x4+parseInt(_0x3f956c(0x123))/0x5*(parseInt(_0x3f956c(0x14b))/0x6)+-parseInt(_0x3f956c(0x10b))/0x7*(parseInt(_0x3f956c(0x10c))/0x8)+parseInt(_0x3f956c(0x124))/0x9*(parseInt(_0x3f956c(0x151))/0xa)+-parseInt(_0x3f956c(0x158))/0xb*(parseInt(_0x3f956c(0x11c))/0xc);if(_0x2352c7===_0x3b232d)break;else _0x1016e3['push'](_0x1016e3['shift']());}catch(_0x190a8e){_0x1016e3['push'](_0x1016e3['shift']());}}}(a29_0x1b02,0xd6522));import a29_0xdc8098 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x4001bf){const _0xa76164=a29_0x5c3e,_0x37dcb2=getCliVersion(),_0x57a4b2=buildConfigFromFlags({});await initGlobalEnvironment(_0x57a4b2),console[_0xa76164(0x141)](),console[_0xa76164(0x141)](a29_0xdc8098['bold'](CLI_BIN_NAME+_0xa76164(0x13a))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)]('─'['repeat'](0x32))),console[_0xa76164(0x141)](_0xa76164(0x110)+_0x37dcb2),console[_0xa76164(0x141)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xa76164(0x113)]),console['log'](_0xa76164(0x149)+process[_0xa76164(0x127)]+'\x20'+process['arch']),console['log'](),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x132)](_0xa76164(0x142))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e)));const _0xc8155a=getGlobalConfigPath(),_0x22b65b=getProjectConfigPath();console['log'](_0xa76164(0x14a)+(_0xc8155a||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x130)))),console['log'](_0xa76164(0x11f)+(_0x22b65b||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x130)))),console[_0xa76164(0x141)](),console['log'](a29_0xdc8098[_0xa76164(0x132)](_0xa76164(0x161))),console[_0xa76164(0x141)](a29_0xdc8098['gray']('\x20\x20─'[_0xa76164(0x12e)](0x1e)));const _0x5353a5=(_0x34cb71,_0x903433)=>{const _0x2afc0c=_0xa76164;if(!_0x903433){console['log']('\x20\x20'+_0x34cb71['padEnd'](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13b)](_0x2afc0c(0x150)));return;}const _0x3fd1ce=inspectCliConfigJsonFile(_0x903433);if(_0x3fd1ce[_0x2afc0c(0x143)]==='ok')console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x145)](_0x2afc0c(0x163)));else{if(_0x3fd1ce[_0x2afc0c(0x143)]==='empty')console['log']('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x12a)](_0x2afc0c(0x152)));else _0x3fd1ce[_0x2afc0c(0x143)]==='missing'?console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13b)]('(missing)')):(console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13e)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13e)](_0x3fd1ce['message'])));}};_0x5353a5('Global',_0xc8155a),_0x5353a5(_0xa76164(0x167),_0x22b65b),console[_0xa76164(0x141)](),console['log'](a29_0xdc8098['bold']('\x20\x20Merged\x20Config')),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e))),console[_0xa76164(0x141)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x57a4b2[_0xa76164(0x10f)]||a29_0xdc8098['red'](_0xa76164(0x13f)))),console[_0xa76164(0x141)](_0xa76164(0x119)+_0x57a4b2[_0xa76164(0x138)]);const _0x43ef75=isLegacyCompatConfigKey('locale')?a29_0xdc8098[_0xa76164(0x13b)](_0x57a4b2[_0xa76164(0x165)]+_0xa76164(0x14d)):_0x57a4b2[_0xa76164(0x165)];console[_0xa76164(0x141)](_0xa76164(0x120)+_0x43ef75),console[_0xa76164(0x141)](_0xa76164(0x118)+(_0x57a4b2[_0xa76164(0x14c)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x14e)))),console[_0xa76164(0x141)](_0xa76164(0x12f)+(_0x57a4b2[_0xa76164(0x154)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x14e)))),console[_0xa76164(0x141)](_0xa76164(0x160)+(_0x57a4b2[_0xa76164(0x12c)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x13c)+DEFAULT_CONFIG_VALUES[_0xa76164(0x12c)]+')'))),console[_0xa76164(0x141)](_0xa76164(0x11a)+(_0x57a4b2[_0xa76164(0x129)]??a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x155)))),console[_0xa76164(0x141)](_0xa76164(0x15e)+_0x57a4b2[_0xa76164(0x156)]),console['log'](_0xa76164(0x166)+_0x57a4b2[_0xa76164(0x116)]),console['log'](_0xa76164(0x15a)+AUTH_MODE[_0xa76164(0x114)]),console[_0xa76164(0x141)](_0xa76164(0x140)+(_0x57a4b2[_0xa76164(0x12b)]?a29_0xdc8098[_0xa76164(0x145)](_0xa76164(0x128)+_0x57a4b2[_0xa76164(0x12b)][_0xa76164(0x15c)]+')'):a29_0xdc8098['gray'](_0xa76164(0x14e)))),console[_0xa76164(0x141)](),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x132)]('\x20\x20API\x20Endpoints')),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e))),console[_0xa76164(0x141)](_0xa76164(0x126)+getApiDomain()),console['log'](_0xa76164(0x137)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console[_0xa76164(0x141)](a29_0xdc8098['bold'](_0xa76164(0x131))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)['repeat'](0x1e)));const _0x60e1dc=inspectServiceRegistry();console['log'](_0xa76164(0x135)+_0x60e1dc[_0xa76164(0x159)]),console[_0xa76164(0x141)](_0xa76164(0x168)+formatServiceRegistryStatus(_0x60e1dc)),console[_0xa76164(0x141)](_0xa76164(0x148)+_0x60e1dc[_0xa76164(0x157)]),console[_0xa76164(0x141)](_0xa76164(0x136)+_0x60e1dc['commandCount']);for(const _0x3460c5 of _0x60e1dc[_0xa76164(0x10d)]){console[_0xa76164(0x141)]('\x20\x20'+(_0x3460c5[_0xa76164(0x115)]+':')[_0xa76164(0x111)](0x11)+'\x20'+(_0x3460c5[_0xa76164(0x14f)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x13d)))+'\x20('+_0x3460c5[_0xa76164(0x10e)]+_0xa76164(0x15f)),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20Imported\x20from:\x20'+_0x3460c5[_0xa76164(0x122)][_0xa76164(0x144)]);}return console['log'](),console['log'](a29_0xdc8098['bold'](_0xa76164(0x112))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)['repeat'](0x1e))),console[_0xa76164(0x141)](_0xa76164(0x164)+a29_0xdc8098[_0xa76164(0x145)](AUTH_MODE[_0xa76164(0x114)]+_0xa76164(0x133))),console[_0xa76164(0x141)](_0xa76164(0x146)+a29_0xdc8098[_0xa76164(0x13b)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0xa76164(0x141)](),{'ok':!![]};}function formatServiceRegistryStatus(_0xde5f3f){const _0x1a1d78=a29_0x5c3e;if(_0xde5f3f[_0x1a1d78(0x143)]==='ok')return a29_0xdc8098[_0x1a1d78(0x145)](_0x1a1d78(0x139));if(_0xde5f3f[_0x1a1d78(0x143)]===_0x1a1d78(0x134))return a29_0xdc8098[_0x1a1d78(0x13b)]('(not\x20found)');if(_0xde5f3f[_0x1a1d78(0x143)]===_0x1a1d78(0x153))return a29_0xdc8098[_0x1a1d78(0x12a)](_0x1a1d78(0x162));return a29_0xdc8098['red'](_0x1a1d78(0x169)+(_0xde5f3f[_0x1a1d78(0x15d)]?':\x20'+_0xde5f3f[_0x1a1d78(0x15d)]:''));}function a29_0x5c3e(_0x35854b,_0x4a8927){_0x35854b=_0x35854b-0x10b;const _0x1b0287=a29_0x1b02();let _0x5c3ef8=_0x1b0287[_0x35854b];return _0x5c3ef8;}function a29_0x1b02(){const _0x1f8006=['Project','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','14GEyJTQ','98152gIAMsa','services','commandCount','appCode','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','padEnd','\x20\x20Auth','version','ClientAk','serviceCode','verbose','1822632CJpIGj','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','73284cXTpJo','60020TyupFT','read','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','source','203045jfMQWy','6282mMUpjT','check','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','platform','(set,\x20length=','pageSize','yellow','accessKey','format','29iJPvfQ','repeat','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Service\x20Tree','bold','\x20(accessKey)','missing','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','env','✓\x20Loaded','\x20doctor','gray','(default:\x20','(unnamed)','red','(not\x20set)','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','log','\x20\x20Config\x20Files','status','path','green','\x20\x20Session\x20check:\x20\x20\x20','doctor','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','174dVEXko','defaultApp','\x20(legacy/compat\x20only)','(none)','name','(no\x20file)','15430LXBhfG','⚠\x20Empty\x20(treated\x20as\x20{})','empty','currentApp','(default)','riskLevel','serviceCount','2552XnhiTv','registryPath','\x20\x20auth\x20(effective):\x20','6169516rnHvfz','length','message','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20commands)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','⚠\x20Empty','✓\x20Valid\x20JSON','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x1b02=function(){return _0x1f8006;};return a29_0x1b02();}export const doctorDefinition={'service':a29_0x107042(0x147),'command':a29_0x107042(0x125),'description':a29_0x107042(0x121),'risk':a29_0x107042(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0xcc3f2f=a29_0x5986;(function(_0x4762a1,_0x4de2f0){const _0x37dd45=a29_0x5986,_0x169918=_0x4762a1();while(!![]){try{const _0x4d8de0=-parseInt(_0x37dd45(0x19c))/0x1*(parseInt(_0x37dd45(0x194))/0x2)+-parseInt(_0x37dd45(0x1ca))/0x3+parseInt(_0x37dd45(0x1c8))/0x4+parseInt(_0x37dd45(0x196))/0x5*(parseInt(_0x37dd45(0x1b9))/0x6)+-parseInt(_0x37dd45(0x18e))/0x7+-parseInt(_0x37dd45(0x1ac))/0x8*(parseInt(_0x37dd45(0x1c6))/0x9)+parseInt(_0x37dd45(0x1d5))/0xa;if(_0x4d8de0===_0x4de2f0)break;else _0x169918['push'](_0x169918['shift']());}catch(_0x233957){_0x169918['push'](_0x169918['shift']());}}}(a29_0x2786,0x57985));import a29_0x3efa2d from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x55e0e1){const _0x48683f=a29_0x5986,_0x14e1e8=getCliVersion(),_0x1178fc=buildConfigFromFlags({});await initGlobalEnvironment(_0x1178fc),console['log'](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)](CLI_BIN_NAME+'\x20doctor')),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1a0)]('─'[_0x48683f(0x1c9)](0x32))),console[_0x48683f(0x1a7)](_0x48683f(0x1a5)+_0x14e1e8),console[_0x48683f(0x1a7)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x48683f(0x1cd)]),console[_0x48683f(0x1a7)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x48683f(0x1a3)]+'\x20'+process[_0x48683f(0x1ab)]),console['log'](),console[_0x48683f(0x1a7)](a29_0x3efa2d['bold'](_0x48683f(0x1b3))),console[_0x48683f(0x1a7)](a29_0x3efa2d['gray']('\x20\x20─'[_0x48683f(0x1c9)](0x1e)));const _0x464163=getGlobalConfigPath(),_0x364827=getProjectConfigPath();console['log'](_0x48683f(0x1d7)+(_0x464163||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b6)))),console[_0x48683f(0x1a7)](_0x48683f(0x197)+(_0x364827||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b6)))),console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d['bold'](_0x48683f(0x1b4))),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1a0)]('\x20\x20─'[_0x48683f(0x1c9)](0x1e)));const _0x43c030=(_0x266706,_0x33d71a)=>{const _0x27e42a=_0x48683f;if(!_0x33d71a){console['log']('\x20\x20'+_0x266706[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x1a0)](_0x27e42a(0x1cc)));return;}const _0x2bcb63=inspectCliConfigJsonFile(_0x33d71a);if(_0x2bcb63['status']==='ok')console[_0x27e42a(0x1a7)]('\x20\x20'+_0x266706['padEnd'](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x1cb)](_0x27e42a(0x1aa)));else{if(_0x2bcb63['status']===_0x27e42a(0x1be))console[_0x27e42a(0x1a7)]('\x20\x20'+_0x266706['padEnd'](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x1ce)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x2bcb63['status']===_0x27e42a(0x19e)?console['log']('\x20\x20'+_0x266706[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d['gray'](_0x27e42a(0x1dc))):(console['log']('\x20\x20'+_0x266706[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d[_0x27e42a(0x191)](_0x27e42a(0x1bd))),console['log']('\x20\x20'+''[_0x27e42a(0x1b8)](0x11)+'\x20'+a29_0x3efa2d['red'](_0x2bcb63['message'])));}};_0x43c030('Global',_0x464163),_0x43c030(_0x48683f(0x1c3),_0x364827),console[_0x48683f(0x1a7)](),console['log'](a29_0x3efa2d[_0x48683f(0x1b5)](_0x48683f(0x18f))),console['log'](a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1da)[_0x48683f(0x1c9)](0x1e))),console['log']('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1178fc[_0x48683f(0x1c5)]||a29_0x3efa2d[_0x48683f(0x191)]('(not\x20set)'))),console['log'](_0x48683f(0x199)+_0x1178fc['env']);const _0x26b436=isLegacyCompatConfigKey(_0x48683f(0x1bf))?a29_0x3efa2d[_0x48683f(0x1a0)](_0x1178fc[_0x48683f(0x1bf)]+_0x48683f(0x19a)):_0x1178fc[_0x48683f(0x1bf)];console[_0x48683f(0x1a7)](_0x48683f(0x1b0)+_0x26b436),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x1178fc['defaultApp']||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b2)))),console[_0x48683f(0x1a7)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x1178fc[_0x48683f(0x1ba)]||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b2)))),console['log'](_0x48683f(0x1c0)+(_0x1178fc[_0x48683f(0x1cf)]||a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1d6)+DEFAULT_CONFIG_VALUES[_0x48683f(0x1cf)]+')'))),console['log'](_0x48683f(0x1d2)+(_0x1178fc['pageSize']??a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x198)))),console['log'](_0x48683f(0x1a8)+_0x1178fc[_0x48683f(0x195)]),console[_0x48683f(0x1a7)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1178fc['verbose']),console['log']('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x48683f(0x1a2)]),console[_0x48683f(0x1a7)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x1178fc[_0x48683f(0x192)]?a29_0x3efa2d[_0x48683f(0x1cb)](_0x48683f(0x190)+_0x1178fc[_0x48683f(0x192)][_0x48683f(0x1af)]+')'):a29_0x3efa2d[_0x48683f(0x1a0)]('(none)'))),console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)]('\x20\x20API\x20Endpoints')),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1a0)]('\x20\x20─'[_0x48683f(0x1c9)](0x1e))),console['log'](_0x48683f(0x1d4)+getApiDomain()),console[_0x48683f(0x1a7)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x48683f(0x1a7)](_0x48683f(0x19b)+getRuntimeDomain()),console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)](_0x48683f(0x1bb))),console['log'](a29_0x3efa2d[_0x48683f(0x1a0)]('\x20\x20─'['repeat'](0x1e)));const _0x5dbf0e=inspectServiceRegistry();console[_0x48683f(0x1a7)](_0x48683f(0x1ae)+_0x5dbf0e['registryPath']),console['log'](_0x48683f(0x1c7)+formatServiceRegistryStatus(_0x5dbf0e)),console[_0x48683f(0x1a7)](_0x48683f(0x1c1)+_0x5dbf0e['serviceCount']),console[_0x48683f(0x1a7)](_0x48683f(0x1ad)+_0x5dbf0e['commandCount']);for(const _0x160d24 of _0x5dbf0e['services']){console['log']('\x20\x20'+(_0x160d24[_0x48683f(0x1d8)]+':')[_0x48683f(0x1b8)](0x11)+'\x20'+(_0x160d24['name']||a29_0x3efa2d['gray'](_0x48683f(0x1d9)))+'\x20('+_0x160d24[_0x48683f(0x19d)]+_0x48683f(0x1a1)),console[_0x48683f(0x1a7)]('\x20\x20'+''[_0x48683f(0x1b8)](0x11)+'\x20Imported\x20from:\x20'+_0x160d24[_0x48683f(0x1d3)][_0x48683f(0x1c4)]);}return console[_0x48683f(0x1a7)](),console[_0x48683f(0x1a7)](a29_0x3efa2d[_0x48683f(0x1b5)]('\x20\x20Auth')),console['log'](a29_0x3efa2d['gray'](_0x48683f(0x1da)[_0x48683f(0x1c9)](0x1e))),console[_0x48683f(0x1a7)](_0x48683f(0x1d0)+a29_0x3efa2d[_0x48683f(0x1cb)](AUTH_MODE['ClientAk']+_0x48683f(0x1a9))),console[_0x48683f(0x1a7)](_0x48683f(0x193)+a29_0x3efa2d[_0x48683f(0x1a0)](_0x48683f(0x1b1))),console[_0x48683f(0x1a7)](),{'ok':!![]};}function a29_0x5986(_0x5f54c1,_0x478b34){_0x5f54c1=_0x5f54c1-0x18e;const _0x2786d3=a29_0x2786();let _0x598635=_0x2786d3[_0x5f54c1];return _0x598635;}function formatServiceRegistryStatus(_0x5c8e62){const _0x3642bf=a29_0x5986;if(_0x5c8e62[_0x3642bf(0x1bc)]==='ok')return a29_0x3efa2d[_0x3642bf(0x1cb)](_0x3642bf(0x1d1));if(_0x5c8e62[_0x3642bf(0x1bc)]===_0x3642bf(0x19e))return a29_0x3efa2d[_0x3642bf(0x1a0)](_0x3642bf(0x1b6));if(_0x5c8e62[_0x3642bf(0x1bc)]===_0x3642bf(0x1be))return a29_0x3efa2d[_0x3642bf(0x1ce)](_0x3642bf(0x19f));return a29_0x3efa2d[_0x3642bf(0x191)](_0x3642bf(0x1c2)+(_0x5c8e62[_0x3642bf(0x1b7)]?':\x20'+_0x5c8e62[_0x3642bf(0x1b7)]:''));}function a29_0x2786(){const _0x53f01e=['\x20\x20runtimeDomain:\x20\x20\x20','646791cHaUtl','commandCount','missing','⚠\x20Empty','gray','\x20commands)','ClientAk','platform','check','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','doctor','log','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','✓\x20Valid\x20JSON','arch','20152hdamAS','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','(none)','\x20\x20Config\x20Files','\x20\x20Config\x20JSON','bold','(not\x20found)','message','padEnd','98682bUGPCV','currentApp','\x20\x20Service\x20Tree','status','✗\x20Invalid\x20JSON','empty','locale','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','Project','path','appCode','1089OjENlF','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1155988VIjymN','repeat','1173576kvIrpD','green','(no\x20file)','version','yellow','format','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Loaded','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','source','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','16837560lVBUyo','(default:\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','(unnamed)','\x20\x20─','read','(missing)','4431112lsPebI','\x20\x20Merged\x20Config','(set,\x20length=','red','accessKey','\x20\x20Session\x20check:\x20\x20\x20','2vXzTNz','riskLevel','110HyusUB','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(legacy/compat\x20only)'];a29_0x2786=function(){return _0x53f01e;};return a29_0x2786();}export const doctorDefinition={'service':a29_0xcc3f2f(0x1a6),'command':a29_0xcc3f2f(0x1a4),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0xcc3f2f(0x1db),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x534a6c=a30_0x5b88;(function(_0x17aa4d,_0x50c182){const _0x21b0a6=a30_0x5b88,_0x13512c=_0x17aa4d();while(!![]){try{const _0x26f597=-parseInt(_0x21b0a6(0xdc))/0x1*(-parseInt(_0x21b0a6(0xdf))/0x2)+-parseInt(_0x21b0a6(0xd8))/0x3+parseInt(_0x21b0a6(0xeb))/0x4*(parseInt(_0x21b0a6(0xef))/0x5)+-parseInt(_0x21b0a6(0xde))/0x6+-parseInt(_0x21b0a6(0xd0))/0x7*(parseInt(_0x21b0a6(0xcf))/0x8)+parseInt(_0x21b0a6(0xcb))/0x9*(-parseInt(_0x21b0a6(0xe4))/0xa)+parseInt(_0x21b0a6(0xea))/0xb;if(_0x26f597===_0x50c182)break;else _0x13512c['push'](_0x13512c['shift']());}catch(_0x5dcb0e){_0x13512c['push'](_0x13512c['shift']());}}}(a30_0x3064,0xd2e23));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x3064(){const _0xe82ecd=['Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','read','description','path','31712395ctCrAQ','4372CIhWWH','str','body','POST','755xpFlYo','boolean','appCode','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','36mFlBBr','long-term','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','write','16wvQTIF','2644838otUNkv','trim','build','filePath','Preview:\x20upload\x20','Path\x20to\x20the\x20local\x20file\x20to\x20upload','file','bool','1988085HhaCvi','upload','filepath','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','943HRFqCf','string','2296056xLzRJN','2036vvZWns','download','File','query-url','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3357860lvlwPN','validation'];a30_0x3064=function(){return _0xe82ecd;};return a30_0x3064();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x534a6c(0xd6),'type':'string','required':!![],'description':a30_0x534a6c(0xd5)},FILEPATH_FLAG={'name':a30_0x534a6c(0xda),'type':a30_0x534a6c(0xdd),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x534a6c(0xe0),'type':'boolean','description':a30_0x534a6c(0xe6)},LONG_TERM_FLAG={'name':a30_0x534a6c(0xcc),'type':a30_0x534a6c(0xf0),'description':a30_0x534a6c(0xdb)};function requireFilePath(_0x42c9b6){const _0x510429=a30_0x534a6c,_0x42905a=_0x42c9b6[_0x510429(0xd1)]();if(!_0x42905a)throw CliErrors[_0x510429(0xe5)]('filePath\x20is\x20required.');return _0x42905a;}function a30_0x5b88(_0x316a55,_0x35c8de){_0x316a55=_0x316a55-0xca;const _0x30649b=a30_0x3064();let _0x5b8896=_0x30649b[_0x316a55];return _0x5b8896;}const fileUpload={'service':'file','command':a30_0x534a6c(0xd9),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x534a6c(0xce),'flags':[FILE_FLAG],async 'dryRun'(_0x317401){const _0x4463f6=a30_0x534a6c,_0x1923ee=requireRuntimeUploadFile(_0x317401[_0x4463f6(0xec)]('file'),'File');return dryRun(_0x4463f6(0xee),'/client/uploadFile')[_0x4463f6(0xed)]({'appCode':_0x317401[_0x4463f6(0xf1)],'multipart':{'file':_0x1923ee}})[_0x4463f6(0xe8)](_0x4463f6(0xd4)+_0x1923ee[_0x4463f6(0xe9)]+'\x20to\x20runtime\x20app\x20'+_0x317401[_0x4463f6(0xf1)])[_0x4463f6(0xd2)]();},async 'execute'(_0x56bd4c){const _0x22f5da=a30_0x534a6c,_0x5dad04=requireRuntimeUploadFile(_0x56bd4c[_0x22f5da(0xec)](_0x22f5da(0xd6)),_0x22f5da(0xe1)),_0x3b64ee=await uploadRuntimeFile(_0x56bd4c['appCode'],_0x5dad04[_0x22f5da(0xe9)]);return{'ok':!![],'data':_0x3b64ee,'message':_0x3b64ee['filePath']?'Uploaded\x20file:\x20'+_0x3b64ee[_0x22f5da(0xd3)]+_0x22f5da(0xca):_0x22f5da(0xe3)};}},fileQueryUrl={'service':a30_0x534a6c(0xd6),'command':a30_0x534a6c(0xe2),'description':a30_0x534a6c(0xcd),'risk':a30_0x534a6c(0xe7),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x3df0c5){const _0xbed4ba=a30_0x534a6c,_0x3d77f4=requireFilePath(_0x3df0c5[_0xbed4ba(0xec)](_0xbed4ba(0xda))),_0x41c830=await queryRuntimeFileUrl(_0x3d77f4,{'download':_0x3df0c5[_0xbed4ba(0xd7)](_0xbed4ba(0xe0)),'longTerm':_0x3df0c5[_0xbed4ba(0xd7)]('long-term')});return{'ok':!![],'data':_0x41c830};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x10a24e=a30_0x586d;function a30_0x586d(_0x350400,_0x2adb4e){_0x350400=_0x350400-0x122;const _0x476591=a30_0x4765();let _0x586dba=_0x476591[_0x350400];return _0x586dba;}(function(_0x21ca3f,_0x20406b){const _0x28fce7=a30_0x586d,_0x44e396=_0x21ca3f();while(!![]){try{const _0x289b80=-parseInt(_0x28fce7(0x141))/0x1+-parseInt(_0x28fce7(0x13f))/0x2*(parseInt(_0x28fce7(0x131))/0x3)+-parseInt(_0x28fce7(0x142))/0x4*(-parseInt(_0x28fce7(0x12e))/0x5)+parseInt(_0x28fce7(0x13d))/0x6*(-parseInt(_0x28fce7(0x146))/0x7)+parseInt(_0x28fce7(0x130))/0x8+parseInt(_0x28fce7(0x12f))/0x9+parseInt(_0x28fce7(0x135))/0xa*(parseInt(_0x28fce7(0x124))/0xb);if(_0x289b80===_0x20406b)break;else _0x44e396['push'](_0x44e396['shift']());}catch(_0x55f7a7){_0x44e396['push'](_0x44e396['shift']());}}}(a30_0x4765,0x4a512));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';const FILE_FLAG={'name':a30_0x10a24e(0x13e),'type':'string','required':!![],'description':a30_0x10a24e(0x140)},FILEPATH_FLAG={'name':a30_0x10a24e(0x129),'type':'string','required':!![],'description':a30_0x10a24e(0x132)},DOWNLOAD_FLAG={'name':'download','type':a30_0x10a24e(0x126),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':'long-term','type':a30_0x10a24e(0x126),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function a30_0x4765(){const _0x2ea8eb=['3426UFLFzz','file','6SFwjCY','Path\x20to\x20the\x20local\x20file\x20to\x20upload','197392tQeOXS','4PHYIlQ','body','Preview:\x20upload\x20','POST','6979XiQPew','File','long-term','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','filePath\x20is\x20required.','154957BvbhOP','build','boolean','read','str','filepath','filePath','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','path','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','2003860ZRNwWY','2710476PLqcVb','427656WQJHRz','346401iEtZmg','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','query-url','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','470wPhfMU','/client/uploadFile','upload','bool','Uploaded\x20file:\x20','trim','write','appCode'];a30_0x4765=function(){return _0x2ea8eb;};return a30_0x4765();}function requireFilePath(_0x559318){const _0x42d2fe=a30_0x10a24e,_0x4418e1=_0x559318[_0x42d2fe(0x13a)]();if(!_0x4418e1)throw CliErrors['validation'](_0x42d2fe(0x123));return _0x4418e1;}const fileUpload={'service':'file','command':a30_0x10a24e(0x137),'description':a30_0x10a24e(0x12b),'risk':a30_0x10a24e(0x13b),'flags':[FILE_FLAG],async 'dryRun'(_0x28a1a3){const _0x5e4fc5=a30_0x10a24e,_0x168e4e=requireRuntimeUploadFile(_0x28a1a3[_0x5e4fc5(0x128)](_0x5e4fc5(0x13e)),_0x5e4fc5(0x147));return dryRun(_0x5e4fc5(0x145),_0x5e4fc5(0x136))[_0x5e4fc5(0x143)]({'appCode':_0x28a1a3[_0x5e4fc5(0x13c)],'multipart':{'file':_0x168e4e}})['description'](_0x5e4fc5(0x144)+_0x168e4e[_0x5e4fc5(0x12c)]+'\x20to\x20runtime\x20app\x20'+_0x28a1a3['appCode'])[_0x5e4fc5(0x125)]();},async 'execute'(_0x5edae0){const _0x50571c=a30_0x10a24e,_0x347e04=requireRuntimeUploadFile(_0x5edae0[_0x50571c(0x128)](_0x50571c(0x13e)),'File'),_0x10fd82=await uploadRuntimeFile(_0x5edae0[_0x50571c(0x13c)],_0x347e04[_0x50571c(0x12c)]);return{'ok':!![],'data':_0x10fd82,'message':_0x10fd82[_0x50571c(0x12a)]?_0x50571c(0x139)+_0x10fd82['filePath']+_0x50571c(0x12d):_0x50571c(0x134)};}},fileQueryUrl={'service':a30_0x10a24e(0x13e),'command':a30_0x10a24e(0x133),'description':a30_0x10a24e(0x122),'risk':a30_0x10a24e(0x127),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x222b77){const _0x21020e=a30_0x10a24e,_0x5b464d=requireFilePath(_0x222b77[_0x21020e(0x128)]('filepath')),_0x2f9fc5=await queryRuntimeFileUrl(_0x5b464d,{'download':_0x222b77[_0x21020e(0x138)]('download'),'longTerm':_0x222b77[_0x21020e(0x138)](_0x21020e(0x148))});return{'ok':!![],'data':_0x2f9fc5};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x15c51d=a31_0x7e3d;(function(_0x1dd319,_0xe20ab6){const _0x32d632=a31_0x7e3d,_0x1e1583=_0x1dd319();while(!![]){try{const _0x12a135=parseInt(_0x32d632(0xfd))/0x1+-parseInt(_0x32d632(0xf7))/0x2*(-parseInt(_0x32d632(0xdc))/0x3)+parseInt(_0x32d632(0x110))/0x4+parseInt(_0x32d632(0xe4))/0x5*(-parseInt(_0x32d632(0xf0))/0x6)+-parseInt(_0x32d632(0xf8))/0x7+parseInt(_0x32d632(0x108))/0x8*(parseInt(_0x32d632(0x119))/0x9)+parseInt(_0x32d632(0x107))/0xa*(-parseInt(_0x32d632(0x11d))/0xb);if(_0x12a135===_0xe20ab6)break;else _0x1e1583['push'](_0x1e1583['shift']());}catch(_0x137545){_0x1e1583['push'](_0x1e1583['shift']());}}}(a31_0x1fa9,0x26daf));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a31_0x1fa9(){const _0x34f2d3=['trim','[Y/n]','validation','yes','Imported\x20from\x20','close','name','556188jDTKWe','\x20\x20appcode:\x20','\x20init\x20—\x20Create\x20','SIGINT','object','Aborted.','\x20\x20config:\x20\x20','21806jmmqve','736428rrxeut','\x20already\x20exists.\x20Overwrite?','boolean','stdout','file','43820arpicG','riskLevel','stdin','Source\x20file\x20not\x20found:\x20','once','Initialized\x20','question','flagMissing','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`.','newConfigFileName','2140DRskue','432wROLOL','cancelled','env','\x22.\x20Allowed:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','utf8','\x0aInitialized\x20','defaultApp','398728piSNvO','project','message','\x20\x20default:\x20','):\x20','Override\x20imported\x20default\x20appcode',')\x20instead\x20of\x20project','removeListener','app','52722WAMPAI','entries','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','19294hDZIpE','race','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/','cwd','Target\x20environment\x20(default\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','[y/N]','includes','75flYIVe','App\x20code\x20cannot\x20be\x20empty.','parse','App\x20code\x20for\x20the\x20project','File\x20','Skip\x20confirmation\x20when\x20overwriting','join','log','5WWGSgT','string','global','appcode','apps'];a31_0x1fa9=function(){return _0x34f2d3;};return a31_0x1fa9();}import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0xdf)},{'name':a31_0x15c51d(0x10a),'type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x122)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x15c51d(0xe6),'type':a31_0x15c51d(0xfa),'description':a31_0x15c51d(0x120)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x15c51d(0xec),'type':a31_0x15c51d(0xfa),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x15c51d(0xfc),'type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x11c),'required':!![]},{'name':'appcode','type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x115)},{'name':a31_0x15c51d(0x10a),'type':a31_0x15c51d(0xe5),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x15c51d(0xe6),'type':a31_0x15c51d(0xfa),'description':a31_0x15c51d(0x120)+PRODUCT_CONFIG[a31_0x15c51d(0x106)]+a31_0x15c51d(0x116),'default':![]},{'name':a31_0x15c51d(0xec),'type':'boolean','description':a31_0x15c51d(0xe1),'default':![]}];export async function runInit(_0x482c89){const _0x4f3736=a31_0x15c51d,_0x2d36a2=isNonInteractiveMode(_0x482c89),_0x118192=_0x482c89[_0x4f3736(0xe6)]?'global':_0x4f3736(0x111),_0x79fee4=resolveWriteConfigPath(_0x118192);try{_0x2d36a2?await runNonInteractive(_0x482c89,_0x79fee4):await runInteractive(_0x482c89,_0x79fee4);}catch(_0x2a7d5a){if(_0x2a7d5a instanceof AbortPrompt)throw CliErrors[_0x4f3736(0x109)]();throw _0x2a7d5a;}}export async function runInitImport(_0x3120c0){const _0x2b0cb2=a31_0x15c51d,_0x55ecc1=_0x3120c0[_0x2b0cb2(0xe6)]?_0x2b0cb2(0xe6):'project',_0x2dd616=resolveWriteConfigPath(_0x55ecc1);await runFromImport(_0x3120c0,_0x2dd616);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x29f9bd,_0xbf17c2){const _0x1328e9=a31_0x15c51d,_0x207159=resolveFilePath(_0x29f9bd['file']);if(!existsSync(_0x207159))throw CliErrors[_0x1328e9(0xeb)](_0x1328e9(0x100)+_0x207159);const _0x194178=readSourceFile(_0x207159),_0x54ab8d=convertToRuntimeConfig(_0x194178);_0x29f9bd[_0x1328e9(0xe7)]&&(_0x54ab8d[_0x1328e9(0xe7)]=String(_0x29f9bd[_0x1328e9(0xe7)]));_0x29f9bd['env']&&(_0x54ab8d[_0x1328e9(0x10a)]=resolveInitEnv(_0x29f9bd));if(!_0x54ab8d[_0x1328e9(0xe7)])throw CliErrors[_0x1328e9(0xeb)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x1328e9(0x105));await writeInitConfig(_0xbf17c2,_0x54ab8d,_0x29f9bd),console[_0x1328e9(0xe3)](_0x1328e9(0xed)+_0x207159),console['log'](_0x1328e9(0xf6)+_0xbf17c2),console[_0x1328e9(0xe3)](_0x1328e9(0xf1)+_0x54ab8d[_0x1328e9(0xe7)]);if(_0x54ab8d[_0x1328e9(0x10f)])console['log'](_0x1328e9(0x113)+_0x54ab8d[_0x1328e9(0x10f)]);}function convertToRuntimeConfig(_0x583c47){const _0x5cbe20=a31_0x15c51d;if(_0x583c47[_0x5cbe20(0xe8)]&&typeof _0x583c47['apps']===_0x5cbe20(0xf4))throw CliErrors[_0x5cbe20(0xeb)](_0x5cbe20(0xd9),_0x5cbe20(0x10c));const _0x1f2be9={};for(const _0x2b1dfe of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x583c47[_0x2b1dfe]!==undefined&&(_0x1f2be9[_0x2b1dfe]=_0x583c47[_0x2b1dfe]);}return!_0x1f2be9[_0x5cbe20(0xfe)]&&(_0x1f2be9['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x1f2be9;}async function runNonInteractive(_0x58769a,_0x16baea){const _0x2092b2=a31_0x15c51d,_0x35ed08=_0x58769a[_0x2092b2(0xe7)];if(!_0x35ed08)throw CliErrors[_0x2092b2(0x104)](_0x2092b2(0xe7),'Usage:\x20'+CLI_BIN_NAME+_0x2092b2(0x11b));const _0xbc4e73=resolveInitEnv(_0x58769a);await writeInitConfig(_0x16baea,{'appcode':_0x35ed08,'env':_0xbc4e73},_0x58769a),console['log'](_0x2092b2(0x102)+_0x16baea),console[_0x2092b2(0xe3)](_0x2092b2(0xf1)+_0x35ed08),console[_0x2092b2(0xe3)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0xbc4e73);}async function runInteractive(_0x9f4dba,_0x5cbecc){const _0x3f5d71=a31_0x15c51d,_0x594f36=loadExisting(_0x5cbecc),_0x3d71b5=typeof _0x594f36?.['appcode']==='string'?_0x594f36[_0x3f5d71(0xe7)]:'',_0x57d644=resolveInitEnv(_0x9f4dba);console[_0x3f5d71(0xe3)](CLI_BIN_NAME+_0x3f5d71(0xf2)+PRODUCT_CONFIG[_0x3f5d71(0x106)]+'\x0a');if(existsSync(_0x5cbecc)&&!_0x9f4dba[_0x3f5d71(0xec)]){const _0x443ba7=await promptYesNo(_0x3f5d71(0xe0)+_0x5cbecc+_0x3f5d71(0xf9),![]);if(!_0x443ba7){console[_0x3f5d71(0xe3)](_0x3f5d71(0xf5));return;}}const _0x4c08e1=typeof _0x9f4dba[_0x3f5d71(0xe7)]===_0x3f5d71(0xe5)?_0x9f4dba[_0x3f5d71(0xe7)][_0x3f5d71(0xe9)]():'';let _0x52dd12=_0x4c08e1;!_0x52dd12&&(_0x52dd12=await promptInput('App\x20code',_0x3d71b5));if(!_0x52dd12[_0x3f5d71(0xe9)]())throw CliErrors[_0x3f5d71(0xeb)](_0x3f5d71(0xdd));await writeInitConfig(_0x5cbecc,{'appcode':_0x52dd12[_0x3f5d71(0xe9)](),'env':_0x57d644},_0x9f4dba),console['log'](_0x3f5d71(0x10e)+_0x5cbecc),console['log'](_0x3f5d71(0xf1)+_0x52dd12[_0x3f5d71(0xe9)]()),console[_0x3f5d71(0xe3)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x57d644);}async function writeInitConfig(_0x23fa23,_0x219c7b,_0x7368ba){const _0x3a4331=a31_0x15c51d;let _0x1a5d27={};existsSync(_0x23fa23)&&!_0x7368ba[_0x3a4331(0xec)]&&(_0x1a5d27=readConfigFile(_0x23fa23));for(const [_0x4eaf1f,_0x378b48]of Object[_0x3a4331(0x11a)](_0x219c7b)){_0x378b48!==undefined&&(_0x1a5d27[_0x4eaf1f]=_0x378b48);}if(_0x1a5d27[_0x3a4331(0x118)])delete _0x1a5d27['app'];writeConfigFile(_0x23fa23,_0x1a5d27);}function a31_0x7e3d(_0x5e8637,_0x583328){_0x5e8637=_0x5e8637-0xd9;const _0x1fa928=a31_0x1fa9();let _0x7e3d4e=_0x1fa928[_0x5e8637];return _0x7e3d4e;}class AbortPrompt extends Error{constructor(){const _0x460e79=a31_0x15c51d;super('User\x20aborted\x20prompt'),this[_0x460e79(0xef)]='AbortPrompt';}}function createSafeRl(){const _0x2044fc=a31_0x15c51d,_0x38b319=createInterface({'input':process[_0x2044fc(0xff)],'output':process[_0x2044fc(0xfb)]});let _0x23d4ad;const _0x493276=new Promise((_0x314e0f,_0x23617e)=>{const _0x4e99cc=_0x2044fc;_0x23d4ad=()=>{const _0x187c6c=a31_0x7e3d;_0x23d4ad&&(_0x38b319[_0x187c6c(0x117)](_0x187c6c(0xf3),_0x23d4ad),_0x23d4ad=undefined);try{_0x38b319[_0x187c6c(0xee)]();}catch{}_0x23617e(new AbortPrompt());},_0x38b319[_0x4e99cc(0x101)](_0x4e99cc(0xf3),_0x23d4ad);}),_0x26c4a9=()=>{const _0x39ee83=_0x2044fc;_0x23d4ad&&(_0x38b319['removeListener'](_0x39ee83(0xf3),_0x23d4ad),_0x23d4ad=undefined);try{_0x38b319['close']();}catch{}};return{'rl':_0x38b319,'abortPromise':_0x493276,'disposeSuccess':_0x26c4a9};}async function promptInput(_0x4672b1,_0x499c85){const _0x2089a8=a31_0x15c51d,{rl:_0x45f6ae,abortPromise:_0x1f1c41,disposeSuccess:_0x11f867}=createSafeRl(),_0x28ede5=new Promise(_0xf8a6ca=>{const _0xa52c3e=a31_0x7e3d,_0x47749d=_0x499c85?'\x20\x20'+_0x4672b1+'\x20('+_0x499c85+_0xa52c3e(0x114):'\x20\x20'+_0x4672b1+':\x20';_0x45f6ae[_0xa52c3e(0x103)](_0x47749d,_0xc31b7a=>{_0x11f867(),_0xf8a6ca(_0xc31b7a['trim']()||_0x499c85);});});return Promise[_0x2089a8(0x11e)]([_0x28ede5,_0x1f1c41]);}async function promptYesNo(_0x9be02a,_0x23a9d8){const _0x2cb213=a31_0x15c51d,{rl:_0x5a6ca3,abortPromise:_0x41bdf3,disposeSuccess:_0x35e35e}=createSafeRl(),_0x215372=new Promise(_0x556f00=>{const _0x72ec85=a31_0x7e3d,_0x3ab6be=_0x23a9d8?_0x72ec85(0xea):_0x72ec85(0xda);_0x5a6ca3[_0x72ec85(0x103)]('\x20\x20'+_0x9be02a+'\x20'+_0x3ab6be+':\x20',_0x16582a=>{const _0xf14678=_0x72ec85;_0x35e35e();const _0x143edd=_0x16582a[_0xf14678(0xe9)]()['toLowerCase']();if(_0x143edd==='y'||_0x143edd===_0xf14678(0xec))_0x556f00(!![]);else{if(_0x143edd==='n'||_0x143edd==='no')_0x556f00(![]);else _0x556f00(_0x23a9d8);}});});return Promise[_0x2cb213(0x11e)]([_0x215372,_0x41bdf3]);}function loadExisting(_0x1bdd1f){if(!existsSync(_0x1bdd1f))return null;return readConfigFile(_0x1bdd1f);}function resolveFilePath(_0x1cc43a){const _0x149d63=a31_0x15c51d;return isAbsolute(_0x1cc43a)?_0x1cc43a:resolve(process[_0x149d63(0x121)](),_0x1cc43a);}function readSourceFile(_0x425b0a){const _0x26a9f3=a31_0x15c51d;try{const _0x4c855a=readFileSync(_0x425b0a,{'encoding':_0x26a9f3(0x10d)});return JSON[_0x26a9f3(0xde)](_0x4c855a);}catch(_0xc3402c){throw CliErrors['validation'](_0x26a9f3(0x11f)+_0xc3402c[_0x26a9f3(0x112)]);}}function resolveInitEnv(_0x26223d){const _0x4790ce=a31_0x15c51d,_0x58b3af=_0x26223d[_0x4790ce(0x10a)];if(_0x58b3af===undefined||_0x58b3af==='')return DEFAULT_CONFIG_VALUES[_0x4790ce(0x10a)];if(!RUNTIME_ENV_VALUES[_0x4790ce(0xdb)](_0x58b3af))throw CliErrors['validation']('Invalid\x20env\x20\x22'+_0x58b3af+_0x4790ce(0x10b)+RUNTIME_ENV_VALUES[_0x4790ce(0xe2)](',\x20'));return _0x58b3af;}
1
+ const a31_0x2e2708=a31_0x5480;(function(_0x1d3b67,_0x4fec6a){const _0x5c8e8c=a31_0x5480,_0xcee68a=_0x1d3b67();while(!![]){try{const _0x23062c=-parseInt(_0x5c8e8c(0xff))/0x1+parseInt(_0x5c8e8c(0x10c))/0x2*(parseInt(_0x5c8e8c(0xdb))/0x3)+parseInt(_0x5c8e8c(0x109))/0x4*(-parseInt(_0x5c8e8c(0xf0))/0x5)+parseInt(_0x5c8e8c(0x111))/0x6+parseInt(_0x5c8e8c(0xd7))/0x7+-parseInt(_0x5c8e8c(0x10e))/0x8*(-parseInt(_0x5c8e8c(0xea))/0x9)+-parseInt(_0x5c8e8c(0xdd))/0xa;if(_0x23062c===_0x4fec6a)break;else _0xcee68a['push'](_0xcee68a['shift']());}catch(_0x373229){_0xcee68a['push'](_0xcee68a['shift']());}}}(a31_0x320a,0xccdbe));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';function a31_0x5480(_0x383d22,_0x4e5e29){_0x383d22=_0x383d22-0xd1;const _0x320ae8=a31_0x320a();let _0x548065=_0x320ae8[_0x383d22];return _0x548065;}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_0x2e2708(0xd6),'type':'string','description':a31_0x2e2708(0xd2)},{'name':a31_0x2e2708(0xdc),'type':'string','description':a31_0x2e2708(0xe3)+DEFAULT_CONFIG_VALUES[a31_0x2e2708(0xdc)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2e2708(0xe2),'type':a31_0x2e2708(0xfe),'description':a31_0x2e2708(0xed)+PRODUCT_CONFIG[a31_0x2e2708(0x101)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x2e2708(0xf1),'type':a31_0x2e2708(0xfe),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x2e2708(0xf2),'type':a31_0x2e2708(0x10d),'description':a31_0x2e2708(0xfa),'required':!![]},{'name':'appcode','type':a31_0x2e2708(0x10d),'description':'Override\x20imported\x20default\x20appcode'},{'name':'env','type':'string','description':a31_0x2e2708(0xee),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a31_0x2e2708(0xfe),'description':a31_0x2e2708(0xed)+PRODUCT_CONFIG['newConfigFileName']+a31_0x2e2708(0x117),'default':![]},{'name':a31_0x2e2708(0xf1),'type':a31_0x2e2708(0xfe),'description':a31_0x2e2708(0xe7),'default':![]}];export async function runInit(_0x492ec4){const _0x49b6dc=a31_0x2e2708,_0x4e002f=isNonInteractiveMode(_0x492ec4),_0x2e6647=_0x492ec4['global']?_0x49b6dc(0xe2):_0x49b6dc(0xe1),_0x2efe5f=resolveWriteConfigPath(_0x2e6647);try{_0x4e002f?await runNonInteractive(_0x492ec4,_0x2efe5f):await runInteractive(_0x492ec4,_0x2efe5f);}catch(_0x2d72ff){if(_0x2d72ff instanceof AbortPrompt)throw CliErrors[_0x49b6dc(0x112)]();throw _0x2d72ff;}}export async function runInitImport(_0x4cb930){const _0x142dd3=a31_0x2e2708,_0x4f72aa=_0x4cb930['global']?_0x142dd3(0xe2):_0x142dd3(0xe1),_0x1d4b50=resolveWriteConfigPath(_0x4f72aa);await runFromImport(_0x4cb930,_0x1d4b50);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x2e2708(0xf4)]);async function runFromImport(_0x18bf02,_0x50d0c3){const _0x288844=a31_0x2e2708,_0x49e724=resolveFilePath(_0x18bf02[_0x288844(0xf2)]);if(!existsSync(_0x49e724))throw CliErrors[_0x288844(0xfd)]('Source\x20file\x20not\x20found:\x20'+_0x49e724);const _0x38e8a7=readSourceFile(_0x49e724),_0x201627=convertToRuntimeConfig(_0x38e8a7);_0x18bf02[_0x288844(0xd6)]&&(_0x201627[_0x288844(0xd6)]=String(_0x18bf02[_0x288844(0xd6)]));_0x18bf02['env']&&(_0x201627['env']=resolveInitEnv(_0x18bf02));if(!_0x201627[_0x288844(0xd6)])throw CliErrors[_0x288844(0xfd)](_0x288844(0x113),_0x288844(0xd9));await writeInitConfig(_0x50d0c3,_0x201627,_0x18bf02),console[_0x288844(0xd5)](_0x288844(0x105)+_0x49e724),console[_0x288844(0xd5)]('\x20\x20config:\x20\x20'+_0x50d0c3),console[_0x288844(0xd5)](_0x288844(0x115)+_0x201627[_0x288844(0xd6)]);if(_0x201627[_0x288844(0xd8)])console[_0x288844(0xd5)]('\x20\x20default:\x20'+_0x201627[_0x288844(0xd8)]);}function convertToRuntimeConfig(_0xbbe706){const _0x48c1e6=a31_0x2e2708;if(_0xbbe706[_0x48c1e6(0xe8)]&&typeof _0xbbe706['apps']===_0x48c1e6(0xde))throw CliErrors[_0x48c1e6(0xfd)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x48c1e6(0xef));const _0x232834={};for(const _0x5f4275 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xbbe706[_0x5f4275]!==undefined&&(_0x232834[_0x5f4275]=_0xbbe706[_0x5f4275]);}return!_0x232834[_0x48c1e6(0x119)]&&(_0x232834[_0x48c1e6(0x119)]=DEFAULT_CONFIG_VALUES[_0x48c1e6(0x119)]),_0x232834;}async function runNonInteractive(_0x30f1a7,_0xe394be){const _0x3aac1a=a31_0x2e2708,_0x1560a5=_0x30f1a7['appcode'];if(!_0x1560a5)throw CliErrors[_0x3aac1a(0xeb)]('appcode',_0x3aac1a(0xe9)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x28127f=resolveInitEnv(_0x30f1a7);await writeInitConfig(_0xe394be,{'appcode':_0x1560a5,'env':_0x28127f},_0x30f1a7),console['log'](_0x3aac1a(0x10f)+_0xe394be),console[_0x3aac1a(0xd5)]('\x20\x20appcode:\x20'+_0x1560a5),console['log'](_0x3aac1a(0xe4)+_0x28127f);}function a31_0x320a(){const _0x7873c1=['7338UKyOzV','env','2383630gvejyR','object','once','stdout','project','global','Target\x20environment\x20(default\x20','\x20\x20env:\x20\x20\x20\x20\x20','File\x20','parse','Skip\x20confirmation\x20when\x20overwriting','apps','Usage:\x20','9ISttAm','flagMissing','race','Write\x20to\x20global\x20(~/','Override\x20imported\x20default\x20env','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','2432185iUsSJx','yes','file','\x20already\x20exists.\x20Overwrite?','apiDir','[y/N]','App\x20code','\x22.\x20Allowed:\x20','cwd','Aborted.','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Failed\x20to\x20parse\x20source\x20file:\x20','removeListener','validation','boolean','1516102GQkQFZ','[Y/n]','newConfigFileName','):\x20','includes','\x20init\x20—\x20Create\x20','Imported\x20from\x20','User\x20aborted\x20prompt','SIGINT','AbortPrompt','8snDVTm','app','entries','934EhsaIy','string','4365536UElYpH','Initialized\x20','Invalid\x20env\x20\x22','4163460huiEXx','cancelled','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','stdin','\x20\x20appcode:\x20','\x0aInitialized\x20',')\x20instead\x20of\x20project','close','riskLevel','trim','App\x20code\x20for\x20the\x20project','toLowerCase','question','log','appcode','8291899PhTyom','defaultApp','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`.','utf8'];a31_0x320a=function(){return _0x7873c1;};return a31_0x320a();}async function runInteractive(_0x45cd82,_0x421e6e){const _0x4100a0=a31_0x2e2708,_0x264ae7=loadExisting(_0x421e6e),_0xe769f4=typeof _0x264ae7?.[_0x4100a0(0xd6)]===_0x4100a0(0x10d)?_0x264ae7['appcode']:'',_0x5c408b=resolveInitEnv(_0x45cd82);console['log'](CLI_BIN_NAME+_0x4100a0(0x104)+PRODUCT_CONFIG[_0x4100a0(0x101)]+'\x0a');if(existsSync(_0x421e6e)&&!_0x45cd82['yes']){const _0x14abce=await promptYesNo(_0x4100a0(0xe5)+_0x421e6e+_0x4100a0(0xf3),![]);if(!_0x14abce){console[_0x4100a0(0xd5)](_0x4100a0(0xf9));return;}}const _0x2adfb9=typeof _0x45cd82[_0x4100a0(0xd6)]===_0x4100a0(0x10d)?_0x45cd82['appcode']['trim']():'';let _0x273c08=_0x2adfb9;!_0x273c08&&(_0x273c08=await promptInput(_0x4100a0(0xf6),_0xe769f4));if(!_0x273c08[_0x4100a0(0xd1)]())throw CliErrors[_0x4100a0(0xfd)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x421e6e,{'appcode':_0x273c08['trim'](),'env':_0x5c408b},_0x45cd82),console[_0x4100a0(0xd5)](_0x4100a0(0x116)+_0x421e6e),console[_0x4100a0(0xd5)](_0x4100a0(0x115)+_0x273c08[_0x4100a0(0xd1)]()),console[_0x4100a0(0xd5)](_0x4100a0(0xe4)+_0x5c408b);}async function writeInitConfig(_0x2ccf5d,_0x94c8be,_0x59b0c9){const _0x766d40=a31_0x2e2708;let _0x3fe750={};existsSync(_0x2ccf5d)&&!_0x59b0c9[_0x766d40(0xf1)]&&(_0x3fe750=readConfigFile(_0x2ccf5d));for(const [_0x256823,_0x8ad0b3]of Object[_0x766d40(0x10b)](_0x94c8be)){_0x8ad0b3!==undefined&&(_0x3fe750[_0x256823]=_0x8ad0b3);}if(_0x3fe750[_0x766d40(0x10a)])delete _0x3fe750['app'];writeConfigFile(_0x2ccf5d,_0x3fe750);}class AbortPrompt extends Error{constructor(){const _0x64e11a=a31_0x2e2708;super(_0x64e11a(0x106)),this['name']=_0x64e11a(0x108);}}function createSafeRl(){const _0x3c8422=a31_0x2e2708,_0x40dca2=createInterface({'input':process[_0x3c8422(0x114)],'output':process[_0x3c8422(0xe0)]});let _0xb33d56;const _0x5cc8ab=new Promise((_0x1cf721,_0x3aed1e)=>{const _0x2acccd=_0x3c8422;_0xb33d56=()=>{const _0x1014eb=a31_0x5480;_0xb33d56&&(_0x40dca2[_0x1014eb(0xfc)](_0x1014eb(0x107),_0xb33d56),_0xb33d56=undefined);try{_0x40dca2[_0x1014eb(0x118)]();}catch{}_0x3aed1e(new AbortPrompt());},_0x40dca2[_0x2acccd(0xdf)](_0x2acccd(0x107),_0xb33d56);}),_0x62c566=()=>{const _0x417a3a=_0x3c8422;_0xb33d56&&(_0x40dca2[_0x417a3a(0xfc)](_0x417a3a(0x107),_0xb33d56),_0xb33d56=undefined);try{_0x40dca2[_0x417a3a(0x118)]();}catch{}};return{'rl':_0x40dca2,'abortPromise':_0x5cc8ab,'disposeSuccess':_0x62c566};}async function promptInput(_0x536781,_0xa680ea){const _0x2e0556=a31_0x2e2708,{rl:_0x31741b,abortPromise:_0x6fedc3,disposeSuccess:_0x2c8618}=createSafeRl(),_0x6e42d=new Promise(_0x3557bd=>{const _0x2eaf52=a31_0x5480,_0x4d7963=_0xa680ea?'\x20\x20'+_0x536781+'\x20('+_0xa680ea+_0x2eaf52(0x102):'\x20\x20'+_0x536781+':\x20';_0x31741b[_0x2eaf52(0xd4)](_0x4d7963,_0x2c6310=>{const _0x5b21fb=_0x2eaf52;_0x2c8618(),_0x3557bd(_0x2c6310[_0x5b21fb(0xd1)]()||_0xa680ea);});});return Promise[_0x2e0556(0xec)]([_0x6e42d,_0x6fedc3]);}async function promptYesNo(_0x5b8cff,_0xa28ad9){const _0x6d185a=a31_0x2e2708,{rl:_0x578d17,abortPromise:_0x17ac52,disposeSuccess:_0x8d59a3}=createSafeRl(),_0x55b528=new Promise(_0x46e5ae=>{const _0x5792b4=a31_0x5480,_0x23b187=_0xa28ad9?_0x5792b4(0x100):_0x5792b4(0xf5);_0x578d17[_0x5792b4(0xd4)]('\x20\x20'+_0x5b8cff+'\x20'+_0x23b187+':\x20',_0x420494=>{const _0x550845=_0x5792b4;_0x8d59a3();const _0x2c50da=_0x420494[_0x550845(0xd1)]()[_0x550845(0xd3)]();if(_0x2c50da==='y'||_0x2c50da===_0x550845(0xf1))_0x46e5ae(!![]);else{if(_0x2c50da==='n'||_0x2c50da==='no')_0x46e5ae(![]);else _0x46e5ae(_0xa28ad9);}});});return Promise[_0x6d185a(0xec)]([_0x55b528,_0x17ac52]);}function loadExisting(_0x1851c1){if(!existsSync(_0x1851c1))return null;return readConfigFile(_0x1851c1);}function resolveFilePath(_0x206abb){const _0x11b670=a31_0x2e2708;return isAbsolute(_0x206abb)?_0x206abb:resolve(process[_0x11b670(0xf8)](),_0x206abb);}function readSourceFile(_0xabf53){const _0x3519a0=a31_0x2e2708;try{const _0x348542=readFileSync(_0xabf53,{'encoding':_0x3519a0(0xda)});return JSON[_0x3519a0(0xe6)](_0x348542);}catch(_0x49fd99){throw CliErrors[_0x3519a0(0xfd)](_0x3519a0(0xfb)+_0x49fd99['message']);}}function resolveInitEnv(_0x5aca65){const _0x55fc45=a31_0x2e2708,_0x58ee76=_0x5aca65[_0x55fc45(0xdc)];if(_0x58ee76===undefined||_0x58ee76==='')return DEFAULT_CONFIG_VALUES[_0x55fc45(0xdc)];if(!RUNTIME_ENV_VALUES[_0x55fc45(0x103)](_0x58ee76))throw CliErrors[_0x55fc45(0xfd)](_0x55fc45(0x110)+_0x58ee76+_0x55fc45(0xf7)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x58ee76;}
@@ -1 +1 @@
1
- const a32_0x53bd02=a32_0x1753;(function(_0x46800a,_0xbc598e){const _0x486cb4=a32_0x1753,_0x1b5fd2=_0x46800a();while(!![]){try{const _0x4cac37=-parseInt(_0x486cb4(0xdf))/0x1+parseInt(_0x486cb4(0xb5))/0x2*(parseInt(_0x486cb4(0xb8))/0x3)+parseInt(_0x486cb4(0xca))/0x4+-parseInt(_0x486cb4(0xc3))/0x5*(parseInt(_0x486cb4(0xd4))/0x6)+-parseInt(_0x486cb4(0xda))/0x7+-parseInt(_0x486cb4(0xae))/0x8+parseInt(_0x486cb4(0xb4))/0x9;if(_0x4cac37===_0xbc598e)break;else _0x1b5fd2['push'](_0x1b5fd2['shift']());}catch(_0x8b82e8){_0x1b5fd2['push'](_0x1b5fd2['shift']());}}}(a32_0x39d4,0x7523a));import{existsSync,readFileSync,statSync}from'node:fs';function a32_0x1753(_0x3d467e,_0x52b024){_0x3d467e=_0x3d467e-0xa8;const _0x39d4b8=a32_0x39d4();let _0x1753d4=_0x39d4b8[_0x3d467e];return _0x1753d4;}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a32_0x39d4(){const _0x3c18f2=['query','Search\x20query\x20is\x20required.','write','verbose','69895PAHDgR','docId','/client/knowledge-base/personal/create','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Override\x20the\x20existing\x20entry\x20title','body','File\x20not\x20found:\x20','784428Tsvsoy','length','file','POST','appCode','content','read','ragErrorMessage','bool','create','84tbDKTO','str','string','update','ragStatus','detail','145824AZmZfs','/update','description','title','scope','263053WWEBCS','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','userId','updateTime','version','Personal\x20knowledge-base\x20entry\x20title','881256GDwToh','map','list','Personal\x20knowledge-base\x20entry\x20ID','topk','createTime','1530621CocVnL','4XWADTr','build','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','1055061ZktLid','trim','isFile','search','num','validation','isFinite'];a32_0x39d4=function(){return _0x3c18f2;};return a32_0x39d4();}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x53bd02(0xdd),'type':a32_0x53bd02(0xd6),'required':!![],'description':a32_0x53bd02(0xad)},FILE_FLAG={'name':a32_0x53bd02(0xcc),'type':'string','required':!![],'description':a32_0x53bd02(0xa9)},QUERY_FLAG={'name':a32_0x53bd02(0xbf),'type':a32_0x53bd02(0xd6),'required':!![],'description':a32_0x53bd02(0xc6)},TOPK_FLAG={'name':a32_0x53bd02(0xb2),'type':'number','description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x1c1128){const _0x15ba86=a32_0x53bd02;if(!_0x1c1128)throw CliErrors[_0x15ba86(0xbd)]('File\x20path\x20is\x20required.');if(!existsSync(_0x1c1128))throw CliErrors[_0x15ba86(0xbd)](_0x15ba86(0xc9)+_0x1c1128);if(!statSync(_0x1c1128)[_0x15ba86(0xba)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1c1128);return readFileSync(_0x1c1128,'utf8');}function summarizePersonalItem(_0x5ac319){const _0xd1306=a32_0x53bd02;return{'id':_0x5ac319['id'],'title':_0x5ac319[_0xd1306(0xdd)],'version':_0x5ac319[_0xd1306(0xac)],'ragStatus':_0x5ac319[_0xd1306(0xd8)],'ragErrorMessage':_0x5ac319[_0xd1306(0xd1)],'updateTime':_0x5ac319[_0xd1306(0xab)]};}function detailPersonalItem(_0x15264f){const _0x236c6e=a32_0x53bd02;return{'id':_0x15264f['id'],'appCode':_0x15264f[_0x236c6e(0xce)],'scope':_0x15264f[_0x236c6e(0xde)],'userId':_0x15264f[_0x236c6e(0xaa)],'title':_0x15264f['title'],'content':_0x15264f[_0x236c6e(0xcf)]??'','version':_0x15264f[_0x236c6e(0xac)],'ragStatus':_0x15264f['ragStatus'],'ragErrorMessage':_0x15264f[_0x236c6e(0xd1)],'createTime':_0x15264f[_0x236c6e(0xb3)],'updateTime':_0x15264f[_0x236c6e(0xab)]};}function summarizeSearchHit(_0x24d2d2){const _0xb38db9=a32_0x53bd02;return{'scope':_0x24d2d2[_0xb38db9(0xde)],'title':_0x24d2d2[_0xb38db9(0xdd)],'docId':_0x24d2d2[_0xb38db9(0xc4)],'score':_0x24d2d2['score'],'weightedScore':_0x24d2d2['weightedScore'],'content':_0x24d2d2[_0xb38db9(0xcf)],'metadata':_0x24d2d2['metadata']};}function readTopK(_0x2e0794){const _0x22f8b7=a32_0x53bd02,_0x16cd9b=_0x2e0794['flag'](_0x22f8b7(0xb2));if(_0x16cd9b===undefined||_0x16cd9b===null||_0x16cd9b==='')return undefined;const _0x5d51b1=_0x2e0794[_0x22f8b7(0xbc)]('topk');if(!Number[_0x22f8b7(0xbe)](_0x5d51b1)||_0x5d51b1<0x1)throw CliErrors[_0x22f8b7(0xbd)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x5d51b1;}const kbList={'service':'kb','command':a32_0x53bd02(0xb0),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x53bd02(0xd0),'flags':[VERBOSE_FLAG],async 'execute'(_0x32cdb0){const _0x3124e8=a32_0x53bd02,_0x2a2cc9=await listPersonalKnowledgeBaseItems(_0x32cdb0[_0x3124e8(0xce)]);if(_0x32cdb0[_0x3124e8(0xd2)](_0x3124e8(0xc2)))return{'ok':!![],'data':{'total':_0x2a2cc9[_0x3124e8(0xcb)],'items':_0x2a2cc9}};return{'ok':!![],'data':{'total':_0x2a2cc9['length'],'items':_0x2a2cc9[_0x3124e8(0xaf)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x53bd02(0xd9),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a32_0x53bd02(0xb1)}],async 'execute'(_0x42c595){const _0x42ffac=a32_0x53bd02,_0x666ac1=await getPersonalKnowledgeBaseItem(_0x42c595[_0x42ffac(0xbc)]('id'),_0x42c595[_0x42ffac(0xce)]);return{'ok':!![],'data':detailPersonalItem(_0x666ac1)};}},kbCreate={'service':'kb','command':a32_0x53bd02(0xd3),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a32_0x53bd02(0xc1),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x3889e2){const _0x55628d=a32_0x53bd02,_0x1475aa=_0x3889e2[_0x55628d(0xd5)](_0x55628d(0xdd)),_0x4c15cc=readKnowledgeFile(_0x3889e2[_0x55628d(0xd5)]('file')),_0x5cc0a3=await createPersonalKnowledgeBaseItem(_0x3889e2[_0x55628d(0xce)],{'title':_0x1475aa,'content':_0x4c15cc});return{'ok':!![],'data':summarizePersonalItem(_0x5cc0a3),'message':'Created\x20KB\x20entry\x20'+_0x5cc0a3['id']+'\x20('+_0x5cc0a3['title']+')'};},async 'dryRun'(_0x424cea){const _0x54d425=a32_0x53bd02,_0xd4956d=_0x424cea[_0x54d425(0xd5)](_0x54d425(0xdd)),_0x5d0085=readKnowledgeFile(_0x424cea['str'](_0x54d425(0xcc)));return dryRun(_0x54d425(0xcd),_0x54d425(0xc5))[_0x54d425(0xc8)]({'appCode':_0x424cea[_0x54d425(0xce)],'title':_0xd4956d,'content':_0x5d0085})[_0x54d425(0xdc)](_0x54d425(0xa8)+_0xd4956d+'\x22')[_0x54d425(0xb6)]();}},kbUpdate={'service':'kb','command':a32_0x53bd02(0xd7),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a32_0x53bd02(0xc1),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x53bd02(0xc7)},FILE_FLAG],async 'execute'(_0x328997){const _0x2233ef=a32_0x53bd02,_0x328d52=_0x328997[_0x2233ef(0xbc)]('id'),_0x23732f=readKnowledgeFile(_0x328997[_0x2233ef(0xd5)]('file')),_0x4fd831=_0x328997[_0x2233ef(0xd5)](_0x2233ef(0xdd))||(await getPersonalKnowledgeBaseItem(_0x328d52,_0x328997['appCode']))['title'],_0x17d4d8=await updatePersonalKnowledgeBaseItem(_0x328d52,_0x328997['appCode'],{'title':_0x4fd831,'content':_0x23732f});return{'ok':!![],'data':summarizePersonalItem(_0x17d4d8),'message':'Updated\x20KB\x20entry\x20'+_0x17d4d8['id']+'\x20('+_0x17d4d8[_0x2233ef(0xdd)]+')'};},async 'dryRun'(_0x46a1ca){const _0x24cafe=a32_0x53bd02,_0x3a2b5d=_0x46a1ca[_0x24cafe(0xbc)]('id'),_0x4a74b4=readKnowledgeFile(_0x46a1ca[_0x24cafe(0xd5)]('file')),_0x400655=_0x46a1ca[_0x24cafe(0xd5)](_0x24cafe(0xdd))||(await getPersonalKnowledgeBaseItem(_0x3a2b5d,_0x46a1ca[_0x24cafe(0xce)]))[_0x24cafe(0xdd)];return dryRun(_0x24cafe(0xcd),'/client/knowledge-base/personal/'+_0x3a2b5d+_0x24cafe(0xdb))[_0x24cafe(0xc8)]({'appCode':_0x46a1ca[_0x24cafe(0xce)],'title':_0x400655,'content':_0x4a74b4})['description'](_0x24cafe(0xb7)+_0x3a2b5d)[_0x24cafe(0xb6)]();}},kbSearch={'service':'kb','command':a32_0x53bd02(0xbb),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a32_0x53bd02(0xd0),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x364b71){const _0x44933b=a32_0x53bd02;if(!_0x364b71[_0x44933b(0xd5)]('query')[_0x44933b(0xb9)]())throw CliErrors[_0x44933b(0xbd)](_0x44933b(0xc0));readTopK(_0x364b71);},async 'execute'(_0x575188){const _0x3a629c=a32_0x53bd02,_0x2391b7=_0x575188[_0x3a629c(0xd5)]('query')['trim'](),_0x5b569d=readTopK(_0x575188),_0x3752f7=await searchKnowledgeBase(_0x575188['appCode'],{'query':_0x2391b7,'topK':_0x5b569d});return{'ok':!![],'data':{'total':_0x3752f7[_0x3a629c(0xcb)],'hits':_0x3752f7[_0x3a629c(0xaf)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x2ca973=a32_0x28a3;(function(_0x1d0347,_0xc3d18d){const _0x1e1ac2=a32_0x28a3,_0x404026=_0x1d0347();while(!![]){try{const _0x1769e7=parseInt(_0x1e1ac2(0xf9))/0x1+parseInt(_0x1e1ac2(0x12c))/0x2*(-parseInt(_0x1e1ac2(0x11e))/0x3)+-parseInt(_0x1e1ac2(0x12f))/0x4+parseInt(_0x1e1ac2(0x131))/0x5*(-parseInt(_0x1e1ac2(0x10d))/0x6)+-parseInt(_0x1e1ac2(0x125))/0x7*(-parseInt(_0x1e1ac2(0xf4))/0x8)+parseInt(_0x1e1ac2(0x113))/0x9*(-parseInt(_0x1e1ac2(0xf3))/0xa)+-parseInt(_0x1e1ac2(0x103))/0xb*(-parseInt(_0x1e1ac2(0x122))/0xc);if(_0x1769e7===_0xc3d18d)break;else _0x404026['push'](_0x404026['shift']());}catch(_0x4d8d2c){_0x404026['push'](_0x404026['shift']());}}}(a32_0x5b8c,0xabfd0));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';const TITLE_FLAG={'name':'title','type':'string','required':!![],'description':a32_0x2ca973(0x110)},FILE_FLAG={'name':a32_0x2ca973(0x115),'type':a32_0x2ca973(0x108),'required':!![],'description':a32_0x2ca973(0x100)},QUERY_FLAG={'name':a32_0x2ca973(0x12a),'type':a32_0x2ca973(0x108),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x2ca973(0x111),'type':a32_0x2ca973(0x116),'description':a32_0x2ca973(0x128)};function readKnowledgeFile(_0x37e721){const _0x2a5801=a32_0x2ca973;if(!_0x37e721)throw CliErrors['validation'](_0x2a5801(0x11d));if(!existsSync(_0x37e721))throw CliErrors[_0x2a5801(0xfe)]('File\x20not\x20found:\x20'+_0x37e721);if(!statSync(_0x37e721)[_0x2a5801(0xfc)]())throw CliErrors[_0x2a5801(0xfe)](_0x2a5801(0xfb)+_0x37e721);return readFileSync(_0x37e721,'utf8');}function summarizePersonalItem(_0x9d5e71){const _0x4de505=a32_0x2ca973;return{'id':_0x9d5e71['id'],'title':_0x9d5e71[_0x4de505(0x11a)],'version':_0x9d5e71['version'],'ragStatus':_0x9d5e71[_0x4de505(0x104)],'ragErrorMessage':_0x9d5e71[_0x4de505(0x114)],'updateTime':_0x9d5e71['updateTime']};}function detailPersonalItem(_0x2a226a){const _0x52e840=a32_0x2ca973;return{'id':_0x2a226a['id'],'appCode':_0x2a226a[_0x52e840(0xf8)],'scope':_0x2a226a[_0x52e840(0x127)],'userId':_0x2a226a[_0x52e840(0xfd)],'title':_0x2a226a[_0x52e840(0x11a)],'content':_0x2a226a[_0x52e840(0x106)]??'','version':_0x2a226a[_0x52e840(0x102)],'ragStatus':_0x2a226a[_0x52e840(0x104)],'ragErrorMessage':_0x2a226a['ragErrorMessage'],'createTime':_0x2a226a[_0x52e840(0x123)],'updateTime':_0x2a226a[_0x52e840(0x12b)]};}function summarizeSearchHit(_0x114eac){const _0x1bd52e=a32_0x2ca973;return{'scope':_0x114eac['scope'],'title':_0x114eac[_0x1bd52e(0x11a)],'docId':_0x114eac[_0x1bd52e(0x10f)],'score':_0x114eac['score'],'weightedScore':_0x114eac[_0x1bd52e(0x120)],'content':_0x114eac[_0x1bd52e(0x106)],'metadata':_0x114eac['metadata']};}function readTopK(_0x42ad07){const _0x57cbc9=a32_0x2ca973,_0x19834e=_0x42ad07['flag'](_0x57cbc9(0x111));if(_0x19834e===undefined||_0x19834e===null||_0x19834e==='')return undefined;const _0x86bf10=_0x42ad07['num'](_0x57cbc9(0x111));if(!Number[_0x57cbc9(0x117)](_0x86bf10)||_0x86bf10<0x1)throw CliErrors['validation'](_0x57cbc9(0x10c));return _0x86bf10;}const kbList={'service':'kb','command':a32_0x2ca973(0x11c),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x56e0a0){const _0x1ec8ae=a32_0x2ca973,_0x275e32=await listPersonalKnowledgeBaseItems(_0x56e0a0[_0x1ec8ae(0xf8)]);if(_0x56e0a0[_0x1ec8ae(0xf5)](_0x1ec8ae(0x129)))return{'ok':!![],'data':{'total':_0x275e32[_0x1ec8ae(0xf2)],'items':_0x275e32}};return{'ok':!![],'data':{'total':_0x275e32[_0x1ec8ae(0xf2)],'items':_0x275e32['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x2ca973(0x11f),'risk':a32_0x2ca973(0x105),'flags':[{...ID_FLAG,'description':a32_0x2ca973(0x10e)}],async 'execute'(_0x3ceb23){const _0x454dbc=a32_0x2ca973,_0x4e684e=await getPersonalKnowledgeBaseItem(_0x3ceb23[_0x454dbc(0xff)]('id'),_0x3ceb23['appCode']);return{'ok':!![],'data':detailPersonalItem(_0x4e684e)};}},kbCreate={'service':'kb','command':a32_0x2ca973(0x10a),'description':a32_0x2ca973(0xf6),'risk':a32_0x2ca973(0x10b),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x144ac3){const _0x25ea30=a32_0x2ca973,_0x402c2e=_0x144ac3['str'](_0x25ea30(0x11a)),_0x934da5=readKnowledgeFile(_0x144ac3[_0x25ea30(0xfa)]('file')),_0x12d2ed=await createPersonalKnowledgeBaseItem(_0x144ac3[_0x25ea30(0xf8)],{'title':_0x402c2e,'content':_0x934da5});return{'ok':!![],'data':summarizePersonalItem(_0x12d2ed),'message':_0x25ea30(0xf7)+_0x12d2ed['id']+'\x20('+_0x12d2ed[_0x25ea30(0x11a)]+')'};},async 'dryRun'(_0x35f10d){const _0xfc0a01=a32_0x2ca973,_0x15e910=_0x35f10d[_0xfc0a01(0xfa)](_0xfc0a01(0x11a)),_0x23d208=readKnowledgeFile(_0x35f10d[_0xfc0a01(0xfa)]('file'));return dryRun(_0xfc0a01(0x12e),'/client/knowledge-base/personal/create')[_0xfc0a01(0x121)]({'appCode':_0x35f10d[_0xfc0a01(0xf8)],'title':_0x15e910,'content':_0x23d208})['description'](_0xfc0a01(0x12d)+_0x15e910+'\x22')[_0xfc0a01(0xf1)]();}},kbUpdate={'service':'kb','command':a32_0x2ca973(0x126),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':'write','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x2ca973(0x118)},FILE_FLAG],async 'execute'(_0x1dc145){const _0x41b900=a32_0x2ca973,_0x380b78=_0x1dc145[_0x41b900(0xff)]('id'),_0x13689a=readKnowledgeFile(_0x1dc145[_0x41b900(0xfa)](_0x41b900(0x115))),_0x5d0feb=_0x1dc145[_0x41b900(0xfa)](_0x41b900(0x11a))||(await getPersonalKnowledgeBaseItem(_0x380b78,_0x1dc145[_0x41b900(0xf8)]))[_0x41b900(0x11a)],_0x519dfa=await updatePersonalKnowledgeBaseItem(_0x380b78,_0x1dc145['appCode'],{'title':_0x5d0feb,'content':_0x13689a});return{'ok':!![],'data':summarizePersonalItem(_0x519dfa),'message':_0x41b900(0x11b)+_0x519dfa['id']+'\x20('+_0x519dfa[_0x41b900(0x11a)]+')'};},async 'dryRun'(_0x2be14d){const _0x5aa037=a32_0x2ca973,_0x4251a2=_0x2be14d[_0x5aa037(0xff)]('id'),_0x148d47=readKnowledgeFile(_0x2be14d[_0x5aa037(0xfa)](_0x5aa037(0x115))),_0x2eb8d9=_0x2be14d[_0x5aa037(0xfa)](_0x5aa037(0x11a))||(await getPersonalKnowledgeBaseItem(_0x4251a2,_0x2be14d[_0x5aa037(0xf8)]))[_0x5aa037(0x11a)];return dryRun(_0x5aa037(0x12e),_0x5aa037(0x124)+_0x4251a2+_0x5aa037(0x101))[_0x5aa037(0x121)]({'appCode':_0x2be14d['appCode'],'title':_0x2eb8d9,'content':_0x148d47})['description'](_0x5aa037(0x119)+_0x4251a2)[_0x5aa037(0xf1)]();}},kbSearch={'service':'kb','command':a32_0x2ca973(0xf0),'description':a32_0x2ca973(0x109),'risk':a32_0x2ca973(0x105),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x32eb73){const _0x4149db=a32_0x2ca973;if(!_0x32eb73[_0x4149db(0xfa)](_0x4149db(0x12a))[_0x4149db(0x107)]())throw CliErrors['validation'](_0x4149db(0x112));readTopK(_0x32eb73);},async 'execute'(_0x49b318){const _0x46c58a=a32_0x2ca973,_0x543214=_0x49b318['str']('query')[_0x46c58a(0x107)](),_0x4a9f7a=readTopK(_0x49b318),_0x3c8d5d=await searchKnowledgeBase(_0x49b318[_0x46c58a(0xf8)],{'query':_0x543214,'topK':_0x4a9f7a});return{'ok':!![],'data':{'total':_0x3c8d5d[_0x46c58a(0xf2)],'hits':_0x3c8d5d[_0x46c58a(0x130)](summarizeSearchHit)}};}};function a32_0x28a3(_0x3d9331,_0x559375){_0x3d9331=_0x3d9331-0xf0;const _0x5b8c35=a32_0x5b8c();let _0x28a315=_0x5b8c35[_0x3d9331];return _0x28a315;}export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];function a32_0x5b8c(){const _0x4ca100=['update','scope','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','verbose','query','updateTime','473666onXJEu','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','POST','1135256FoKsZH','map','30jBkEjm','search','build','length','4900790iArtIt','8IjdQjX','bool','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Created\x20KB\x20entry\x20','appCode','877098yjhxKe','str','File\x20is\x20not\x20a\x20regular\x20file:\x20','isFile','userId','validation','num','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','/update','version','6955091RhOKCk','ragStatus','read','content','trim','string','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','create','write','--topk\x20must\x20be\x20a\x20positive\x20number.','391596SsFrxc','Personal\x20knowledge-base\x20entry\x20ID','docId','Personal\x20knowledge-base\x20entry\x20title','topk','Search\x20query\x20is\x20required.','18XLjQsJ','ragErrorMessage','file','number','isFinite','Override\x20the\x20existing\x20entry\x20title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','title','Updated\x20KB\x20entry\x20','list','File\x20path\x20is\x20required.','6LPaaHG','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','weightedScore','body','24FWVQzV','createTime','/client/knowledge-base/personal/','4844266rrjsQE'];a32_0x5b8c=function(){return _0x4ca100;};return a32_0x5b8c();}
@@ -1 +1 @@
1
- function a33_0x1951(_0x145ae5,_0x388942){_0x145ae5=_0x145ae5-0x1d1;const _0x261be4=a33_0x261b();let _0x195154=_0x261be4[_0x145ae5];return _0x195154;}const a33_0x26e11b=a33_0x1951;function a33_0x261b(){const _0xef3dfa=['logs','\x20\x20\x20Details:\x20','Clear\x20command\x20history\x20logs','length','12033076FkpwIJ','success','show','en-US','23nIkHmi','126ZMKpcz','timestamp','318906mykCSQ','155836OnfJiq','read','forEach','details','\x20\x20\x20Duration:\x20','*\x20No\x20logs\x20found','*\x20Logs\x20cleared','stringify','\x20logs:\x0a','warn','write','16suDgyf','level','clearLogs','896EqwdOV','\x20\x20\x20Time:\x20','clear','7600375nxiyyp','error','readLogs','toLocaleString','duration','keys','1352283eEuMot','View\x20command\x20history\x20logs','message','18176380Hgyeuf','log','114147WnqMIQ','command'];a33_0x261b=function(){return _0xef3dfa;};return a33_0x261b();}(function(_0xa9fef6,_0x23094a){const _0xfc7fe3=a33_0x1951,_0x4001b7=_0xa9fef6();while(!![]){try{const _0xd730af=parseInt(_0xfc7fe3(0x1f2))/0x1*(-parseInt(_0xfc7fe3(0x1f6))/0x2)+-parseInt(_0xfc7fe3(0x1e3))/0x3*(-parseInt(_0xfc7fe3(0x1d7))/0x4)+parseInt(_0xfc7fe3(0x1dd))/0x5+-parseInt(_0xfc7fe3(0x1f5))/0x6*(-parseInt(_0xfc7fe3(0x1f3))/0x7)+-parseInt(_0xfc7fe3(0x1da))/0x8*(-parseInt(_0xfc7fe3(0x1e8))/0x9)+-parseInt(_0xfc7fe3(0x1e6))/0xa+-parseInt(_0xfc7fe3(0x1ee))/0xb;if(_0xd730af===_0x23094a)break;else _0x4001b7['push'](_0x4001b7['shift']());}catch(_0x3ea89c){_0x4001b7['push'](_0x4001b7['shift']());}}}(a33_0x261b,0xf3539));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x498cb7){const _0xbb9adc=a33_0x1951;if(_0x498cb7['length']===0x0){console[_0xbb9adc(0x1e7)](_0xbb9adc(0x1d1));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0xbb9adc(0x1d4)),_0x498cb7[_0xbb9adc(0x1f8)]((_0x21b363,_0x3d2149)=>{const _0x167326=_0xbb9adc,_0x16d61d=new Date(_0x21b363[_0x167326(0x1f4)])[_0x167326(0x1e0)](_0x167326(0x1f1)),_0x3d9eb7=_0x21b363[_0x167326(0x1d8)]===_0x167326(0x1ef)?'√':_0x21b363[_0x167326(0x1d8)]===_0x167326(0x1de)?'×':_0x21b363[_0x167326(0x1d8)]===_0x167326(0x1d5)?'!':'i';console['log'](_0x3d2149+0x1+'.\x20'+_0x3d9eb7+'\x20['+_0x21b363[_0x167326(0x1e9)]+']\x20'+_0x21b363[_0x167326(0x1e5)]),console['log'](_0x167326(0x1db)+_0x16d61d),_0x21b363['duration']&&console['log'](_0x167326(0x1fa)+_0x21b363[_0x167326(0x1e1)]+'ms'),_0x21b363[_0x167326(0x1f9)]&&Object[_0x167326(0x1e2)](_0x21b363[_0x167326(0x1f9)])[_0x167326(0x1ed)]>0x0&&console[_0x167326(0x1e7)](_0x167326(0x1eb)+JSON[_0x167326(0x1d3)](_0x21b363[_0x167326(0x1f9)],null,0x2)),console[_0x167326(0x1e7)]('');});}export const logsDefinitions=[{'service':a33_0x26e11b(0x1ea),'command':a33_0x26e11b(0x1f0),'description':a33_0x26e11b(0x1e4),'risk':a33_0x26e11b(0x1f7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x305bec){const _0x104629=a33_0x26e11b;return printLogs(logger[_0x104629(0x1df)]()),{'ok':!![]};}},{'service':a33_0x26e11b(0x1ea),'command':a33_0x26e11b(0x1dc),'description':a33_0x26e11b(0x1ec),'risk':a33_0x26e11b(0x1d6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1bea37){const _0x2fec90=a33_0x26e11b;return logger[_0x2fec90(0x1d9)](),console[_0x2fec90(0x1e7)](_0x2fec90(0x1d2)),{'ok':!![]};}}];
1
+ const a33_0x457d56=a33_0x2ef8;function a33_0x2ef8(_0x224a17,_0x547d79){_0x224a17=_0x224a17-0x12e;const _0xb5c8f=a33_0xb5c8();let _0x2ef876=_0xb5c8f[_0x224a17];return _0x2ef876;}(function(_0x2cb613,_0x4c820d){const _0x4e960f=a33_0x2ef8,_0x3d6ffd=_0x2cb613();while(!![]){try{const _0x551570=parseInt(_0x4e960f(0x137))/0x1+parseInt(_0x4e960f(0x135))/0x2*(parseInt(_0x4e960f(0x151))/0x3)+-parseInt(_0x4e960f(0x14f))/0x4*(parseInt(_0x4e960f(0x12f))/0x5)+parseInt(_0x4e960f(0x141))/0x6+parseInt(_0x4e960f(0x13d))/0x7*(parseInt(_0x4e960f(0x14b))/0x8)+parseInt(_0x4e960f(0x145))/0x9+-parseInt(_0x4e960f(0x133))/0xa*(parseInt(_0x4e960f(0x14e))/0xb);if(_0x551570===_0x4c820d)break;else _0x3d6ffd['push'](_0x3d6ffd['shift']());}catch(_0x17f9a0){_0x3d6ffd['push'](_0x3d6ffd['shift']());}}}(a33_0xb5c8,0xdf35d));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0xb5c8(){const _0x197b48=['*\x20Logs\x20cleared','21epAHEs','timestamp','read','readLogs','9956166tDsxKp','Clear\x20command\x20history\x20logs','message','View\x20command\x20history\x20logs','3168117sguaeY','write','\x20\x20\x20Time:\x20','error','forEach','duration','4606520fiTBAB','clearLogs','stringify','22385OriaTX','8132VhgRby','show','18hzXyfB','details','\x20logs:\x0a','415NWYOFD','success','logs','log','27730pzfMpZ','keys','499062ZgyhWg','length','1490058FJWAml','level','\x20\x20\x20Duration:\x20','\x20\x20\x20Details:\x20','en-US'];a33_0xb5c8=function(){return _0x197b48;};return a33_0xb5c8();}function printLogs(_0x2ec177){const _0x194548=a33_0x2ef8;if(_0x2ec177[_0x194548(0x136)]===0x0){console[_0x194548(0x132)]('*\x20No\x20logs\x20found');return;}console[_0x194548(0x132)]('*\x20'+CLI_DISPLAY_NAME+_0x194548(0x12e)),_0x2ec177[_0x194548(0x149)]((_0x36abf5,_0xa6af68)=>{const _0x57e703=_0x194548,_0x5d0760=new Date(_0x36abf5[_0x57e703(0x13e)])['toLocaleString'](_0x57e703(0x13b)),_0x2d1ad3=_0x36abf5[_0x57e703(0x138)]===_0x57e703(0x130)?'√':_0x36abf5[_0x57e703(0x138)]===_0x57e703(0x148)?'×':_0x36abf5[_0x57e703(0x138)]==='warn'?'!':'i';console['log'](_0xa6af68+0x1+'.\x20'+_0x2d1ad3+'\x20['+_0x36abf5['command']+']\x20'+_0x36abf5[_0x57e703(0x143)]),console[_0x57e703(0x132)](_0x57e703(0x147)+_0x5d0760),_0x36abf5[_0x57e703(0x14a)]&&console[_0x57e703(0x132)](_0x57e703(0x139)+_0x36abf5['duration']+'ms'),_0x36abf5['details']&&Object[_0x57e703(0x134)](_0x36abf5['details'])['length']>0x0&&console[_0x57e703(0x132)](_0x57e703(0x13a)+JSON[_0x57e703(0x14d)](_0x36abf5[_0x57e703(0x152)],null,0x2)),console[_0x57e703(0x132)]('');});}export const logsDefinitions=[{'service':a33_0x457d56(0x131),'command':a33_0x457d56(0x150),'description':a33_0x457d56(0x144),'risk':a33_0x457d56(0x13f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x52dc27){const _0x165b2a=a33_0x457d56;return printLogs(logger[_0x165b2a(0x140)]()),{'ok':!![]};}},{'service':a33_0x457d56(0x131),'command':'clear','description':a33_0x457d56(0x142),'risk':a33_0x457d56(0x146),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4cae48){const _0x58b6c5=a33_0x457d56;return logger[_0x58b6c5(0x14c)](),console['log'](_0x58b6c5(0x13c)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x3d7779=a34_0xac72;(function(_0x180d72,_0x5d74d9){const _0x5b20a2=a34_0xac72,_0x5c9cc9=_0x180d72();while(!![]){try{const _0x3a85c1=parseInt(_0x5b20a2(0xb9))/0x1+parseInt(_0x5b20a2(0xb0))/0x2+-parseInt(_0x5b20a2(0xc6))/0x3*(-parseInt(_0x5b20a2(0xc8))/0x4)+parseInt(_0x5b20a2(0xb3))/0x5*(parseInt(_0x5b20a2(0xbf))/0x6)+-parseInt(_0x5b20a2(0xd1))/0x7+parseInt(_0x5b20a2(0xc2))/0x8*(parseInt(_0x5b20a2(0xa0))/0x9)+-parseInt(_0x5b20a2(0xcf))/0xa;if(_0x3a85c1===_0x5d74d9)break;else _0x5c9cc9['push'](_0x5c9cc9['shift']());}catch(_0x60edb){_0x5c9cc9['push'](_0x5c9cc9['shift']());}}}(a34_0x5af6,0x56768));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';function a34_0x5af6(){const _0x3d62ce=['image-file','\x20OCR\x20from\x20URL','general','9417200HIfxRO','string','1227716CXukuy','trim','File\x20upload\x20response\x20missing\x20filePath.','idCard','path','<filePath\x20returned\x20by\x20/client/uploadFile>','idcard','18xOdVgr','toLowerCase','/client/queryFileUrl','fileName','General','/client/uploadFile','form','Table','fileUrl','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','ocr','Preview:\x20recognize\x20','scene','imageUrl','write','730106kRDlbO','body','Publicly\x20accessible\x20image\x20or\x20file\x20URL','541505yEBSQI','File\x20URL\x20response\x20missing\x20fileUrl.','imageFile','/client/ocr','description','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','478545yqZqWa','str','apiError','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','POST','count','6EZnArf','appCode','Invoice','631136nItIoP','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','filter','\x20OCR','1084731rWHjVp','image-url','4ZdKLEV','validation','filePath','build'];a34_0x5af6=function(){return _0x3d62ce;};return a34_0x5af6();}const SUPPORTED_SCENES=['invoice',a34_0x3d7779(0xce),a34_0x3d7779(0xa6),a34_0x3d7779(0xd4)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x3d7779(0xc1),'general':a34_0x3d7779(0xa4),'form':a34_0x3d7779(0xa7),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a34_0x3d7779(0xd0),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x3d7779(0xc3)},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x3d7779(0xd0),'description':a34_0x3d7779(0xaa)},IMAGE_URL_FLAG={'name':a34_0x3d7779(0xc7),'type':a34_0x3d7779(0xd0),'description':a34_0x3d7779(0xb2)};function normalizeScene(_0x4fb34c){const _0xf1c762=a34_0x3d7779,_0x181fe3=_0x4fb34c[_0xf1c762(0xd2)]()[_0xf1c762(0xa1)]();if(_0x181fe3===_0xf1c762(0x9f))return _0xf1c762(0xd4);if(_0x181fe3==='invoice'||_0x181fe3===_0xf1c762(0xce)||_0x181fe3===_0xf1c762(0xa6))return _0x181fe3;throw CliErrors[_0xf1c762(0xc9)]('Unsupported\x20OCR\x20scene:\x20'+_0x4fb34c+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function a34_0xac72(_0x285006,_0x506e02){_0x285006=_0x285006-0x9e;const _0x5af690=a34_0x5af6();let _0xac72b8=_0x5af690[_0x285006];return _0xac72b8;}function selectedInputs(_0x5b3b4d){const _0x1bb9cd=a34_0x3d7779,_0x3cec50=_0x5b3b4d['str'](_0x1bb9cd(0xcc))[_0x1bb9cd(0xd2)](),_0x310f3e=_0x5b3b4d['str'](_0x1bb9cd(0xc7))[_0x1bb9cd(0xd2)]();return{'imageFile':_0x3cec50,'imageUrl':_0x310f3e,'count':[_0x3cec50,_0x310f3e][_0x1bb9cd(0xc4)](Boolean)['length']};}function validateInputSelection(_0x22b49f){const _0xeedb2b=a34_0x3d7779,_0x39f1e3=selectedInputs(_0x22b49f);if(_0x39f1e3[_0xeedb2b(0xbe)]!==0x1)throw CliErrors[_0xeedb2b(0xc9)](_0xeedb2b(0xa9));return _0x39f1e3;}function withScene(_0x4b336a,_0x3ab9ae,_0x2787d3){const _0x5cd639=a34_0x3d7779;return{..._0x4b336a,'scene':_0x3ab9ae,..._0x2787d3?{'sourceFile':{'fileName':_0x2787d3[_0x5cd639(0xa3)],'filePath':_0x2787d3[_0x5cd639(0xca)]}}:{}};}const ocrRecognize={'service':a34_0x3d7779(0xab),'command':'recognize','description':a34_0x3d7779(0xbc),'risk':a34_0x3d7779(0xaf),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3b8b19){const _0x471f2c=a34_0x3d7779,_0x4fa4bf=normalizeScene(_0x3b8b19[_0x471f2c(0xba)]('scene')),_0x278c66=SCENE_TO_LEGACY_TYPE[_0x4fa4bf],_0x516e65=validateInputSelection(_0x3b8b19);if(_0x516e65[_0x471f2c(0xae)])return dryRun(_0x471f2c(0xbd),_0x471f2c(0xb6))[_0x471f2c(0xb1)]({'appCode':_0x3b8b19[_0x471f2c(0xc0)],'url':_0x516e65['imageUrl'],'type':_0x278c66})[_0x471f2c(0xb7)](_0x471f2c(0xac)+_0x4fa4bf+_0x471f2c(0xcd))[_0x471f2c(0xcb)]();const _0x2d29e6=requireRuntimeUploadFile(_0x516e65[_0x471f2c(0xb5)],_0x471f2c(0xcc));return dryRun(_0x471f2c(0xbd),'/client/uploadFile')[_0x471f2c(0xb1)]({'steps':[{'method':_0x471f2c(0xbd),'url':_0x471f2c(0xa5),'body':{'appCode':_0x3b8b19['appCode'],'multipart':{'file':_0x2d29e6}}},{'method':_0x471f2c(0xbd),'url':_0x471f2c(0xa2),'body':{'filePath':_0x471f2c(0x9e),'downloadFlag':![]}},{'method':_0x471f2c(0xbd),'url':'/client/ocr','body':{'appCode':_0x3b8b19[_0x471f2c(0xc0)],'url':'<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','type':_0x278c66}}]})['description'](_0x471f2c(0xb8)+_0x4fa4bf+_0x471f2c(0xc5))['build']();},async 'execute'(_0x35c577){const _0x29f260=a34_0x3d7779,_0x5b3598=normalizeScene(_0x35c577[_0x29f260(0xba)](_0x29f260(0xad))),_0x47cbeb=SCENE_TO_LEGACY_TYPE[_0x5b3598],_0x51e18c=validateInputSelection(_0x35c577);if(_0x51e18c[_0x29f260(0xae)]){const _0x597b72=await recognizeRuntimeOcr(_0x35c577[_0x29f260(0xc0)],{'url':_0x51e18c[_0x29f260(0xae)],'type':_0x47cbeb});return{'ok':!![],'data':withScene(_0x597b72,_0x5b3598)};}const _0x5a47d2=requireRuntimeUploadFile(_0x51e18c[_0x29f260(0xb5)],_0x29f260(0xcc)),_0x147d45=await uploadRuntimeFile(_0x35c577['appCode'],_0x5a47d2[_0x29f260(0xd5)]);if(!_0x147d45[_0x29f260(0xca)])throw CliErrors[_0x29f260(0xbb)](_0x29f260(0xd3));const _0x5c1558=await queryRuntimeFileUrl(_0x147d45[_0x29f260(0xca)],{'download':![]});if(!_0x5c1558[_0x29f260(0xa8)])throw CliErrors[_0x29f260(0xbb)](_0x29f260(0xb4));const _0x245880=await recognizeRuntimeOcr(_0x35c577['appCode'],{'url':_0x5c1558[_0x29f260(0xa8)],'type':_0x47cbeb});return{'ok':!![],'data':withScene(_0x245880,_0x5b3598,_0x147d45)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x73eb89=a34_0x2a34;(function(_0x146c84,_0x2b95fc){const _0x34c66d=a34_0x2a34,_0x7ce8e5=_0x146c84();while(!![]){try{const _0x27e9f4=-parseInt(_0x34c66d(0x195))/0x1*(-parseInt(_0x34c66d(0x19c))/0x2)+-parseInt(_0x34c66d(0x198))/0x3*(-parseInt(_0x34c66d(0x188))/0x4)+-parseInt(_0x34c66d(0x196))/0x5+-parseInt(_0x34c66d(0x18e))/0x6+-parseInt(_0x34c66d(0x19d))/0x7+-parseInt(_0x34c66d(0x184))/0x8*(-parseInt(_0x34c66d(0x186))/0x9)+-parseInt(_0x34c66d(0x194))/0xa*(-parseInt(_0x34c66d(0x18b))/0xb);if(_0x27e9f4===_0x2b95fc)break;else _0x7ce8e5['push'](_0x7ce8e5['shift']());}catch(_0x4ce5b6){_0x7ce8e5['push'](_0x7ce8e5['shift']());}}}(a34_0x1615,0x292d6));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';function a34_0x1615(){const _0x4c7d91=['general','filter','image-url','recognize','ocr','description','idCard','trim','form','appCode','/client/uploadFile','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','idcard','Invoice','120168jYEzfN','/client/queryFileUrl','117mZvgOb','scene','4sGpFwV','join','Unsupported\x20OCR\x20scene:\x20','50314NMaDqM','validation','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','1331940YoObDj','POST','build','count','toLowerCase','string','290OYAxAe','1749FSKJhf','1613445QfWuNl','str','912333Mfibiy','filePath','imageFile','/client/ocr','202Xnyszp','667366XkUFxX','IdCard','Publicly\x20accessible\x20image\x20or\x20file\x20URL','imageUrl','fileUrl','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','apiError','invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','body','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','image-file','path','\x20OCR'];a34_0x1615=function(){return _0x4c7d91;};return a34_0x1615();}import{CliErrors}from'../../errors.js';function a34_0x2a34(_0x5293d2,_0x7af1ef){_0x5293d2=_0x5293d2-0x180;const _0x16153f=a34_0x1615();let _0x2a34aa=_0x16153f[_0x5293d2];return _0x2a34aa;}import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x73eb89(0x1a4),a34_0x73eb89(0x1ab),a34_0x73eb89(0x1b3),a34_0x73eb89(0x1b1)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x73eb89(0x183),'general':'General','form':'Table','idCard':a34_0x73eb89(0x19e)},SCENE_FLAG={'name':a34_0x73eb89(0x187),'type':a34_0x73eb89(0x193),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x73eb89(0x1a5)},IMAGE_FILE_FLAG={'name':a34_0x73eb89(0x1a8),'type':a34_0x73eb89(0x193),'description':a34_0x73eb89(0x1a2)},IMAGE_URL_FLAG={'name':a34_0x73eb89(0x1ad),'type':a34_0x73eb89(0x193),'description':a34_0x73eb89(0x19f)};function normalizeScene(_0x3f4e98){const _0x5eb89a=a34_0x73eb89,_0x46a274=_0x3f4e98[_0x5eb89a(0x1b2)]()[_0x5eb89a(0x192)]();if(_0x46a274===_0x5eb89a(0x182))return _0x5eb89a(0x1b1);if(_0x46a274==='invoice'||_0x46a274==='general'||_0x46a274===_0x5eb89a(0x1b3))return _0x46a274;throw CliErrors['validation'](_0x5eb89a(0x18a)+_0x3f4e98+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x5eb89a(0x189)](',\x20'));}function selectedInputs(_0x248b5d){const _0x43a956=a34_0x73eb89,_0x5bc068=_0x248b5d[_0x43a956(0x197)]('image-file')[_0x43a956(0x1b2)](),_0x3173a2=_0x248b5d[_0x43a956(0x197)](_0x43a956(0x1ad))['trim']();return{'imageFile':_0x5bc068,'imageUrl':_0x3173a2,'count':[_0x5bc068,_0x3173a2][_0x43a956(0x1ac)](Boolean)['length']};}function validateInputSelection(_0x2fb122){const _0x4d1ad7=a34_0x73eb89,_0x1309c9=selectedInputs(_0x2fb122);if(_0x1309c9[_0x4d1ad7(0x191)]!==0x1)throw CliErrors[_0x4d1ad7(0x18c)](_0x4d1ad7(0x1a7));return _0x1309c9;}function withScene(_0x5b1e1e,_0x51bd4f,_0x1a5b6a){const _0x5d2a98=a34_0x73eb89;return{..._0x5b1e1e,'scene':_0x51bd4f,..._0x1a5b6a?{'sourceFile':{'fileName':_0x1a5b6a['fileName'],'filePath':_0x1a5b6a[_0x5d2a98(0x199)]}}:{}};}const ocrRecognize={'service':a34_0x73eb89(0x1af),'command':a34_0x73eb89(0x1ae),'description':a34_0x73eb89(0x181),'risk':'write','flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x32803d){const _0x4eb0bc=a34_0x73eb89,_0x5101eb=normalizeScene(_0x32803d[_0x4eb0bc(0x197)]('scene')),_0x5c1fd5=SCENE_TO_LEGACY_TYPE[_0x5101eb],_0x47a50c=validateInputSelection(_0x32803d);if(_0x47a50c[_0x4eb0bc(0x1a0)])return dryRun('POST',_0x4eb0bc(0x19b))['body']({'appCode':_0x32803d['appCode'],'url':_0x47a50c[_0x4eb0bc(0x1a0)],'type':_0x5c1fd5})[_0x4eb0bc(0x1b0)]('Preview:\x20recognize\x20'+_0x5101eb+'\x20OCR\x20from\x20URL')[_0x4eb0bc(0x190)]();const _0x3999b4=requireRuntimeUploadFile(_0x47a50c[_0x4eb0bc(0x19a)],_0x4eb0bc(0x1a8));return dryRun(_0x4eb0bc(0x18f),_0x4eb0bc(0x1b5))[_0x4eb0bc(0x1a6)]({'steps':[{'method':'POST','url':_0x4eb0bc(0x1b5),'body':{'appCode':_0x32803d[_0x4eb0bc(0x1b4)],'multipart':{'file':_0x3999b4}}},{'method':_0x4eb0bc(0x18f),'url':_0x4eb0bc(0x185),'body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':_0x4eb0bc(0x18f),'url':'/client/ocr','body':{'appCode':_0x32803d[_0x4eb0bc(0x1b4)],'url':_0x4eb0bc(0x18d),'type':_0x5c1fd5}}]})[_0x4eb0bc(0x1b0)](_0x4eb0bc(0x180)+_0x5101eb+_0x4eb0bc(0x1aa))[_0x4eb0bc(0x190)]();},async 'execute'(_0x6d9d64){const _0x1c3eda=a34_0x73eb89,_0x44c35a=normalizeScene(_0x6d9d64['str']('scene')),_0x187342=SCENE_TO_LEGACY_TYPE[_0x44c35a],_0x4befb1=validateInputSelection(_0x6d9d64);if(_0x4befb1[_0x1c3eda(0x1a0)]){const _0x25f9e0=await recognizeRuntimeOcr(_0x6d9d64[_0x1c3eda(0x1b4)],{'url':_0x4befb1[_0x1c3eda(0x1a0)],'type':_0x187342});return{'ok':!![],'data':withScene(_0x25f9e0,_0x44c35a)};}const _0x4580b7=requireRuntimeUploadFile(_0x4befb1[_0x1c3eda(0x19a)],_0x1c3eda(0x1a8)),_0x29f28c=await uploadRuntimeFile(_0x6d9d64[_0x1c3eda(0x1b4)],_0x4580b7[_0x1c3eda(0x1a9)]);if(!_0x29f28c['filePath'])throw CliErrors['apiError']('File\x20upload\x20response\x20missing\x20filePath.');const _0x2e1109=await queryRuntimeFileUrl(_0x29f28c[_0x1c3eda(0x199)],{'download':![]});if(!_0x2e1109['fileUrl'])throw CliErrors[_0x1c3eda(0x1a3)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x1ad1c3=await recognizeRuntimeOcr(_0x6d9d64['appCode'],{'url':_0x2e1109[_0x1c3eda(0x1a1)],'type':_0x187342});return{'ok':!![],'data':withScene(_0x1ad1c3,_0x44c35a,_0x29f28c)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- function a35_0x4959(_0x24dcb2,_0x35beda){_0x24dcb2=_0x24dcb2-0x91;const _0x4c57ae=a35_0x4c57();let _0x495956=_0x4c57ae[_0x24dcb2];return _0x495956;}const a35_0x20f073=a35_0x4959;(function(_0x47fd75,_0x5b45e9){const _0x3308f0=a35_0x4959,_0x1ac475=_0x47fd75();while(!![]){try{const _0x5bceea=-parseInt(_0x3308f0(0xbc))/0x1+-parseInt(_0x3308f0(0xb5))/0x2*(parseInt(_0x3308f0(0xa5))/0x3)+parseInt(_0x3308f0(0xcb))/0x4+-parseInt(_0x3308f0(0x96))/0x5*(-parseInt(_0x3308f0(0x9b))/0x6)+parseInt(_0x3308f0(0xb1))/0x7+parseInt(_0x3308f0(0x92))/0x8+-parseInt(_0x3308f0(0x97))/0x9*(parseInt(_0x3308f0(0xb6))/0xa);if(_0x5bceea===_0x5b45e9)break;else _0x1ac475['push'](_0x1ac475['shift']());}catch(_0x3b5f52){_0x1ac475['push'](_0x1ac475['shift']());}}}(a35_0x4c57,0x26cc7));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':'file','type':'string','description':a35_0x20f073(0xc9)},FUNCTION_NAME_FLAG={'name':a35_0x20f073(0xb3),'type':a35_0x20f073(0xce),'required':!![],'description':a35_0x20f073(0x99)},DESCRIPTION_FLAG={'name':a35_0x20f073(0xb0),'type':a35_0x20f073(0xce),'description':'Personal\x20BFF\x20description'},SOURCE_SESSION_FLAG={'name':a35_0x20f073(0x9c),'type':'string','description':a35_0x20f073(0x91)};function normalizeFunctionName(_0x19767f){const _0x31a784=a35_0x20f073,_0x5614c6=String(_0x19767f||'')['trim']();if(!_0x5614c6||!FUNCTION_NAME_PATTERN[_0x31a784(0x9f)](_0x5614c6))throw CliErrors['validation'](_0x31a784(0xc5));return _0x5614c6;}function readScriptFile(_0x80b7c7){const _0x2fc8b1=a35_0x20f073;if(!_0x80b7c7)throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0x9e));if(!existsSync(_0x80b7c7))throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0xca)+_0x80b7c7);if(!statSync(_0x80b7c7)['isFile']())throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0xc7)+_0x80b7c7);const _0x116753=readFileSync(_0x80b7c7,_0x2fc8b1(0xa0));if(!_0x116753['trim']())throw CliErrors[_0x2fc8b1(0xa6)](_0x2fc8b1(0xc8));return _0x116753;}function optionalTrimmed(_0x2f2b74){const _0x10360a=String(_0x2f2b74||'')['trim']();return _0x10360a||undefined;}function summarizeBff(_0x37924e){const _0x513497=a35_0x20f073;return{'id':_0x37924e['id'],'appCode':_0x37924e['appCode'],'functionName':_0x37924e[_0x513497(0xaf)],'description':_0x37924e[_0x513497(0xb0)],'scriptType':_0x37924e['scriptType'],'version':_0x37924e['version'],'gmtModified':_0x37924e[_0x513497(0xa9)],'updateTime':_0x37924e[_0x513497(0xd3)]};}function detailBff(_0x492f43){const _0x1d91aa=a35_0x20f073;return{'id':_0x492f43['id'],'appCode':_0x492f43[_0x1d91aa(0xb4)],'functionName':_0x492f43[_0x1d91aa(0xaf)],'description':_0x492f43[_0x1d91aa(0xb0)],'scriptType':_0x492f43[_0x1d91aa(0xa1)],'scriptContent':_0x492f43[_0x1d91aa(0xad)]??'','config':_0x492f43[_0x1d91aa(0x98)],'version':_0x492f43[_0x1d91aa(0xab)],'createUserId':_0x492f43[_0x1d91aa(0xb8)],'gmtCreate':_0x492f43[_0x1d91aa(0xbf)],'gmtModified':_0x492f43[_0x1d91aa(0xa9)],'createTime':_0x492f43[_0x1d91aa(0x9a)],'updateTime':_0x492f43[_0x1d91aa(0xd3)]};}function buildCreateInput(_0x2ad4bc){const _0x36c4ef=a35_0x20f073;return{'functionName':normalizeFunctionName(_0x2ad4bc[_0x36c4ef(0xa2)](_0x36c4ef(0xb3))),...optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)]('description'))?{'description':optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)](_0x36c4ef(0xb0)))}:{},'scriptContent':readScriptFile(_0x2ad4bc['str'](_0x36c4ef(0xb9))),...optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x2ad4bc[_0x36c4ef(0xa2)](_0x36c4ef(0x9c)))}:{}};}function buildUpdateInput(_0x3a3fca){const _0x2df8e2=a35_0x20f073,_0x28566f={};optionalTrimmed(_0x3a3fca['str']('name'))&&(_0x28566f['functionName']=normalizeFunctionName(_0x3a3fca[_0x2df8e2(0xa2)](_0x2df8e2(0xb3))));_0x3a3fca['flag']('description')!==undefined&&(_0x28566f['description']=_0x3a3fca[_0x2df8e2(0xa2)]('description'));optionalTrimmed(_0x3a3fca['str'](_0x2df8e2(0xb9)))&&(_0x28566f[_0x2df8e2(0xad)]=readScriptFile(_0x3a3fca[_0x2df8e2(0xa2)](_0x2df8e2(0xb9))));_0x3a3fca[_0x2df8e2(0x95)](_0x2df8e2(0x9c))!==undefined&&(_0x28566f['sourceSessionId']=_0x3a3fca[_0x2df8e2(0xa2)](_0x2df8e2(0x9c)));if(Object[_0x2df8e2(0xac)](_0x28566f)['length']===0x0)throw CliErrors[_0x2df8e2(0xa6)](_0x2df8e2(0xbd));return _0x28566f;}function a35_0x4c57(){const _0x311d10=['133929LgTBQz','config','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','createTime','10362dycFXY','source-session-id','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','File\x20path\x20is\x20required.','test','utf8','scriptType','str','read','params','655833xCSiAM','validation','/update','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','gmtModified','body','version','keys','scriptContent','POST','functionName','description','2201059JzOvOS','Executed\x20personal\x20BFF\x20','name','appCode','2rIuxvA','20aOyhFD','write','createUserId','file','build','list','64717wgZPeH','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','isArray','gmtCreate','Show\x20one\x20personal\x20BFF\x20by\x20id','map','/client/runtime-bff/personal/create','num','length','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','Preview:\x20create\x20personal\x20BFF\x20','File\x20is\x20not\x20a\x20regular\x20file:\x20','Personal\x20BFF\x20script\x20file\x20is\x20blank.','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','File\x20not\x20found:\x20','433584NHVqvE','create','bool','string','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','Preview:\x20update\x20personal\x20BFF\x20','exec','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','updateTime','Optional\x20source\x20RuntimeAgent\x20session\x20id','255248GtcyyU','personal-bff','Personal\x20BFF\x20script\x20ID','flag','50CsNvXI'];a35_0x4c57=function(){return _0x311d10;};return a35_0x4c57();}function parseExecParams(_0x21e873){const _0x1e09b2=a35_0x20f073,_0xcd25d7=parseJsonParams(_0x21e873)??{};if(Array[_0x1e09b2(0xbe)](_0xcd25d7))throw CliErrors[_0x1e09b2(0xa6)]('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0xcd25d7;}const personalBffList={'service':a35_0x20f073(0x93),'command':a35_0x20f073(0xbb),'description':a35_0x20f073(0xd2),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x54211d){const _0x541145=a35_0x20f073,_0x2a221f=await listPersonalBffs(_0x54211d[_0x541145(0xb4)]);return{'ok':!![],'data':{'total':_0x2a221f[_0x541145(0xc4)],'items':_0x54211d[_0x541145(0xcd)]('verbose')?_0x2a221f:_0x2a221f[_0x541145(0xc1)](summarizeBff)}};}},personalBffDetail={'service':a35_0x20f073(0x93),'command':'detail','description':a35_0x20f073(0xc0),'risk':a35_0x20f073(0xa3),'flags':[{...ID_FLAG,'description':a35_0x20f073(0x94)}],async 'execute'(_0x5db8cb){const _0x371e81=a35_0x20f073,_0x5c716e=await getPersonalBff(_0x5db8cb[_0x371e81(0xc3)]('id'),_0x5db8cb[_0x371e81(0xb4)]);return{'ok':!![],'data':detailBff(_0x5c716e)};}},personalBffCreate={'service':a35_0x20f073(0x93),'command':a35_0x20f073(0xcc),'description':a35_0x20f073(0xcf),'risk':a35_0x20f073(0xb7),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x5ea992){const _0x155e15=a35_0x20f073,_0x261ef3=buildCreateInput(_0x5ea992),_0x50fca5=await createPersonalBff(_0x5ea992[_0x155e15(0xb4)],_0x261ef3);return{'ok':!![],'data':detailBff(_0x50fca5),'message':'Created\x20personal\x20BFF\x20'+_0x50fca5['id']+(_0x50fca5[_0x155e15(0xaf)]?'\x20('+_0x50fca5[_0x155e15(0xaf)]+')':'')};},async 'dryRun'(_0x1d11aa){const _0x1c2528=a35_0x20f073,_0x4781ef=buildCreateInput(_0x1d11aa);return dryRun(_0x1c2528(0xae),_0x1c2528(0xc2))[_0x1c2528(0xaa)]({'appCode':_0x1d11aa[_0x1c2528(0xb4)],..._0x4781ef})[_0x1c2528(0xb0)](_0x1c2528(0xc6)+_0x4781ef['functionName'])[_0x1c2528(0xba)]();}},personalBffUpdate={'service':'personal-bff','command':'update','description':'Update\x20a\x20personal\x20BFF\x20by\x20id','risk':a35_0x20f073(0xb7),'flags':[{...ID_FLAG,'description':a35_0x20f073(0x94)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x13ad35){const _0x1ed015=a35_0x20f073,_0x3b9ecc=_0x13ad35[_0x1ed015(0xc3)]('id'),_0x4e4fd3=buildUpdateInput(_0x13ad35),_0x5cc05a=await updatePersonalBff(_0x3b9ecc,_0x13ad35[_0x1ed015(0xb4)],_0x4e4fd3);return{'ok':!![],'data':detailBff(_0x5cc05a),'message':'Updated\x20personal\x20BFF\x20'+_0x5cc05a['id']+(_0x5cc05a[_0x1ed015(0xaf)]?'\x20('+_0x5cc05a[_0x1ed015(0xaf)]+')':'')};},async 'dryRun'(_0x357993){const _0x5a48a1=a35_0x20f073,_0x4ea87b=_0x357993['num']('id'),_0x3d2060=buildUpdateInput(_0x357993);return dryRun(_0x5a48a1(0xae),'/client/runtime-bff/personal/'+_0x4ea87b+_0x5a48a1(0xa7))['body']({'appCode':_0x357993['appCode'],..._0x3d2060})[_0x5a48a1(0xb0)](_0x5a48a1(0xd0)+_0x4ea87b)[_0x5a48a1(0xba)]();}},personalBffExec={'service':'personal-bff','command':a35_0x20f073(0xd1),'description':a35_0x20f073(0x9d),'risk':'high-risk-write','flags':[{...ID_FLAG,'description':a35_0x20f073(0x94)},{...PARAMS_FLAG,'description':a35_0x20f073(0xa8)}],async 'validate'(_0x256eca){const _0x194e9c=a35_0x20f073;parseExecParams(_0x256eca[_0x194e9c(0xa2)]('params'));},async 'execute'(_0x301ab9){const _0x4d267d=a35_0x20f073,_0x77fc7c=_0x301ab9[_0x4d267d(0xc3)]('id'),_0x50ece9=parseExecParams(_0x301ab9[_0x4d267d(0xa2)](_0x4d267d(0xa4))),_0x2654b1=await executePersonalBff(_0x77fc7c,_0x301ab9['appCode'],_0x50ece9);return{'ok':!![],'data':{'result':_0x2654b1},'message':_0x4d267d(0xb2)+_0x77fc7c};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x414e2a=a35_0x4240;(function(_0x1770e2,_0x158a60){const _0x13f316=a35_0x4240,_0x4ef074=_0x1770e2();while(!![]){try{const _0x55e370=-parseInt(_0x13f316(0xb1))/0x1+parseInt(_0x13f316(0xaa))/0x2+parseInt(_0x13f316(0xb3))/0x3+parseInt(_0x13f316(0x95))/0x4+-parseInt(_0x13f316(0xbb))/0x5+-parseInt(_0x13f316(0xc3))/0x6+parseInt(_0x13f316(0xcf))/0x7;if(_0x55e370===_0x158a60)break;else _0x4ef074['push'](_0x4ef074['shift']());}catch(_0xfe866){_0x4ef074['push'](_0x4ef074['shift']());}}}(a35_0x1b69,0x52625));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x414e2a(0xb8),'type':a35_0x414e2a(0xbc),'description':a35_0x414e2a(0xb9)},FUNCTION_NAME_FLAG={'name':a35_0x414e2a(0xa7),'type':a35_0x414e2a(0xbc),'required':!![],'description':a35_0x414e2a(0x97)},DESCRIPTION_FLAG={'name':a35_0x414e2a(0xcc),'type':a35_0x414e2a(0xbc),'description':a35_0x414e2a(0x9c)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x414e2a(0xbc),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x302d6d){const _0x9b99d2=a35_0x414e2a,_0x29e717=String(_0x302d6d||'')[_0x9b99d2(0xc9)]();if(!_0x29e717||!FUNCTION_NAME_PATTERN[_0x9b99d2(0xba)](_0x29e717))throw CliErrors[_0x9b99d2(0xb6)](_0x9b99d2(0xa1));return _0x29e717;}function readScriptFile(_0xaa4111){const _0x556421=a35_0x414e2a;if(!_0xaa4111)throw CliErrors[_0x556421(0xb6)]('File\x20path\x20is\x20required.');if(!existsSync(_0xaa4111))throw CliErrors['validation'](_0x556421(0xa6)+_0xaa4111);if(!statSync(_0xaa4111)['isFile']())throw CliErrors[_0x556421(0xb6)](_0x556421(0xc0)+_0xaa4111);const _0x1235e9=readFileSync(_0xaa4111,_0x556421(0xc7));if(!_0x1235e9[_0x556421(0xc9)]())throw CliErrors[_0x556421(0xb6)](_0x556421(0xac));return _0x1235e9;}function optionalTrimmed(_0x2d8156){const _0xc3ebac=String(_0x2d8156||'')['trim']();return _0xc3ebac||undefined;}function summarizeBff(_0x10304c){const _0xf1145a=a35_0x414e2a;return{'id':_0x10304c['id'],'appCode':_0x10304c[_0xf1145a(0xbf)],'functionName':_0x10304c[_0xf1145a(0xcd)],'description':_0x10304c['description'],'scriptType':_0x10304c[_0xf1145a(0x9b)],'version':_0x10304c[_0xf1145a(0xad)],'gmtModified':_0x10304c[_0xf1145a(0xb0)],'updateTime':_0x10304c[_0xf1145a(0x90)]};}function detailBff(_0x51e603){const _0x48577b=a35_0x414e2a;return{'id':_0x51e603['id'],'appCode':_0x51e603[_0x48577b(0xbf)],'functionName':_0x51e603[_0x48577b(0xcd)],'description':_0x51e603[_0x48577b(0xcc)],'scriptType':_0x51e603[_0x48577b(0x9b)],'scriptContent':_0x51e603[_0x48577b(0xaf)]??'','config':_0x51e603[_0x48577b(0xa9)],'version':_0x51e603[_0x48577b(0xad)],'createUserId':_0x51e603[_0x48577b(0xca)],'gmtCreate':_0x51e603['gmtCreate'],'gmtModified':_0x51e603['gmtModified'],'createTime':_0x51e603[_0x48577b(0xc2)],'updateTime':_0x51e603[_0x48577b(0x90)]};}function buildCreateInput(_0x4df539){const _0x1fdad8=a35_0x414e2a;return{'functionName':normalizeFunctionName(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xa7))),...optionalTrimmed(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xcc)))?{'description':optionalTrimmed(_0x4df539['str'](_0x1fdad8(0xcc)))}:{},'scriptContent':readScriptFile(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xb8))),...optionalTrimmed(_0x4df539[_0x1fdad8(0xa2)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0x4df539[_0x1fdad8(0xa2)](_0x1fdad8(0xce)))}:{}};}function a35_0x4240(_0x56d322,_0x1c4454){_0x56d322=_0x56d322-0x8d;const _0x1b6950=a35_0x1b69();let _0x4240af=_0x1b6950[_0x56d322];return _0x4240af;}function a35_0x1b69(){const _0x132a54=['6264692YJpluR','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','params','Executed\x20personal\x20BFF\x20','updateTime','exec','read','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','Preview:\x20update\x20personal\x20BFF\x20','106748LAGlDr','list','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','Preview:\x20create\x20personal\x20BFF\x20','/update','Update\x20a\x20personal\x20BFF\x20by\x20id','scriptType','Personal\x20BFF\x20description','isArray','update','build','high-risk-write','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','str','length','/client/runtime-bff/personal/','body','File\x20not\x20found:\x20','name','Personal\x20BFF\x20script\x20ID','config','948870aXSgpx','/client/runtime-bff/personal/create','Personal\x20BFF\x20script\x20file\x20is\x20blank.','version','Show\x20one\x20personal\x20BFF\x20by\x20id','scriptContent','gmtModified','120159Tnruue','create','809067imwbSa','detail','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','validation','verbose','file','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','test','3254100yBVMrV','string','write','flag','appCode','File\x20is\x20not\x20a\x20regular\x20file:\x20','num','createTime','3344058gAWvOY','POST','bool','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','utf8','personal-bff','trim','createUserId','keys','description','functionName','source-session-id'];a35_0x1b69=function(){return _0x132a54;};return a35_0x1b69();}function buildUpdateInput(_0x14be9a){const _0x3d9610=a35_0x414e2a,_0x51676c={};optionalTrimmed(_0x14be9a[_0x3d9610(0xa2)]('name'))&&(_0x51676c['functionName']=normalizeFunctionName(_0x14be9a['str'](_0x3d9610(0xa7))));_0x14be9a[_0x3d9610(0xbe)](_0x3d9610(0xcc))!==undefined&&(_0x51676c[_0x3d9610(0xcc)]=_0x14be9a[_0x3d9610(0xa2)](_0x3d9610(0xcc)));optionalTrimmed(_0x14be9a[_0x3d9610(0xa2)](_0x3d9610(0xb8)))&&(_0x51676c[_0x3d9610(0xaf)]=readScriptFile(_0x14be9a[_0x3d9610(0xa2)]('file')));_0x14be9a['flag'](_0x3d9610(0xce))!==undefined&&(_0x51676c['sourceSessionId']=_0x14be9a[_0x3d9610(0xa2)](_0x3d9610(0xce)));if(Object[_0x3d9610(0xcb)](_0x51676c)['length']===0x0)throw CliErrors[_0x3d9610(0xb6)](_0x3d9610(0xb5));return _0x51676c;}function parseExecParams(_0x1b5119){const _0x34891f=a35_0x414e2a,_0x497eff=parseJsonParams(_0x1b5119)??{};if(Array[_0x34891f(0x9d)](_0x497eff))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object.');return _0x497eff;}const personalBffList={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0x96),'description':a35_0x414e2a(0x93),'risk':a35_0x414e2a(0x92),'flags':[VERBOSE_FLAG],async 'execute'(_0x53ef21){const _0x5b61fe=a35_0x414e2a,_0x3d9d58=await listPersonalBffs(_0x53ef21['appCode']);return{'ok':!![],'data':{'total':_0x3d9d58[_0x5b61fe(0xa3)],'items':_0x53ef21[_0x5b61fe(0xc5)](_0x5b61fe(0xb7))?_0x3d9d58:_0x3d9d58['map'](summarizeBff)}};}},personalBffDetail={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0xb4),'description':a35_0x414e2a(0xae),'risk':a35_0x414e2a(0x92),'flags':[{...ID_FLAG,'description':a35_0x414e2a(0xa8)}],async 'execute'(_0x35ffce){const _0x37deed=a35_0x414e2a,_0x3b775b=await getPersonalBff(_0x35ffce[_0x37deed(0xc1)]('id'),_0x35ffce['appCode']);return{'ok':!![],'data':detailBff(_0x3b775b)};}},personalBffCreate={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0xb2),'description':a35_0x414e2a(0xc6),'risk':'write','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x564388){const _0x418aae=a35_0x414e2a,_0x232074=buildCreateInput(_0x564388),_0x49559f=await createPersonalBff(_0x564388[_0x418aae(0xbf)],_0x232074);return{'ok':!![],'data':detailBff(_0x49559f),'message':'Created\x20personal\x20BFF\x20'+_0x49559f['id']+(_0x49559f[_0x418aae(0xcd)]?'\x20('+_0x49559f[_0x418aae(0xcd)]+')':'')};},async 'dryRun'(_0x2a44ea){const _0x5ca4fd=a35_0x414e2a,_0x13dfd7=buildCreateInput(_0x2a44ea);return dryRun(_0x5ca4fd(0xc4),_0x5ca4fd(0xab))[_0x5ca4fd(0xa5)]({'appCode':_0x2a44ea['appCode'],..._0x13dfd7})[_0x5ca4fd(0xcc)](_0x5ca4fd(0x98)+_0x13dfd7[_0x5ca4fd(0xcd)])['build']();}},personalBffUpdate={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0x9e),'description':a35_0x414e2a(0x9a),'risk':a35_0x414e2a(0xbd),'flags':[{...ID_FLAG,'description':a35_0x414e2a(0xa8)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x1fb1f1){const _0xf39728=a35_0x414e2a,_0x44ce65=_0x1fb1f1[_0xf39728(0xc1)]('id'),_0x2877a1=buildUpdateInput(_0x1fb1f1),_0x3c8ace=await updatePersonalBff(_0x44ce65,_0x1fb1f1[_0xf39728(0xbf)],_0x2877a1);return{'ok':!![],'data':detailBff(_0x3c8ace),'message':'Updated\x20personal\x20BFF\x20'+_0x3c8ace['id']+(_0x3c8ace[_0xf39728(0xcd)]?'\x20('+_0x3c8ace[_0xf39728(0xcd)]+')':'')};},async 'dryRun'(_0x45af72){const _0x16c80b=a35_0x414e2a,_0x2dbbf9=_0x45af72[_0x16c80b(0xc1)]('id'),_0x4a3fb5=buildUpdateInput(_0x45af72);return dryRun(_0x16c80b(0xc4),_0x16c80b(0xa4)+_0x2dbbf9+_0x16c80b(0x99))[_0x16c80b(0xa5)]({'appCode':_0x45af72[_0x16c80b(0xbf)],..._0x4a3fb5})[_0x16c80b(0xcc)](_0x16c80b(0x94)+_0x2dbbf9)[_0x16c80b(0x9f)]();}},personalBffExec={'service':a35_0x414e2a(0xc8),'command':a35_0x414e2a(0x91),'description':'Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','risk':a35_0x414e2a(0xa0),'flags':[{...ID_FLAG,'description':a35_0x414e2a(0xa8)},{...PARAMS_FLAG,'description':a35_0x414e2a(0x8d)}],async 'validate'(_0x4c95f6){const _0x3038bc=a35_0x414e2a;parseExecParams(_0x4c95f6['str'](_0x3038bc(0x8e)));},async 'execute'(_0x195a37){const _0x116ba9=a35_0x414e2a,_0x387d91=_0x195a37[_0x116ba9(0xc1)]('id'),_0x32e362=parseExecParams(_0x195a37['str'](_0x116ba9(0x8e))),_0x329cd3=await executePersonalBff(_0x387d91,_0x195a37[_0x116ba9(0xbf)],_0x32e362);return{'ok':!![],'data':{'result':_0x329cd3},'message':_0x116ba9(0x8f)+_0x387d91};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x33f59f=a36_0x1dad;(function(_0x1be17e,_0x37b893){const _0x1fb630=a36_0x1dad,_0x13377f=_0x1be17e();while(!![]){try{const _0x59a23a=parseInt(_0x1fb630(0x10f))/0x1+parseInt(_0x1fb630(0x105))/0x2+parseInt(_0x1fb630(0x121))/0x3*(-parseInt(_0x1fb630(0x128))/0x4)+parseInt(_0x1fb630(0x123))/0x5*(-parseInt(_0x1fb630(0x11b))/0x6)+parseInt(_0x1fb630(0x112))/0x7+-parseInt(_0x1fb630(0x11e))/0x8+-parseInt(_0x1fb630(0xfe))/0x9*(-parseInt(_0x1fb630(0x11f))/0xa);if(_0x59a23a===_0x37b893)break;else _0x13377f['push'](_0x13377f['shift']());}catch(_0x2836ec){_0x13377f['push'](_0x13377f['shift']());}}}(a36_0x1b42,0x567aa));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';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(_0x3f97d1){const _0x1edc28=a36_0x1dad;for(const _0x106349 of _0x3f97d1){definitions['set'](_0x106349[_0x1edc28(0x118)]+':'+_0x106349[_0x1edc28(0x124)],_0x106349);let _0x4c5e7b=serviceGroups['get'](_0x106349[_0x1edc28(0x118)]);!_0x4c5e7b&&(_0x4c5e7b=[],serviceGroups['set'](_0x106349[_0x1edc28(0x118)],_0x4c5e7b)),_0x4c5e7b['push'](_0x106349);}}function a36_0x1b42(){const _0x3403e4=['push','BFF\x20Scripts','File','list','API\x20Documentation','get','498970BPhpiF','Workspace','has','2417681iGpmLo','description','set','\x20\x20[high-risk-write]','Instant\x20API','show','service','Datasets','map','10572ljLkvR','read','risk','895768tdJDpt','57130gCySXL','Runtime\x20App\x20Config','9wtZkEd','install','1860dYAmaV','command','Service\x20Tree','write','isSingleCommand','675764TSIfsE','Agent\x20Schedules','288gmcXvD','Artifacts','SQL\x20Queries','Logs','from','defaultCommand','App\x20Management','1202614mOWkri','Personal\x20BFF','Schema','login'];a36_0x1b42=function(){return _0x3403e4;};return a36_0x1b42();}function registerService(_0x2aec66,_0x2ea6a9,_0xebb504){const _0x176101=a36_0x1dad;registerDefinitions(_0x2ea6a9);const _0x77c40c=_0x4b8b01=>_0x4b8b01===_0x176101(0x11c)?'':_0x4b8b01===_0x176101(0x126)?'\x20\x20[write]':_0x176101(0x115),_0x5e3212={'service':_0x2ea6a9[0x0][_0x176101(0x118)],'label':_0x2aec66,'commands':_0x2ea6a9[_0x176101(0x11a)](_0x535ca6=>({'command':_0x535ca6['command'],'description':_0x535ca6[_0x176101(0x113)],'tag':_0x77c40c(_0x535ca6[_0x176101(0x11d)])})),'defaultCommand':_0xebb504?.[_0x176101(0x103)]??(_0xebb504?.[_0x176101(0x127)]?_0x2ea6a9[0x0]['command']:undefined),'isSingleCommand':_0xebb504?.[_0x176101(0x127)]};serviceRegistry[_0x176101(0x109)](_0x5e3212),serviceByName[_0x176101(0x114)](_0x5e3212[_0x176101(0x118)],_0x5e3212);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x33f59f(0x108)}),registerService(a36_0x33f59f(0x104),appDefinitions,{'defaultCommand':a36_0x33f59f(0x10c)}),registerService(a36_0x33f59f(0x110),workspaceDefinitions),registerService(a36_0x33f59f(0x120),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x33f59f(0x10c)}),registerService(a36_0x33f59f(0x10d),apiDocDefinitions),registerService(a36_0x33f59f(0x119),datasetDefinitions),registerService(a36_0x33f59f(0x116),dataDefinitions),registerService(a36_0x33f59f(0x100),sqlDefinitions),registerService(a36_0x33f59f(0x10a),bffDefinitions),registerService(a36_0x33f59f(0x106),personalBffDefinitions),registerService(a36_0x33f59f(0xff),artifactDefinitions),registerService(a36_0x33f59f(0x10b),fileDefinitions),registerService('OCR',ocrDefinitions),registerService('Knowledge\x20Base',kbDefinitions),registerService(a36_0x33f59f(0x129),scheduleDefinitions,{'defaultCommand':a36_0x33f59f(0x10c)}),registerService(a36_0x33f59f(0x125),serviceDefinitions,{'defaultCommand':'list'}),registerService('Skills',skillDefinitions,{'defaultCommand':a36_0x33f59f(0x122)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a36_0x33f59f(0x122)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x33f59f(0x107),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x33f59f(0x101),logsDefinitions,{'defaultCommand':a36_0x33f59f(0x117)});export function findDefinition(_0xe3cb5b,_0x48d01a){return definitions['get'](_0xe3cb5b+':'+_0x48d01a);}export function isKnownService(_0x17e9a7){const _0x10581e=a36_0x33f59f;return serviceByName[_0x10581e(0x111)](_0x17e9a7);}export function getServiceEntry(_0x1433d2){const _0x176ebc=a36_0x33f59f;return serviceByName[_0x176ebc(0x10e)](_0x1433d2);}function a36_0x1dad(_0x3a69b8,_0x42ab7c){_0x3a69b8=_0x3a69b8-0xfe;const _0x1b4235=a36_0x1b42();let _0x1dad75=_0x1b4235[_0x3a69b8];return _0x1dad75;}export function getAllDefinitions(){const _0x1f0c45=a36_0x33f59f;return Array[_0x1f0c45(0x102)](definitions['values']());}
1
+ const a36_0x9ad159=a36_0x25dc;(function(_0x9a1ee4,_0x1710a3){const _0x1b2eb8=a36_0x25dc,_0x81fcf1=_0x9a1ee4();while(!![]){try{const _0x59250f=-parseInt(_0x1b2eb8(0x1ec))/0x1*(parseInt(_0x1b2eb8(0x1ff))/0x2)+parseInt(_0x1b2eb8(0x1f7))/0x3*(parseInt(_0x1b2eb8(0x201))/0x4)+-parseInt(_0x1b2eb8(0x217))/0x5*(parseInt(_0x1b2eb8(0x1fb))/0x6)+-parseInt(_0x1b2eb8(0x1f2))/0x7+-parseInt(_0x1b2eb8(0x20a))/0x8*(-parseInt(_0x1b2eb8(0x208))/0x9)+parseInt(_0x1b2eb8(0x1fa))/0xa+parseInt(_0x1b2eb8(0x1fe))/0xb*(parseInt(_0x1b2eb8(0x1f1))/0xc);if(_0x59250f===_0x1710a3)break;else _0x81fcf1['push'](_0x81fcf1['shift']());}catch(_0x535636){_0x81fcf1['push'](_0x81fcf1['shift']());}}}(a36_0xa52b,0x68dfd));import{authDefinitions}from'../commands/auth/index.js';function a36_0x25dc(_0x314f6b,_0x45818e){_0x314f6b=_0x314f6b-0x1e8;const _0xa52bfd=a36_0xa52b();let _0x25dc78=_0xa52bfd[_0x314f6b];return _0x25dc78;}import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';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(_0x25f9ec){const _0x374535=a36_0x25dc;for(const _0x4da47f of _0x25f9ec){definitions['set'](_0x4da47f['service']+':'+_0x4da47f[_0x374535(0x203)],_0x4da47f);let _0x2429ab=serviceGroups[_0x374535(0x211)](_0x4da47f['service']);!_0x2429ab&&(_0x2429ab=[],serviceGroups['set'](_0x4da47f[_0x374535(0x1e9)],_0x2429ab)),_0x2429ab[_0x374535(0x1ed)](_0x4da47f);}}function registerService(_0x3783f9,_0x43760d,_0x14de47){const _0x1a002d=a36_0x25dc;registerDefinitions(_0x43760d);const _0x1e26ed=_0xf2f969=>_0xf2f969===_0x1a002d(0x20e)?'':_0xf2f969==='write'?_0x1a002d(0x1f8):'\x20\x20[high-risk-write]',_0x28a84f={'service':_0x43760d[0x0][_0x1a002d(0x1e9)],'label':_0x3783f9,'commands':_0x43760d['map'](_0x30b9ad=>({'command':_0x30b9ad[_0x1a002d(0x203)],'description':_0x30b9ad[_0x1a002d(0x1ea)],'tag':_0x1e26ed(_0x30b9ad[_0x1a002d(0x204)])})),'defaultCommand':_0x14de47?.[_0x1a002d(0x213)]??(_0x14de47?.['isSingleCommand']?_0x43760d[0x0][_0x1a002d(0x203)]:undefined),'isSingleCommand':_0x14de47?.[_0x1a002d(0x209)]};serviceRegistry[_0x1a002d(0x1ed)](_0x28a84f),serviceByName['set'](_0x28a84f[_0x1a002d(0x1e9)],_0x28a84f);}registerService(a36_0x9ad159(0x1f5),authDefinitions,{'defaultCommand':a36_0x9ad159(0x1ee)}),registerService(a36_0x9ad159(0x215),appDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService(a36_0x9ad159(0x216),workspaceDefinitions),registerService(a36_0x9ad159(0x1e8),appConfigDefinitions),registerService(a36_0x9ad159(0x210),configDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x9ad159(0x1fc),datasetDefinitions),registerService(a36_0x9ad159(0x1f0),dataDefinitions),registerService(a36_0x9ad159(0x212),sqlDefinitions),registerService(a36_0x9ad159(0x1f4),bffDefinitions),registerService(a36_0x9ad159(0x205),personalBffDefinitions),registerService(a36_0x9ad159(0x1ef),artifactDefinitions),registerService(a36_0x9ad159(0x20d),fileDefinitions),registerService(a36_0x9ad159(0x20f),ocrDefinitions),registerService(a36_0x9ad159(0x1f3),kbDefinitions),registerService(a36_0x9ad159(0x1fd),scheduleDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService(a36_0x9ad159(0x1eb),serviceDefinitions,{'defaultCommand':a36_0x9ad159(0x214)}),registerService('Skills',skillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x9ad159(0x202),cliSkillDefinitions,{'defaultCommand':a36_0x9ad159(0x20b)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x9ad159(0x1f6),'isSingleCommand':!![]}),registerService(a36_0x9ad159(0x206),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x9ad159(0x1f9),[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x143b70,_0xaf3535){const _0x542128=a36_0x9ad159;return definitions[_0x542128(0x211)](_0x143b70+':'+_0xaf3535);}export function isKnownService(_0x356b01){const _0x3c7cea=a36_0x9ad159;return serviceByName[_0x3c7cea(0x200)](_0x356b01);}export function getServiceEntry(_0x149c26){const _0x1899a0=a36_0x9ad159;return serviceByName[_0x1899a0(0x211)](_0x149c26);}function a36_0xa52b(){const _0x2f60c7=['risk','Personal\x20BFF','Diagnostics','from','9arUDQJ','isSingleCommand','4531448bveTeZ','install','values','File','read','OCR','Configuration','get','SQL\x20Queries','defaultCommand','list','App\x20Management','Workspace','10hdIaHx','Runtime\x20App\x20Config','service','description','Service\x20Tree','1019SNdzuC','push','login','Artifacts','Instant\x20API','264BQhhEN','379988CUWJqX','Knowledge\x20Base','BFF\x20Scripts','Authentication','run','3TeuHdF','\x20\x20[write]','Schema','1487280wGogLJ','2199138zmXZmK','Datasets','Agent\x20Schedules','111980sZspas','254FDMyIb','has','1628756FefuoN','CLI\x20Built-in\x20Skill','command'];a36_0xa52b=function(){return _0x2f60c7;};return a36_0xa52b();}export function getAllDefinitions(){const _0x1ff463=a36_0x9ad159;return Array[_0x1ff463(0x207)](definitions[_0x1ff463(0x20c)]());}
@@ -1 +1 @@
1
- const a37_0x45bbf7=a37_0x1527;(function(_0x1bb751,_0xd2684a){const _0x11e8f5=a37_0x1527,_0xad86f5=_0x1bb751();while(!![]){try{const _0x27cf16=parseInt(_0x11e8f5(0x12d))/0x1*(parseInt(_0x11e8f5(0x12c))/0x2)+parseInt(_0x11e8f5(0x130))/0x3*(-parseInt(_0x11e8f5(0x12e))/0x4)+-parseInt(_0x11e8f5(0x11b))/0x5*(-parseInt(_0x11e8f5(0xea))/0x6)+parseInt(_0x11e8f5(0x125))/0x7+parseInt(_0x11e8f5(0xf4))/0x8+parseInt(_0x11e8f5(0x108))/0x9*(-parseInt(_0x11e8f5(0x131))/0xa)+-parseInt(_0x11e8f5(0x10a))/0xb*(parseInt(_0x11e8f5(0xec))/0xc);if(_0x27cf16===_0xd2684a)break;else _0xad86f5['push'](_0xad86f5['shift']());}catch(_0x3775b9){_0xad86f5['push'](_0xad86f5['shift']());}}}(a37_0x5e95,0x54564));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_0x45bbf7(0x133),'type':a37_0x45bbf7(0x123),'required':!![],'enum':[a37_0x45bbf7(0x111),'ONCE'],'description':a37_0x45bbf7(0x127)},CRON_FLAG={'name':a37_0x45bbf7(0x100),'type':a37_0x45bbf7(0x123),'description':a37_0x45bbf7(0x109)},SCHEDULED_AT_FLAG={'name':a37_0x45bbf7(0x129),'type':'string','description':a37_0x45bbf7(0x106)},TITLE_FLAG={'name':a37_0x45bbf7(0x120),'type':a37_0x45bbf7(0x123),'required':!![],'description':a37_0x45bbf7(0xfd)},PROMPT_FLAG={'name':a37_0x45bbf7(0xed),'type':a37_0x45bbf7(0x123),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':a37_0x45bbf7(0xf8),'type':a37_0x45bbf7(0x123),'enum':[a37_0x45bbf7(0x116),a37_0x45bbf7(0x113)],'default':a37_0x45bbf7(0x116),'description':a37_0x45bbf7(0x114)},SCHEDULE_ID_FLAG={'name':a37_0x45bbf7(0x11d),'type':a37_0x45bbf7(0x123),'required':!![],'description':a37_0x45bbf7(0x11f),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x45bbf7(0x122)}},LIMIT_FLAG={'name':'limit','type':a37_0x45bbf7(0x12f),'default':0x14,'description':a37_0x45bbf7(0x132)},CURSOR_FLAG={'name':'cursor','type':a37_0x45bbf7(0x123),'description':a37_0x45bbf7(0xf2)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x2b6942){const _0x36f48f=a37_0x45bbf7,_0x2f77d1=_0x2b6942[_0x36f48f(0xeb)]('kind'),_0x206def=_0x2b6942[_0x36f48f(0xeb)](_0x36f48f(0x120))[_0x36f48f(0x119)](),_0x12a3a9=_0x2b6942[_0x36f48f(0xeb)](_0x36f48f(0xed))[_0x36f48f(0x119)](),_0x59f916=_0x2b6942[_0x36f48f(0xeb)](_0x36f48f(0xf8)),_0x437293=_0x2b6942[_0x36f48f(0xeb)]('cron'),_0x1c1f49=_0x2b6942['str'](_0x36f48f(0x129));if(!_0x206def)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0xfb));if(!_0x12a3a9)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0x115));if(_0x2f77d1===_0x36f48f(0x111)){if(!_0x437293||_0x1c1f49)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0xf7));return{'kind':_0x2f77d1,'timezone':_0x36f48f(0x124),'cron':_0x437293,'title':_0x206def,'prompt':_0x12a3a9,'channel':_0x59f916};}if(_0x2f77d1==='ONCE'){if(!_0x1c1f49||_0x437293)throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0x128));return{'kind':_0x2f77d1,'timezone':'UTC','scheduledAt':_0x1c1f49,'title':_0x206def,'prompt':_0x12a3a9,'channel':_0x59f916};}throw CliErrors[_0x36f48f(0x112)](_0x36f48f(0x103));}function a37_0x1527(_0x55ed3f,_0x18f92a){_0x55ed3f=_0x55ed3f-0xe6;const _0x5e95fb=a37_0x5e95();let _0x1527bb=_0x5e95fb[_0x55ed3f];return _0x1527bb;}function scheduleCollectionPath(_0x108bde){const _0x5677e9=a37_0x45bbf7;return _0x5677e9(0xff)+encodeURIComponent(_0x108bde)+_0x5677e9(0x12a);}function scheduleItemPath(_0x12448c,_0x35b63a){return scheduleCollectionPath(_0x12448c)+'/'+encodeURIComponent(_0x35b63a);}const scheduleValidate={'service':a37_0x45bbf7(0xe9),'command':'validate','description':a37_0x45bbf7(0xe6),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x53ea3e){readScheduleInput(_0x53ea3e);},async 'execute'(_0x154604){const _0x463121=a37_0x45bbf7,_0x472cdf=readScheduleInput(_0x154604),_0x56687c=await validateRuntimeSchedule(_0x154604[_0x463121(0x105)],_0x472cdf);return{'ok':!![],'data':_0x56687c,'message':_0x463121(0xe8)};}},scheduleCreate={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xe7),'description':a37_0x45bbf7(0x11a),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0x353752){readScheduleInput(_0x353752);},async 'execute'(_0x3aa4d5){const _0x2dac69=a37_0x45bbf7,_0x6271c8=readScheduleInput(_0x3aa4d5),_0x1494c6=await validateRuntimeSchedule(_0x3aa4d5[_0x2dac69(0x105)],_0x6271c8),_0x51bd69=await createRuntimeSchedule(_0x3aa4d5[_0x2dac69(0x105)],_0x1494c6);return{'ok':!![],'data':_0x51bd69,'message':_0x2dac69(0x134)+_0x51bd69[_0x2dac69(0x133)]+_0x2dac69(0x117)+_0x51bd69[_0x2dac69(0xf1)]};},async 'dryRun'(_0x44ea26){const _0x59b1f0=a37_0x45bbf7,_0x3c010b=readScheduleInput(_0x44ea26);return dryRun(_0x59b1f0(0x118),scheduleCollectionPath(_0x44ea26[_0x59b1f0(0x105)]))[_0x59b1f0(0xf9)](_0x3c010b)[_0x59b1f0(0x101)](_0x59b1f0(0xfc))[_0x59b1f0(0xfa)]();}},scheduleList={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xf3),'description':'List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','risk':'read','flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x961700){const _0xeeb482=a37_0x45bbf7,_0x557790=_0x961700[_0xeeb482(0x10e)](_0xeeb482(0x102));if(!Number[_0xeeb482(0xf0)](_0x557790)||_0x557790<0x1||_0x557790>0x64)throw CliErrors['validation']('--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.');const _0x3f425e=_0x961700[_0xeeb482(0xeb)](_0xeeb482(0x107));if(_0x3f425e&&(_0x3f425e[_0xeeb482(0x10f)]>0x400||_0x3f425e['trim']()!==_0x3f425e))throw CliErrors[_0xeeb482(0x112)](_0xeeb482(0x10b));},async 'execute'(_0x4fbfee){const _0x236ed5=a37_0x45bbf7,_0x4cda2=_0x4fbfee[_0x236ed5(0xeb)](_0x236ed5(0x107)),_0x33daaa=await listRuntimeSchedules(_0x4fbfee[_0x236ed5(0x105)],{'limit':_0x4fbfee[_0x236ed5(0x10e)](_0x236ed5(0x102)),..._0x4cda2?{'cursor':_0x4cda2}:{}});return{'ok':!![],'data':_0x33daaa};}},scheduleDetail={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xef),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x45bbf7(0x10d),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x78fa56){const _0x3b8359=a37_0x45bbf7,_0x5e51d9=await getRuntimeSchedule(_0x78fa56[_0x3b8359(0x105)],_0x78fa56['str'](_0x3b8359(0x11d)));return{'ok':!![],'data':_0x5e51d9};}},scheduleRun={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xf5),'description':'Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','risk':a37_0x45bbf7(0x11e),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x8f786e){const _0x2b7c9d=a37_0x45bbf7,_0x4718f9=_0x8f786e[_0x2b7c9d(0xeb)](_0x2b7c9d(0x11d)),_0x331696=await runRuntimeSchedule(_0x8f786e[_0x2b7c9d(0x105)],_0x4718f9);return{'ok':!![],'data':_0x331696,'message':_0x2b7c9d(0x121)+_0x331696[_0x2b7c9d(0xee)]+_0x2b7c9d(0x10c)+_0x4718f9};},async 'dryRun'(_0x2b09c8){const _0x224754=a37_0x45bbf7,_0x34a7dc=_0x2b09c8[_0x224754(0xeb)]('schedule-id');return dryRun(_0x224754(0x118),scheduleItemPath(_0x2b09c8[_0x224754(0x105)],_0x34a7dc)+_0x224754(0x104))[_0x224754(0x101)](_0x224754(0x11c)+_0x34a7dc+_0x224754(0x126))['build']();}},scheduleDelete={'service':a37_0x45bbf7(0xe9),'command':a37_0x45bbf7(0xfe),'description':'Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','risk':a37_0x45bbf7(0x11e),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x29d23a){const _0x29a20d=a37_0x45bbf7,_0x54b293=_0x29d23a['str'](_0x29a20d(0x11d)),_0x5e59bd=await deleteRuntimeSchedule(_0x29d23a[_0x29a20d(0x105)],_0x54b293);return{'ok':!![],'data':_0x5e59bd,'message':_0x29a20d(0x12b)+_0x54b293};},async 'dryRun'(_0x4dab6f){const _0x13ff32=a37_0x45bbf7,_0x4f9379=_0x4dab6f[_0x13ff32(0xeb)]('schedule-id');return dryRun(_0x13ff32(0xf6),scheduleItemPath(_0x4dab6f[_0x13ff32(0x105)],_0x4f9379))['description'](_0x13ff32(0x110)+_0x4f9379)[_0x13ff32(0xfa)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];function a37_0x5e95(){const _0x147448=['channel','body','build','--title\x20must\x20not\x20be\x20blank.','Preview:\x20create\x20an\x20Agent\x20schedule','Schedule\x20title','delete','/api/harness/apps/','cron','description','limit','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','/run','appCode','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','cursor','9fjTsss','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','392304xwARJy','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','\x20from\x20schedule\x20','read','num','length','Preview:\x20delete\x20schedule\x20','CRON','validation','premium','Task\x20channel:\x20auto\x20or\x20premium','--prompt\x20must\x20not\x20be\x20blank.','auto','\x20schedule\x20','POST','trim','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','357055LhjfvC','Preview:\x20run\x20schedule\x20','schedule-id','high-risk-write','Schedule\x20UUID','title','Queued\x20Task\x20','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','string','UTC','1387974JADtdM','\x20immediately','Schedule\x20kind:\x20CRON\x20or\x20ONCE','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','scheduled-at','/schedules','Deleted\x20schedule\x20','2xrBTgj','175789vFJfud','527588QesDal','number','3fWOAjZ','3318010WvRcQF','Page\x20size\x20from\x201\x20to\x20100','kind','Created\x20','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','create','Schedule\x20input\x20is\x20valid','schedule','12kfrkcl','str','36oJMkYa','prompt','taskId','detail','isSafeInteger','scheduleId','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','list','3193928RlWnRF','run','DELETE','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.'];a37_0x5e95=function(){return _0x147448;};return a37_0x5e95();}
1
+ function a37_0x5aeb(){const _0x3dfdf3=['number','create','\x20from\x20schedule\x20','3413963XxpEle','ONCE','read','Deleted\x20schedule\x20','prompt','Queued\x20Task\x20','validation','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','schedule','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','667014bumKrW','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','high-risk-write','string','\x20immediately','207776HajOAJ','Created\x20','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','isSafeInteger','validate','description','UTC','/run','--title\x20must\x20not\x20be\x20blank.','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','Schedule\x20input\x20is\x20valid','kind','CRON','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','28062WbHgeY','limit','\x20schedule\x20','str','Schedule\x20title','2025NCpTsW','body','3056OWqCrk','cron','length','auto','Preview:\x20create\x20an\x20Agent\x20schedule','982602kIaslC','appCode','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','Preview:\x20run\x20schedule\x20','--prompt\x20must\x20not\x20be\x20blank.','Preview:\x20delete\x20schedule\x20','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','premium','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','DELETE','channel','Page\x20size\x20from\x201\x20to\x20100','run','scheduleId','276XqgLKf','schedule-id','/schedules','title','trim','build','2214015pCpQsa','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','cursor','delete','Schedule\x20UUID'];a37_0x5aeb=function(){return _0x3dfdf3;};return a37_0x5aeb();}const a37_0x2ed6a6=a37_0x4def;(function(_0x47d81d,_0x44e945){const _0x240d80=a37_0x4def,_0x3abf04=_0x47d81d();while(!![]){try{const _0x2bdd36=-parseInt(_0x240d80(0x131))/0x1*(-parseInt(_0x240d80(0x146))/0x2)+parseInt(_0x240d80(0x118))/0x3+parseInt(_0x240d80(0x11d))/0x4+parseInt(_0x240d80(0x14c))/0x5+parseInt(_0x240d80(0x138))/0x6+parseInt(_0x240d80(0x154))/0x7+-parseInt(_0x240d80(0x133))/0x8*(parseInt(_0x240d80(0x12c))/0x9);if(_0x2bdd36===_0x44e945)break;else _0x3abf04['push'](_0x3abf04['shift']());}catch(_0x9aabb1){_0x3abf04['push'](_0x3abf04['shift']());}}}(a37_0x5aeb,0x6f8e7));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a37_0x4def(_0x5b0c25,_0x296e32){_0x5b0c25=_0x5b0c25-0x114;const _0x5aebce=a37_0x5aeb();let _0x4def79=_0x5aebce[_0x5b0c25];return _0x4def79;}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':'kind','type':a37_0x2ed6a6(0x11b),'required':!![],'enum':[a37_0x2ed6a6(0x12a),a37_0x2ed6a6(0x155)],'description':'Schedule\x20kind:\x20CRON\x20or\x20ONCE'},CRON_FLAG={'name':'cron','type':'string','description':a37_0x2ed6a6(0x13e)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':a37_0x2ed6a6(0x11b),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':'title','type':a37_0x2ed6a6(0x11b),'required':!![],'description':a37_0x2ed6a6(0x130)},PROMPT_FLAG={'name':a37_0x2ed6a6(0x158),'type':a37_0x2ed6a6(0x11b),'required':!![],'description':a37_0x2ed6a6(0x14d)},CHANNEL_FLAG={'name':a37_0x2ed6a6(0x142),'type':a37_0x2ed6a6(0x11b),'enum':[a37_0x2ed6a6(0x136),a37_0x2ed6a6(0x13f)],'default':a37_0x2ed6a6(0x136),'description':'Task\x20channel:\x20auto\x20or\x20premium'},SCHEDULE_ID_FLAG={'name':'schedule-id','type':'string','required':!![],'description':a37_0x2ed6a6(0x150),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':'limit','type':a37_0x2ed6a6(0x151),'default':0x14,'description':a37_0x2ed6a6(0x143)},CURSOR_FLAG={'name':a37_0x2ed6a6(0x14e),'type':a37_0x2ed6a6(0x11b),'description':a37_0x2ed6a6(0x140)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x5d21ca){const _0x593ee8=a37_0x2ed6a6,_0x362f9c=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x129)),_0x3c7253=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x149))[_0x593ee8(0x14a)](),_0x49324d=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x158))[_0x593ee8(0x14a)](),_0x584148=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x142)),_0x488a58=_0x5d21ca[_0x593ee8(0x12f)](_0x593ee8(0x134)),_0x319970=_0x5d21ca[_0x593ee8(0x12f)]('scheduled-at');if(!_0x3c7253)throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x125));if(!_0x49324d)throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x13c));if(_0x362f9c===_0x593ee8(0x12a)){if(!_0x488a58||_0x319970)throw CliErrors[_0x593ee8(0x15a)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x362f9c,'timezone':_0x593ee8(0x123),'cron':_0x488a58,'title':_0x3c7253,'prompt':_0x49324d,'channel':_0x584148};}if(_0x362f9c==='ONCE'){if(!_0x319970||_0x488a58)throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x126));return{'kind':_0x362f9c,'timezone':_0x593ee8(0x123),'scheduledAt':_0x319970,'title':_0x3c7253,'prompt':_0x49324d,'channel':_0x584148};}throw CliErrors[_0x593ee8(0x15a)](_0x593ee8(0x11f));}function scheduleCollectionPath(_0x48d28f){const _0x17a59a=a37_0x2ed6a6;return'/api/harness/apps/'+encodeURIComponent(_0x48d28f)+_0x17a59a(0x148);}function scheduleItemPath(_0x13eb32,_0x546c48){return scheduleCollectionPath(_0x13eb32)+'/'+encodeURIComponent(_0x546c48);}const scheduleValidate={'service':a37_0x2ed6a6(0x115),'command':a37_0x2ed6a6(0x121),'description':a37_0x2ed6a6(0x116),'risk':a37_0x2ed6a6(0x156),'flags':INPUT_FLAGS,async 'validate'(_0x42c97e){readScheduleInput(_0x42c97e);},async 'execute'(_0x49287e){const _0x56961f=a37_0x2ed6a6,_0x55b24f=readScheduleInput(_0x49287e),_0x52ec5b=await validateRuntimeSchedule(_0x49287e[_0x56961f(0x139)],_0x55b24f);return{'ok':!![],'data':_0x52ec5b,'message':_0x56961f(0x128)};}},scheduleCreate={'service':a37_0x2ed6a6(0x115),'command':a37_0x2ed6a6(0x152),'description':a37_0x2ed6a6(0x127),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0x327a8c){readScheduleInput(_0x327a8c);},async 'execute'(_0x294ae2){const _0x48bfc6=a37_0x2ed6a6,_0x47d2cb=readScheduleInput(_0x294ae2),_0x4f6ea7=await validateRuntimeSchedule(_0x294ae2[_0x48bfc6(0x139)],_0x47d2cb),_0x311d64=await createRuntimeSchedule(_0x294ae2[_0x48bfc6(0x139)],_0x4f6ea7);return{'ok':!![],'data':_0x311d64,'message':_0x48bfc6(0x11e)+_0x311d64[_0x48bfc6(0x129)]+_0x48bfc6(0x12e)+_0x311d64[_0x48bfc6(0x145)]};},async 'dryRun'(_0x536c39){const _0x5a1628=a37_0x2ed6a6,_0x122138=readScheduleInput(_0x536c39);return dryRun('POST',scheduleCollectionPath(_0x536c39[_0x5a1628(0x139)]))[_0x5a1628(0x132)](_0x122138)['description'](_0x5a1628(0x137))['build']();}},scheduleList={'service':a37_0x2ed6a6(0x115),'command':'list','description':a37_0x2ed6a6(0x119),'risk':a37_0x2ed6a6(0x156),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3a1747){const _0x1589a3=a37_0x2ed6a6,_0x33f5f1=_0x3a1747['num'](_0x1589a3(0x12d));if(!Number[_0x1589a3(0x120)](_0x33f5f1)||_0x33f5f1<0x1||_0x33f5f1>0x64)throw CliErrors['validation'](_0x1589a3(0x12b));const _0x2804e5=_0x3a1747['str']('cursor');if(_0x2804e5&&(_0x2804e5[_0x1589a3(0x135)]>0x400||_0x2804e5[_0x1589a3(0x14a)]()!==_0x2804e5))throw CliErrors[_0x1589a3(0x15a)](_0x1589a3(0x117));},async 'execute'(_0x3ac83b){const _0x485b78=a37_0x2ed6a6,_0x585dd2=_0x3ac83b['str'](_0x485b78(0x14e)),_0x160e2e=await listRuntimeSchedules(_0x3ac83b[_0x485b78(0x139)],{'limit':_0x3ac83b['num'](_0x485b78(0x12d)),..._0x585dd2?{'cursor':_0x585dd2}:{}});return{'ok':!![],'data':_0x160e2e};}},scheduleDetail={'service':a37_0x2ed6a6(0x115),'command':'detail','description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x2ed6a6(0x156),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1e382a){const _0x12acaa=a37_0x2ed6a6,_0x471450=await getRuntimeSchedule(_0x1e382a[_0x12acaa(0x139)],_0x1e382a['str'](_0x12acaa(0x147)));return{'ok':!![],'data':_0x471450};}},scheduleRun={'service':a37_0x2ed6a6(0x115),'command':a37_0x2ed6a6(0x144),'description':a37_0x2ed6a6(0x114),'risk':a37_0x2ed6a6(0x11a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2ed1a6){const _0x40e7ee=a37_0x2ed6a6,_0x2aeda1=_0x2ed1a6[_0x40e7ee(0x12f)](_0x40e7ee(0x147)),_0x2ee78f=await runRuntimeSchedule(_0x2ed1a6[_0x40e7ee(0x139)],_0x2aeda1);return{'ok':!![],'data':_0x2ee78f,'message':_0x40e7ee(0x159)+_0x2ee78f['taskId']+_0x40e7ee(0x153)+_0x2aeda1};},async 'dryRun'(_0x5a1668){const _0x535add=a37_0x2ed6a6,_0x1701e9=_0x5a1668[_0x535add(0x12f)]('schedule-id');return dryRun('POST',scheduleItemPath(_0x5a1668[_0x535add(0x139)],_0x1701e9)+_0x535add(0x124))[_0x535add(0x122)](_0x535add(0x13b)+_0x1701e9+_0x535add(0x11c))[_0x535add(0x14b)]();}},scheduleDelete={'service':'schedule','command':a37_0x2ed6a6(0x14f),'description':a37_0x2ed6a6(0x13a),'risk':a37_0x2ed6a6(0x11a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x82e441){const _0x2cd24f=a37_0x2ed6a6,_0x1985b7=_0x82e441['str'](_0x2cd24f(0x147)),_0x570718=await deleteRuntimeSchedule(_0x82e441[_0x2cd24f(0x139)],_0x1985b7);return{'ok':!![],'data':_0x570718,'message':_0x2cd24f(0x157)+_0x1985b7};},async 'dryRun'(_0x1dbf0f){const _0x20c2c9=a37_0x2ed6a6,_0x5fc726=_0x1dbf0f[_0x20c2c9(0x12f)](_0x20c2c9(0x147));return dryRun(_0x20c2c9(0x141),scheduleItemPath(_0x1dbf0f[_0x20c2c9(0x139)],_0x5fc726))[_0x20c2c9(0x122)](_0x20c2c9(0x13d)+_0x5fc726)['build']();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x475a5e=a38_0x4529;(function(_0x163fc7,_0x353caa){const _0x226b53=a38_0x4529,_0x46270e=_0x163fc7();while(!![]){try{const _0x39bc67=parseInt(_0x226b53(0x170))/0x1+-parseInt(_0x226b53(0x168))/0x2*(parseInt(_0x226b53(0x167))/0x3)+-parseInt(_0x226b53(0x169))/0x4*(-parseInt(_0x226b53(0x16d))/0x5)+-parseInt(_0x226b53(0x16b))/0x6*(-parseInt(_0x226b53(0x16c))/0x7)+-parseInt(_0x226b53(0x165))/0x8*(parseInt(_0x226b53(0x164))/0x9)+-parseInt(_0x226b53(0x16f))/0xa*(-parseInt(_0x226b53(0x166))/0xb)+-parseInt(_0x226b53(0x16a))/0xc;if(_0x39bc67===_0x353caa)break;else _0x46270e['push'](_0x46270e['shift']());}catch(_0x41a962){_0x46270e['push'](_0x46270e['shift']());}}}(a38_0x45ff,0x34a37));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x482cf0){const _0xdc1a7f=await buildSchemaPayload();return{'ok':!![],'data':_0xdc1a7f};}function a38_0x4529(_0x53ea66,_0x70ff5e){_0x53ea66=_0x53ea66-0x164;const _0x45ff23=a38_0x45ff();let _0x45291f=_0x45ff23[_0x53ea66];return _0x45291f;}export const schemaDefinition={'service':a38_0x475a5e(0x16e),'command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a38_0x45ff(){const _0x471d0e=['171JHQSbn','39464XEYgNX','11zUsiKV','120kXguwO','17236zunWVo','8ZbEcim','363492jmcAnm','10554GUgGpy','7QoogYh','551615zZuZHH','schema','2648750wtuGoF','197065RJSANM'];a38_0x45ff=function(){return _0x471d0e;};return a38_0x45ff();}
1
+ const a38_0x1e0661=a38_0x3d3f;(function(_0x678e07,_0x84ee79){const _0x4db116=a38_0x3d3f,_0x5aaec8=_0x678e07();while(!![]){try{const _0x4b487f=parseInt(_0x4db116(0x10b))/0x1+-parseInt(_0x4db116(0x108))/0x2*(-parseInt(_0x4db116(0x103))/0x3)+parseInt(_0x4db116(0x10e))/0x4+-parseInt(_0x4db116(0x109))/0x5*(parseInt(_0x4db116(0x102))/0x6)+-parseInt(_0x4db116(0x10c))/0x7*(-parseInt(_0x4db116(0x107))/0x8)+parseInt(_0x4db116(0x10d))/0x9+-parseInt(_0x4db116(0x10a))/0xa;if(_0x4b487f===_0x84ee79)break;else _0x5aaec8['push'](_0x5aaec8['shift']());}catch(_0x23e41){_0x5aaec8['push'](_0x5aaec8['shift']());}}}(a38_0x2b15,0xd853a));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x3d3f(_0x4ac15d,_0x3879bb){_0x4ac15d=_0x4ac15d-0x102;const _0x2b1529=a38_0x2b15();let _0x3d3fa5=_0x2b1529[_0x4ac15d];return _0x3d3fa5;}async function execute(_0x475a80){const _0xcafb0a=await buildSchemaPayload();return{'ok':!![],'data':_0xcafb0a};}function a38_0x2b15(){const _0x306f05=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','export','804256pcnziC','1912NsAahF','88710UjXsov','23795410ZbDsWN','624041nHPmgW','112DerSnD','2637261gncSta','2483028AKVJWM','24ccjFde','597ITgCfi'];a38_0x2b15=function(){return _0x306f05;};return a38_0x2b15();}export const schemaDefinition={'service':a38_0x1e0661(0x105),'command':a38_0x1e0661(0x106),'description':a38_0x1e0661(0x104),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};