@lovrabet/lovrabet-cli 2.1.22-beta.4 → 2.1.22-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/ocr/index.js +1 -1
  36. package/lib/commands/personal-bff/index.js +1 -1
  37. package/lib/commands/registry.js +1 -1
  38. package/lib/commands/schedule/index.js +1 -1
  39. package/lib/commands/schema.js +1 -1
  40. package/lib/commands/service/dynamic.js +1 -1
  41. package/lib/commands/service/function-name-adapter.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/diagram.js +1 -1
  46. package/lib/commands/skill/commands/install.js +1 -1
  47. package/lib/commands/skill/commands/list.js +1 -1
  48. package/lib/commands/skill/commands/push.js +1 -1
  49. package/lib/commands/skill/commands/validate.js +1 -1
  50. package/lib/commands/skill/diagram.js +1 -1
  51. package/lib/commands/skill/flags.js +1 -1
  52. package/lib/commands/skill/index.js +1 -1
  53. package/lib/commands/skill/manifest-helpers.js +1 -1
  54. package/lib/commands/skill/push-execute.js +1 -1
  55. package/lib/commands/skill/push-flow-helpers.js +1 -1
  56. package/lib/commands/skill/push-retarget.js +1 -1
  57. package/lib/commands/skill/scopes.js +1 -1
  58. package/lib/commands/skill/summary.js +1 -1
  59. package/lib/commands/skill/templates.js +1 -1
  60. package/lib/commands/skill/validate.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/update.js +1 -1
  65. package/lib/commands/workspace/index.js +1 -1
  66. package/lib/config/schema.js +1 -1
  67. package/lib/constant/app.js +1 -1
  68. package/lib/constant/auth-mode.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/defaults.js +1 -1
  71. package/lib/constant/distribution.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/constant/output.js +1 -1
  75. package/lib/constant/product.js +1 -1
  76. package/lib/constant/risk.js +1 -1
  77. package/lib/constant/url.js +1 -1
  78. package/lib/context.js +1 -1
  79. package/lib/core/api-client.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sdk-client.js +1 -1
  82. package/lib/errors.js +1 -1
  83. package/lib/framework/build-all-flags.js +1 -1
  84. package/lib/framework/dryrun.js +1 -1
  85. package/lib/framework/flags.js +1 -1
  86. package/lib/framework/help.js +1 -1
  87. package/lib/framework/index.js +1 -1
  88. package/lib/framework/output.js +1 -1
  89. package/lib/framework/preparse.js +1 -1
  90. package/lib/framework/rate-limit.js +1 -1
  91. package/lib/framework/raw-flags.js +1 -1
  92. package/lib/framework/response.js +1 -1
  93. package/lib/framework/runner-confirmation.js +1 -1
  94. package/lib/framework/runner-error.js +1 -1
  95. package/lib/framework/runner.js +1 -1
  96. package/lib/framework/schema-export.js +1 -1
  97. package/lib/framework/service-order.js +1 -1
  98. package/lib/framework/types.js +1 -1
  99. package/lib/generated/build-info.d.ts +4 -4
  100. package/lib/generated/build-info.js +1 -1
  101. package/lib/help.js +1 -1
  102. package/lib/runtime/event.js +1 -1
  103. package/lib/runtime/index.js +1 -1
  104. package/lib/runtime/queue.js +1 -1
  105. package/lib/runtime/resolve.js +1 -1
  106. package/lib/skills/npx-skills-add.js +1 -1
  107. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  108. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  109. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  110. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  111. package/lib/skills/runtime-skill-sync/links.js +1 -1
  112. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  113. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  114. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  115. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  116. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  117. package/lib/skills/runtime-skill-sync/push.js +1 -1
  118. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  119. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  120. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  121. package/lib/skills/runtime-skill-sync.js +1 -1
  122. package/lib/utils/apply-jq-filter.js +1 -1
  123. package/lib/utils/logger.js +1 -1
  124. package/lib/utils/lossless-json.js +1 -1
  125. package/lib/utils/params.js +1 -1
  126. package/lib/utils/platform.js +1 -1
  127. package/lib/utils/update-notice.js +1 -1
  128. package/lib/utils/version.js +1 -1
  129. package/lib/utils/write-cli-side-channel.js +1 -1
  130. package/package.json +1 -1
@@ -1 +1 @@
1
- const a29_0x294229=a29_0xbd61;(function(_0x48d2f8,_0xef9892){const _0xd49d05=a29_0xbd61,_0x355fcf=_0x48d2f8();while(!![]){try{const _0x360df7=parseInt(_0xd49d05(0x13f))/0x1+parseInt(_0xd49d05(0x14d))/0x2+parseInt(_0xd49d05(0x110))/0x3+-parseInt(_0xd49d05(0x113))/0x4*(-parseInt(_0xd49d05(0x15f))/0x5)+-parseInt(_0xd49d05(0x140))/0x6+-parseInt(_0xd49d05(0x11f))/0x7*(-parseInt(_0xd49d05(0x132))/0x8)+-parseInt(_0xd49d05(0x138))/0x9*(parseInt(_0xd49d05(0x12e))/0xa);if(_0x360df7===_0xef9892)break;else _0x355fcf['push'](_0x355fcf['shift']());}catch(_0x4a6a51){_0x355fcf['push'](_0x355fcf['shift']());}}}(a29_0x16a7,0x4c860));import a29_0x306bb0 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';function a29_0x16a7(){const _0x4c74de=['read','gray','441mueyXv','serviceCode','path','\x20commands)','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','verbose','321464mijSZi','3195156RRsNDe','doctor','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty','pageSize','⚠\x20Empty\x20(treated\x20as\x20{})','arch','services','source','bold','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','10374fGHMtD','message','\x20\x20Merged\x20Config','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCount','⚠\x20Empty','\x20\x20Service\x20Tree','\x20doctor','(no\x20file)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','green','padEnd','(set,\x20length=','accessKey','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','riskLevel','5baXqqq','\x20\x20Config\x20Files','880821DzbQlO','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','commandCount','1783896DOrWxo','registryPath','appCode','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','red','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','✓\x20Loaded','\x20\x20─','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','length','check','format','68950NORBeY','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','(default:\x20','\x20(legacy/compat\x20only)','ClientAk','status','log','\x20\x20Auth','\x20\x20Config\x20JSON','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','yellow','locale','(unnamed)','121340lXTCji','(missing)','currentApp','✗\x20Invalid','304sesmMW','platform','\x20\x20Session\x20check:\x20\x20\x20','repeat'];a29_0x16a7=function(){return _0x4c74de;};return a29_0x16a7();}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x38044a){const _0x15ac6f=a29_0xbd61,_0x5d20c8=getCliVersion(),_0x15558f=buildConfigFromFlags({});await initGlobalEnvironment(_0x15558f),console[_0x15ac6f(0x126)](),console['log'](a29_0x306bb0['bold'](CLI_BIN_NAME+_0x15ac6f(0x154))),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x137)]('─'[_0x15ac6f(0x135)](0x32))),console[_0x15ac6f(0x126)](_0x15ac6f(0x116)+_0x5d20c8),console[_0x15ac6f(0x126)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x15ac6f(0x133)]+'\x20'+process[_0x15ac6f(0x148)]),console[_0x15ac6f(0x126)](),console['log'](a29_0x306bb0['bold'](_0x15ac6f(0x160))),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x11a)[_0x15ac6f(0x135)](0x1e)));const _0x1767d1=getGlobalConfigPath(),_0x2ad3d8=getProjectConfigPath();console[_0x15ac6f(0x126)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1767d1||a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x143)))),console[_0x15ac6f(0x126)](_0x15ac6f(0x150)+(_0x2ad3d8||a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x143)))),console[_0x15ac6f(0x126)](),console[_0x15ac6f(0x126)](a29_0x306bb0['bold'](_0x15ac6f(0x128))),console['log'](a29_0x306bb0[_0x15ac6f(0x137)]('\x20\x20─'[_0x15ac6f(0x135)](0x1e)));const _0x2aa27a=(_0x15e624,_0x460f4b)=>{const _0x9e82a0=_0x15ac6f;if(!_0x460f4b){console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x137)](_0x9e82a0(0x155)));return;}const _0x44c4a5=inspectCliConfigJsonFile(_0x460f4b);if(_0x44c4a5[_0x9e82a0(0x125)]==='ok')console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x157)](_0x9e82a0(0x13d)));else{if(_0x44c4a5['status']===_0x9e82a0(0x145))console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x12b)](_0x9e82a0(0x147)));else _0x44c4a5[_0x9e82a0(0x125)]==='missing'?console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624['padEnd'](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x137)](_0x9e82a0(0x12f))):(console[_0x9e82a0(0x126)]('\x20\x20'+_0x15e624['padEnd'](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x117)]('✗\x20Invalid\x20JSON')),console[_0x9e82a0(0x126)]('\x20\x20'+''[_0x9e82a0(0x158)](0x11)+'\x20'+a29_0x306bb0[_0x9e82a0(0x117)](_0x44c4a5[_0x9e82a0(0x14e)])));}};_0x2aa27a('Global',_0x1767d1),_0x2aa27a('Project',_0x2ad3d8),console[_0x15ac6f(0x126)](),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x14b)](_0x15ac6f(0x14f))),console['log'](a29_0x306bb0['gray']('\x20\x20─'[_0x15ac6f(0x135)](0x1e))),console[_0x15ac6f(0x126)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x15558f[_0x15ac6f(0x115)]||a29_0x306bb0[_0x15ac6f(0x117)]('(not\x20set)'))),console[_0x15ac6f(0x126)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15558f['env']);const _0x3ae904=isLegacyCompatConfigKey(_0x15ac6f(0x12c))?a29_0x306bb0['gray'](_0x15558f[_0x15ac6f(0x12c)]+_0x15ac6f(0x123)):_0x15558f[_0x15ac6f(0x12c)];console[_0x15ac6f(0x126)](_0x15ac6f(0x129)+_0x3ae904),console[_0x15ac6f(0x126)](_0x15ac6f(0x15d)+(_0x15558f[_0x15ac6f(0x121)]||a29_0x306bb0['gray'](_0x15ac6f(0x12a)))),console['log'](_0x15ac6f(0x14c)+(_0x15558f[_0x15ac6f(0x130)]||a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x12a)))),console[_0x15ac6f(0x126)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x15558f[_0x15ac6f(0x11e)]||a29_0x306bb0['gray'](_0x15ac6f(0x122)+DEFAULT_CONFIG_VALUES[_0x15ac6f(0x11e)]+')'))),console[_0x15ac6f(0x126)](_0x15ac6f(0x120)+(_0x15558f[_0x15ac6f(0x146)]??a29_0x306bb0[_0x15ac6f(0x137)]('(default)'))),console[_0x15ac6f(0x126)](_0x15ac6f(0x156)+_0x15558f[_0x15ac6f(0x15e)]),console[_0x15ac6f(0x126)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15558f[_0x15ac6f(0x13e)]),console[_0x15ac6f(0x126)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x15ac6f(0x124)]),console[_0x15ac6f(0x126)](_0x15ac6f(0x11b)+(_0x15558f['accessKey']?a29_0x306bb0['green'](_0x15ac6f(0x159)+_0x15558f[_0x15ac6f(0x15a)][_0x15ac6f(0x11c)]+')'):a29_0x306bb0[_0x15ac6f(0x137)]('(none)'))),console[_0x15ac6f(0x126)](),console[_0x15ac6f(0x126)](a29_0x306bb0['bold']('\x20\x20API\x20Endpoints')),console[_0x15ac6f(0x126)](a29_0x306bb0['gray'](_0x15ac6f(0x11a)[_0x15ac6f(0x135)](0x1e))),console[_0x15ac6f(0x126)](_0x15ac6f(0x118)+getApiDomain()),console[_0x15ac6f(0x126)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x15ac6f(0x126)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console['log'](a29_0x306bb0[_0x15ac6f(0x14b)](_0x15ac6f(0x153))),console['log'](a29_0x306bb0[_0x15ac6f(0x137)]('\x20\x20─'[_0x15ac6f(0x135)](0x1e)));const _0x35b15b=inspectServiceRegistry();console['log'](_0x15ac6f(0x111)+_0x35b15b[_0x15ac6f(0x114)]),console[_0x15ac6f(0x126)](_0x15ac6f(0x142)+formatServiceRegistryStatus(_0x35b15b)),console[_0x15ac6f(0x126)](_0x15ac6f(0x15c)+_0x35b15b[_0x15ac6f(0x151)]),console[_0x15ac6f(0x126)](_0x15ac6f(0x13c)+_0x35b15b[_0x15ac6f(0x112)]);for(const _0x139004 of _0x35b15b[_0x15ac6f(0x149)]){console[_0x15ac6f(0x126)]('\x20\x20'+(_0x139004[_0x15ac6f(0x139)]+':')['padEnd'](0x11)+'\x20'+(_0x139004['name']||a29_0x306bb0['gray'](_0x15ac6f(0x12d)))+'\x20('+_0x139004['commandCount']+_0x15ac6f(0x13b)),console['log']('\x20\x20'+''[_0x15ac6f(0x158)](0x11)+'\x20Imported\x20from:\x20'+_0x139004[_0x15ac6f(0x14a)][_0x15ac6f(0x13a)]);}return console[_0x15ac6f(0x126)](),console['log'](a29_0x306bb0[_0x15ac6f(0x14b)](_0x15ac6f(0x127))),console[_0x15ac6f(0x126)](a29_0x306bb0[_0x15ac6f(0x137)]('\x20\x20─'[_0x15ac6f(0x135)](0x1e))),console[_0x15ac6f(0x126)](_0x15ac6f(0x144)+a29_0x306bb0[_0x15ac6f(0x157)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0x15ac6f(0x126)](_0x15ac6f(0x134)+a29_0x306bb0[_0x15ac6f(0x137)](_0x15ac6f(0x15b))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x239d98){const _0x25efbf=a29_0xbd61;if(_0x239d98[_0x25efbf(0x125)]==='ok')return a29_0x306bb0[_0x25efbf(0x157)](_0x25efbf(0x119));if(_0x239d98[_0x25efbf(0x125)]==='missing')return a29_0x306bb0[_0x25efbf(0x137)](_0x25efbf(0x143));if(_0x239d98['status']===_0x25efbf(0x145))return a29_0x306bb0[_0x25efbf(0x12b)](_0x25efbf(0x152));return a29_0x306bb0[_0x25efbf(0x117)](_0x25efbf(0x131)+(_0x239d98[_0x25efbf(0x14e)]?':\x20'+_0x239d98[_0x25efbf(0x14e)]:''));}function a29_0xbd61(_0x4df812,_0x2458df){_0x4df812=_0x4df812-0x110;const _0x16a78f=a29_0x16a7();let _0xbd619e=_0x16a78f[_0x4df812];return _0xbd619e;}export const doctorDefinition={'service':a29_0x294229(0x141),'command':a29_0x294229(0x11d),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0x294229(0x136),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x1860b0=a29_0x76be;(function(_0x427b57,_0x174122){const _0x1444d5=a29_0x76be,_0x4c9dc8=_0x427b57();while(!![]){try{const _0x2c4c73=-parseInt(_0x1444d5(0xf2))/0x1+-parseInt(_0x1444d5(0xd2))/0x2+-parseInt(_0x1444d5(0xdb))/0x3+-parseInt(_0x1444d5(0xbf))/0x4*(parseInt(_0x1444d5(0xd0))/0x5)+-parseInt(_0x1444d5(0xee))/0x6*(parseInt(_0x1444d5(0xd1))/0x7)+-parseInt(_0x1444d5(0xd6))/0x8*(-parseInt(_0x1444d5(0xe8))/0x9)+parseInt(_0x1444d5(0xf4))/0xa;if(_0x2c4c73===_0x174122)break;else _0x4c9dc8['push'](_0x4c9dc8['shift']());}catch(_0x53b5ad){_0x4c9dc8['push'](_0x4c9dc8['shift']());}}}(a29_0x3168,0x98c2a));import a29_0x28f494 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';function a29_0x76be(_0x1f961f,_0x4992da){_0x1f961f=_0x1f961f-0xb8;const _0x31684c=a29_0x3168();let _0x76be42=_0x31684c[_0x1f961f];return _0x76be42;}import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';function a29_0x3168(){const _0x50a961=['911457CDBHtR','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(not\x20found)','arch','✓\x20Loaded','empty','23970udHosL','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','\x20doctor','358163iVAaXo','ClientAk','12772250NGpYvQ','✓\x20Valid\x20JSON','status','format','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','(no\x20file)','⚠\x20Empty\x20(treated\x20as\x20{})','name','(not\x20set)','appCode','repeat','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','(removed\x20—\x20cookie\x20auth\x20disabled)','source','yellow','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','currentApp','\x20\x20Config\x20Files','(default)','\x20(accessKey)','\x20\x20─','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','388SUNTMq','gray','bold','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','padEnd','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','check','\x20\x20Merged\x20Config','commandCount','(unnamed)','registryPath','version','17245RlFjZz','693hbCRua','778828HFYbUG','(none)','path','green','88tJOlZn','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','(set,\x20length=','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','863661ZevMpY','services','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','\x20\x20API\x20Endpoints','\x20\x20runtimeDomain:\x20\x20\x20','accessKey','doctor','✗\x20Invalid\x20JSON','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','log'];a29_0x3168=function(){return _0x50a961;};return a29_0x3168();}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x4a97ed){const _0x279af1=a29_0x76be,_0x1940a8=getCliVersion(),_0x5c1f4d=buildConfigFromFlags({});await initGlobalEnvironment(_0x5c1f4d),console[_0x279af1(0xe7)](),console['log'](a29_0x28f494[_0x279af1(0xc1)](CLI_BIN_NAME+_0x279af1(0xf1))),console[_0x279af1(0xe7)](a29_0x28f494['gray']('─'[_0x279af1(0x101)](0x32))),console[_0x279af1(0xe7)](_0x279af1(0xe9)+_0x1940a8),console[_0x279af1(0xe7)](_0x279af1(0xdd)+process[_0x279af1(0xcf)]),console[_0x279af1(0xe7)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process[_0x279af1(0xeb)]),console[_0x279af1(0xe7)](),console['log'](a29_0x28f494['bold'](_0x279af1(0xba))),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e)));const _0x1890a0=getGlobalConfigPath(),_0x5852fe=getProjectConfigPath();console[_0x279af1(0xe7)](_0x279af1(0xf8)+(_0x1890a0||a29_0x28f494['gray'](_0x279af1(0xea)))),console[_0x279af1(0xe7)](_0x279af1(0xda)+(_0x5852fe||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xea)))),console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xe6))),console[_0x279af1(0xe7)](a29_0x28f494['gray'](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e)));const _0x368041=(_0x42adee,_0x51a5f7)=>{const _0x382240=_0x279af1;if(!_0x51a5f7){console[_0x382240(0xe7)]('\x20\x20'+_0x42adee['padEnd'](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc0)](_0x382240(0xfc)));return;}const _0x9b00a8=inspectCliConfigJsonFile(_0x51a5f7);if(_0x9b00a8[_0x382240(0xf6)]==='ok')console[_0x382240(0xe7)]('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xd5)](_0x382240(0xf5)));else{if(_0x9b00a8['status']===_0x382240(0xed))console[_0x382240(0xe7)]('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0x106)](_0x382240(0xfd)));else _0x9b00a8[_0x382240(0xf6)]==='missing'?console[_0x382240(0xe7)]('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc0)](_0x382240(0xde))):(console['log']('\x20\x20'+_0x42adee[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc3)](_0x382240(0xe3))),console['log']('\x20\x20'+''[_0x382240(0xc6)](0x11)+'\x20'+a29_0x28f494[_0x382240(0xc3)](_0x9b00a8[_0x382240(0xfb)])));}};_0x368041('Global',_0x1890a0),_0x368041('Project',_0x5852fe),console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xcb))),console['log'](a29_0x28f494['gray'](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e))),console['log'](_0x279af1(0xef)+(_0x5c1f4d[_0x279af1(0x100)]||a29_0x28f494[_0x279af1(0xc3)](_0x279af1(0xff)))),console['log'](_0x279af1(0x102)+_0x5c1f4d['env']);const _0x5064ad=isLegacyCompatConfigKey(_0x279af1(0xc9))?a29_0x28f494[_0x279af1(0xc0)](_0x5c1f4d[_0x279af1(0xc9)]+'\x20(legacy/compat\x20only)'):_0x5c1f4d['locale'];console[_0x279af1(0xe7)](_0x279af1(0xd7)+_0x5064ad),console['log'](_0x279af1(0xc5)+(_0x5c1f4d[_0x279af1(0xb8)]||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xd3)))),console[_0x279af1(0xe7)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x5c1f4d[_0x279af1(0xb9)]||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xd3)))),console[_0x279af1(0xe7)](_0x279af1(0xfa)+(_0x5c1f4d[_0x279af1(0xf7)]||a29_0x28f494[_0x279af1(0xc0)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x279af1(0xf7)]+')'))),console[_0x279af1(0xe7)](_0x279af1(0x108)+(_0x5c1f4d[_0x279af1(0x103)]??a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xbb)))),console['log'](_0x279af1(0xe5)+_0x5c1f4d['riskLevel']),console[_0x279af1(0xe7)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5c1f4d['verbose']),console[_0x279af1(0xe7)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x279af1(0xf3)]),console[_0x279af1(0xe7)](_0x279af1(0xc2)+(_0x5c1f4d['accessKey']?a29_0x28f494[_0x279af1(0xd5)](_0x279af1(0xd9)+_0x5c1f4d[_0x279af1(0xe1)][_0x279af1(0xd8)]+')'):a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xd3)))),console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xdf))),console['log'](a29_0x28f494[_0x279af1(0xc0)]('\x20\x20─'['repeat'](0x1e))),console['log'](_0x279af1(0xc7)+getApiDomain()),console[_0x279af1(0xe7)](_0x279af1(0xbe)+getUserDomain()),console[_0x279af1(0xe7)](_0x279af1(0xe0)+getRuntimeDomain()),console['log'](),console[_0x279af1(0xe7)](a29_0x28f494['bold']('\x20\x20Service\x20Tree')),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xbd)[_0x279af1(0x101)](0x1e)));const _0xe3b7be=inspectServiceRegistry();console['log'](_0x279af1(0xe4)+_0xe3b7be[_0x279af1(0xce)]),console[_0x279af1(0xe7)](_0x279af1(0xc8)+formatServiceRegistryStatus(_0xe3b7be)),console[_0x279af1(0xe7)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe3b7be['serviceCount']),console[_0x279af1(0xe7)]('\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe3b7be[_0x279af1(0xcc)]);for(const _0x1d681a of _0xe3b7be[_0x279af1(0xdc)]){console['log']('\x20\x20'+(_0x1d681a[_0x279af1(0xf9)]+':')['padEnd'](0x11)+'\x20'+(_0x1d681a[_0x279af1(0xfe)]||a29_0x28f494[_0x279af1(0xc0)](_0x279af1(0xcd)))+'\x20('+_0x1d681a[_0x279af1(0xcc)]+'\x20commands)'),console[_0x279af1(0xe7)]('\x20\x20'+''[_0x279af1(0xc6)](0x11)+'\x20Imported\x20from:\x20'+_0x1d681a[_0x279af1(0x105)][_0x279af1(0xd4)]);}return console[_0x279af1(0xe7)](),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc1)](_0x279af1(0xf0))),console[_0x279af1(0xe7)](a29_0x28f494[_0x279af1(0xc0)]('\x20\x20─'[_0x279af1(0x101)](0x1e))),console[_0x279af1(0xe7)](_0x279af1(0x107)+a29_0x28f494['green'](AUTH_MODE['ClientAk']+_0x279af1(0xbc))),console[_0x279af1(0xe7)](_0x279af1(0xc4)+a29_0x28f494['gray'](_0x279af1(0x104))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x2f35b4){const _0x4476ad=a29_0x76be;if(_0x2f35b4[_0x4476ad(0xf6)]==='ok')return a29_0x28f494['green'](_0x4476ad(0xec));if(_0x2f35b4[_0x4476ad(0xf6)]==='missing')return a29_0x28f494[_0x4476ad(0xc0)](_0x4476ad(0xea));if(_0x2f35b4[_0x4476ad(0xf6)]==='empty')return a29_0x28f494['yellow']('⚠\x20Empty');return a29_0x28f494['red']('✗\x20Invalid'+(_0x2f35b4[_0x4476ad(0xfb)]?':\x20'+_0x2f35b4['message']:''));}export const doctorDefinition={'service':a29_0x1860b0(0xe2),'command':a29_0x1860b0(0xca),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x5deeb1=a30_0x5712;(function(_0x5cb365,_0x1a92eb){const _0x5c4015=a30_0x5712,_0x1e4dd6=_0x5cb365();while(!![]){try{const _0x518702=parseInt(_0x5c4015(0x16f))/0x1*(parseInt(_0x5c4015(0x174))/0x2)+parseInt(_0x5c4015(0x191))/0x3+parseInt(_0x5c4015(0x187))/0x4*(parseInt(_0x5c4015(0x184))/0x5)+-parseInt(_0x5c4015(0x196))/0x6*(parseInt(_0x5c4015(0x18a))/0x7)+-parseInt(_0x5c4015(0x181))/0x8*(parseInt(_0x5c4015(0x17c))/0x9)+parseInt(_0x5c4015(0x18c))/0xa*(parseInt(_0x5c4015(0x16e))/0xb)+parseInt(_0x5c4015(0x190))/0xc*(-parseInt(_0x5c4015(0x177))/0xd);if(_0x518702===_0x1a92eb)break;else _0x1e4dd6['push'](_0x1e4dd6['shift']());}catch(_0x429c4d){_0x1e4dd6['push'](_0x1e4dd6['shift']());}}}(a30_0x2923,0x9803d));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a30_0x5712(_0x9c4383,_0x5ce269){_0x9c4383=_0x9c4383-0x16d;const _0x2923ed=a30_0x2923();let _0x5712a3=_0x2923ed[_0x9c4383];return _0x5712a3;}const FILE_FLAG={'name':'file','type':a30_0x5deeb1(0x171),'required':!![],'description':a30_0x5deeb1(0x176)},FILEPATH_FLAG={'name':a30_0x5deeb1(0x188),'type':a30_0x5deeb1(0x171),'required':!![],'description':a30_0x5deeb1(0x183)},DOWNLOAD_FLAG={'name':a30_0x5deeb1(0x185),'type':a30_0x5deeb1(0x193),'description':a30_0x5deeb1(0x17d)},LONG_TERM_FLAG={'name':a30_0x5deeb1(0x178),'type':a30_0x5deeb1(0x193),'description':a30_0x5deeb1(0x16d)};function requireFilePath(_0x46c297){const _0x144930=a30_0x5deeb1,_0x3ae30e=_0x46c297['trim']();if(!_0x3ae30e)throw CliErrors[_0x144930(0x18d)]('filePath\x20is\x20required.');return _0x3ae30e;}function a30_0x2923(){const _0x2322fa=['upload','24TrfmMd','2134509awHymX','str','boolean','filePath','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','30SmtBSu','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','55wtcCUq','2315TlvJvx','File','string','read','bool','614mVITiH','description','Path\x20to\x20the\x20local\x20file\x20to\x20upload','11012066zyDWuQ','long-term','Preview:\x20upload\x20','body','Uploaded\x20file:\x20','2746602UoxBEB','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','/client/uploadFile','\x20to\x20runtime\x20app\x20','build','8xLdBxq','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','1719985JMinDV','download','appCode','4WDnhWM','filepath','file','149205rwUHbN','path','1924730vRPOFk','validation','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references'];a30_0x2923=function(){return _0x2322fa;};return a30_0x2923();}const fileUpload={'service':a30_0x5deeb1(0x189),'command':a30_0x5deeb1(0x18f),'description':a30_0x5deeb1(0x18e),'risk':a30_0x5deeb1(0x172),'flags':[FILE_FLAG],async 'dryRun'(_0xb7f02f){const _0x22e9cf=a30_0x5deeb1,_0x5bce80=requireRuntimeUploadFile(_0xb7f02f[_0x22e9cf(0x192)](_0x22e9cf(0x189)),_0x22e9cf(0x170));return dryRun('POST',_0x22e9cf(0x17e))[_0x22e9cf(0x17a)]({'appCode':_0xb7f02f[_0x22e9cf(0x186)],'multipart':{'file':_0x5bce80}})[_0x22e9cf(0x175)](_0x22e9cf(0x179)+_0x5bce80[_0x22e9cf(0x18b)]+_0x22e9cf(0x17f)+_0xb7f02f[_0x22e9cf(0x186)])[_0x22e9cf(0x180)]();},async 'execute'(_0x327fbb){const _0x336de2=a30_0x5deeb1,_0x4b1ce1=requireRuntimeUploadFile(_0x327fbb[_0x336de2(0x192)](_0x336de2(0x189)),_0x336de2(0x170)),_0x14b1b5=await uploadRuntimeFile(_0x327fbb[_0x336de2(0x186)],_0x4b1ce1[_0x336de2(0x18b)]);return{'ok':!![],'data':_0x14b1b5,'message':_0x14b1b5[_0x336de2(0x194)]?_0x336de2(0x17b)+_0x14b1b5[_0x336de2(0x194)]+_0x336de2(0x195):'Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.'};}},fileQueryUrl={'service':a30_0x5deeb1(0x189),'command':'query-url','description':a30_0x5deeb1(0x182),'risk':a30_0x5deeb1(0x172),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x23821e){const _0x2918ee=a30_0x5deeb1,_0x3dbe51=requireFilePath(_0x23821e[_0x2918ee(0x192)](_0x2918ee(0x188))),_0x74ac1c=await queryRuntimeFileUrl(_0x3dbe51,{'download':_0x23821e[_0x2918ee(0x173)](_0x2918ee(0x185)),'longTerm':_0x23821e['bool'](_0x2918ee(0x178))});return{'ok':!![],'data':_0x74ac1c};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x5b216f=a30_0x42d8;(function(_0x3c09ff,_0x1cb7ae){const _0xffcfc5=a30_0x42d8,_0x81fa6a=_0x3c09ff();while(!![]){try{const _0x1d7ea0=-parseInt(_0xffcfc5(0xf8))/0x1*(parseInt(_0xffcfc5(0xfe))/0x2)+-parseInt(_0xffcfc5(0xff))/0x3*(parseInt(_0xffcfc5(0x109))/0x4)+parseInt(_0xffcfc5(0xf0))/0x5*(-parseInt(_0xffcfc5(0xee))/0x6)+parseInt(_0xffcfc5(0x103))/0x7*(parseInt(_0xffcfc5(0xfd))/0x8)+parseInt(_0xffcfc5(0xe8))/0x9+-parseInt(_0xffcfc5(0xe9))/0xa*(-parseInt(_0xffcfc5(0x104))/0xb)+parseInt(_0xffcfc5(0x108))/0xc;if(_0x1d7ea0===_0x1cb7ae)break;else _0x81fa6a['push'](_0x81fa6a['shift']());}catch(_0x79c366){_0x81fa6a['push'](_0x81fa6a['shift']());}}}(a30_0x180d,0xece9c));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a30_0x42d8(_0x56c87e,_0x559aa5){_0x56c87e=_0x56c87e-0xe7;const _0x180da9=a30_0x180d();let _0x42d8f0=_0x180da9[_0x56c87e];return _0x42d8f0;}import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x180d(){const _0x2efd3d=['filePath\x20is\x20required.','filepath','appCode','613aSEEna','read','boolean','filePath','long-term','2134312pRUHxp','5210dVmAUH','47913DLNffL','bool','query-url','body','49IDXRuC','19030RJwoFQ','/client/uploadFile','download','Preview:\x20upload\x20','3449736GJxsXs','320kKVVBG','string','POST','path','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','validation','9880434VbBqKX','9020LTbjcf','Uploaded\x20file:\x20','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','File','trim','276vXKBzP','file','105255WwQpDV','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','description','str'];a30_0x180d=function(){return _0x2efd3d;};return a30_0x180d();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x5b216f(0xef),'type':a30_0x5b216f(0x10a),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a30_0x5b216f(0x10a),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x5b216f(0x106),'type':a30_0x5b216f(0xfa),'description':a30_0x5b216f(0xeb)},LONG_TERM_FLAG={'name':a30_0x5b216f(0xfc),'type':a30_0x5b216f(0xfa),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x277211){const _0x5b76f8=a30_0x5b216f,_0x317795=_0x277211[_0x5b76f8(0xed)]();if(!_0x317795)throw CliErrors[_0x5b76f8(0xe7)](_0x5b76f8(0xf5));return _0x317795;}const fileUpload={'service':a30_0x5b216f(0xef),'command':'upload','description':a30_0x5b216f(0xf2),'risk':a30_0x5b216f(0xf9),'flags':[FILE_FLAG],async 'dryRun'(_0x49d26c){const _0x19ab72=a30_0x5b216f,_0x1ace8b=requireRuntimeUploadFile(_0x49d26c['str']('file'),_0x19ab72(0xec));return dryRun(_0x19ab72(0x10b),_0x19ab72(0x105))[_0x19ab72(0x102)]({'appCode':_0x49d26c[_0x19ab72(0xf7)],'multipart':{'file':_0x1ace8b}})[_0x19ab72(0xf3)](_0x19ab72(0x107)+_0x1ace8b[_0x19ab72(0x10c)]+'\x20to\x20runtime\x20app\x20'+_0x49d26c[_0x19ab72(0xf7)])['build']();},async 'execute'(_0x165c56){const _0x226b82=a30_0x5b216f,_0xf21de0=requireRuntimeUploadFile(_0x165c56[_0x226b82(0xf4)](_0x226b82(0xef)),_0x226b82(0xec)),_0x179bee=await uploadRuntimeFile(_0x165c56[_0x226b82(0xf7)],_0xf21de0[_0x226b82(0x10c)]);return{'ok':!![],'data':_0x179bee,'message':_0x179bee[_0x226b82(0xfb)]?_0x226b82(0xea)+_0x179bee['filePath']+_0x226b82(0x10d):_0x226b82(0xf1)};}},fileQueryUrl={'service':a30_0x5b216f(0xef),'command':a30_0x5b216f(0x101),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x5b216f(0xf9),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x241604){const _0x4289be=a30_0x5b216f,_0x2edbe8=requireFilePath(_0x241604['str'](_0x4289be(0xf6))),_0x3177df=await queryRuntimeFileUrl(_0x2edbe8,{'download':_0x241604[_0x4289be(0x100)]('download'),'longTerm':_0x241604[_0x4289be(0x100)](_0x4289be(0xfc))});return{'ok':!![],'data':_0x3177df};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x4966d7=a31_0xb6a6;(function(_0x3e05f0,_0x28983f){const _0x57721b=a31_0xb6a6,_0x5294eb=_0x3e05f0();while(!![]){try{const _0x1ccc37=parseInt(_0x57721b(0x1ba))/0x1+-parseInt(_0x57721b(0x182))/0x2+-parseInt(_0x57721b(0x1b3))/0x3*(-parseInt(_0x57721b(0x1a2))/0x4)+-parseInt(_0x57721b(0x184))/0x5+parseInt(_0x57721b(0x198))/0x6+parseInt(_0x57721b(0x186))/0x7*(parseInt(_0x57721b(0x18a))/0x8)+-parseInt(_0x57721b(0x1ae))/0x9;if(_0x1ccc37===_0x28983f)break;else _0x5294eb['push'](_0x5294eb['shift']());}catch(_0x9b45c8){_0x5294eb['push'](_0x5294eb['shift']());}}}(a31_0x1dac,0x9c413));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';function a31_0xb6a6(_0x415d13,_0x7822ec){_0x415d13=_0x415d13-0x180;const _0x1dac85=a31_0x1dac();let _0xb6a6b9=_0x1dac85[_0x415d13];return _0xb6a6b9;}import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x4966d7(0x19d),'type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x199)},{'name':a31_0x4966d7(0x1bf),'type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x1b1)+DEFAULT_CONFIG_VALUES[a31_0x4966d7(0x1bf)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a31_0x4966d7(0x19c),'description':a31_0x4966d7(0x18c)+PRODUCT_CONFIG[a31_0x4966d7(0x196)]+a31_0x4966d7(0x191),'default':![]},{'name':a31_0x4966d7(0x1ad),'type':a31_0x4966d7(0x19c),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];function a31_0x1dac(){const _0x4d37d2=['riskLevel','6741600sTqxrz','App\x20code\x20for\x20the\x20project','AbortPrompt','join','boolean','appcode','question','\x20\x20config:\x20\x20','utf8','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','4ogkxzo','defaultApp','\x20\x20env:\x20\x20\x20\x20\x20','log','once','[y/N]','message','app','close','validation','global','yes','1048500pGvqOK','parse','race','Target\x20environment\x20(default\x20','Skip\x20confirmation\x20when\x20overwriting','2565546LOfrFG','\x20\x20appcode:\x20','Usage:\x20','file','User\x20aborted\x20prompt','trim','name','143752iRcpTW','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`.','cancelled','\x22.\x20Allowed:\x20','\x20\x20default:\x20','env','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Imported\x20from\x20','toLowerCase','Initialized\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','stdout','\x20already\x20exists.\x20Overwrite?','2324490FOncrd','stdin','2208475hOCyZX','apiDir','175BXjKki','object','Invalid\x20env\x20\x22','App\x20code\x20cannot\x20be\x20empty.','76136ZAxoRB','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/','flagMissing','string','Override\x20imported\x20default\x20env','Override\x20imported\x20default\x20appcode',')\x20instead\x20of\x20project','removeListener','SIGINT','project','):\x20','newConfigFileName'];a31_0x1dac=function(){return _0x4d37d2;};return a31_0x1dac();}export const initImportFlagDefs=[{'name':a31_0x4966d7(0x1b6),'type':a31_0x4966d7(0x18e),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x4966d7(0x19d),'type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x190)},{'name':'env','type':a31_0x4966d7(0x18e),'description':a31_0x4966d7(0x18f),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a31_0x4966d7(0x18c)+PRODUCT_CONFIG[a31_0x4966d7(0x196)]+a31_0x4966d7(0x191),'default':![]},{'name':'yes','type':'boolean','description':a31_0x4966d7(0x1b2),'default':![]}];export async function runInit(_0x80feeb){const _0x6bf84a=a31_0x4966d7,_0x1411ec=isNonInteractiveMode(_0x80feeb),_0x44c2ba=_0x80feeb['global']?_0x6bf84a(0x1ac):_0x6bf84a(0x194),_0x581f8a=resolveWriteConfigPath(_0x44c2ba);try{_0x1411ec?await runNonInteractive(_0x80feeb,_0x581f8a):await runInteractive(_0x80feeb,_0x581f8a);}catch(_0x46ce6c){if(_0x46ce6c instanceof AbortPrompt)throw CliErrors[_0x6bf84a(0x1bc)]();throw _0x46ce6c;}}export async function runInitImport(_0xedcca){const _0x3a0abe=a31_0x4966d7,_0x13e93c=_0xedcca[_0x3a0abe(0x1ac)]?_0x3a0abe(0x1ac):_0x3a0abe(0x194),_0x2e9501=resolveWriteConfigPath(_0x13e93c);await runFromImport(_0xedcca,_0x2e9501);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x4966d7(0x185)]);async function runFromImport(_0x29dea6,_0x59cadd){const _0x5ce5ed=a31_0x4966d7,_0x11647f=resolveFilePath(_0x29dea6[_0x5ce5ed(0x1b6)]);if(!existsSync(_0x11647f))throw CliErrors[_0x5ce5ed(0x1ab)]('Source\x20file\x20not\x20found:\x20'+_0x11647f);const _0x592bde=readSourceFile(_0x11647f),_0xd7f8cd=convertToRuntimeConfig(_0x592bde);_0x29dea6['appcode']&&(_0xd7f8cd['appcode']=String(_0x29dea6['appcode']));_0x29dea6[_0x5ce5ed(0x1bf)]&&(_0xd7f8cd[_0x5ce5ed(0x1bf)]=resolveInitEnv(_0x29dea6));if(!_0xd7f8cd[_0x5ce5ed(0x19d)])throw CliErrors[_0x5ce5ed(0x1ab)](_0x5ce5ed(0x1c4),_0x5ce5ed(0x1bb));await writeInitConfig(_0x59cadd,_0xd7f8cd,_0x29dea6),console[_0x5ce5ed(0x1a5)](_0x5ce5ed(0x1c1)+_0x11647f),console[_0x5ce5ed(0x1a5)](_0x5ce5ed(0x19f)+_0x59cadd),console[_0x5ce5ed(0x1a5)](_0x5ce5ed(0x1b4)+_0xd7f8cd[_0x5ce5ed(0x19d)]);if(_0xd7f8cd['defaultApp'])console['log'](_0x5ce5ed(0x1be)+_0xd7f8cd[_0x5ce5ed(0x1a3)]);}function convertToRuntimeConfig(_0x4cafb3){const _0x2f7abf=a31_0x4966d7;if(_0x4cafb3['apps']&&typeof _0x4cafb3['apps']===_0x2f7abf(0x187))throw CliErrors[_0x2f7abf(0x1ab)](_0x2f7abf(0x1c0),_0x2f7abf(0x1a1));const _0x3bc0cb={};for(const _0x28725b of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x4cafb3[_0x28725b]!==undefined&&(_0x3bc0cb[_0x28725b]=_0x4cafb3[_0x28725b]);}return!_0x3bc0cb['riskLevel']&&(_0x3bc0cb[_0x2f7abf(0x197)]=DEFAULT_CONFIG_VALUES[_0x2f7abf(0x197)]),_0x3bc0cb;}async function runNonInteractive(_0x5d4543,_0x2e8883){const _0x2b0ed4=a31_0x4966d7,_0x235ca9=_0x5d4543[_0x2b0ed4(0x19d)];if(!_0x235ca9)throw CliErrors[_0x2b0ed4(0x18d)]('appcode',_0x2b0ed4(0x1b5)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x518154=resolveInitEnv(_0x5d4543);await writeInitConfig(_0x2e8883,{'appcode':_0x235ca9,'env':_0x518154},_0x5d4543),console[_0x2b0ed4(0x1a5)](_0x2b0ed4(0x1c3)+_0x2e8883),console[_0x2b0ed4(0x1a5)](_0x2b0ed4(0x1b4)+_0x235ca9),console[_0x2b0ed4(0x1a5)](_0x2b0ed4(0x1a4)+_0x518154);}async function runInteractive(_0x106686,_0x2a8650){const _0x36bf6c=a31_0x4966d7,_0x22dcc0=loadExisting(_0x2a8650),_0x1a58d3=typeof _0x22dcc0?.[_0x36bf6c(0x19d)]===_0x36bf6c(0x18e)?_0x22dcc0[_0x36bf6c(0x19d)]:'',_0x35b557=resolveInitEnv(_0x106686);console[_0x36bf6c(0x1a5)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x36bf6c(0x196)]+'\x0a');if(existsSync(_0x2a8650)&&!_0x106686['yes']){const _0x5d9180=await promptYesNo('File\x20'+_0x2a8650+_0x36bf6c(0x181),![]);if(!_0x5d9180){console[_0x36bf6c(0x1a5)]('Aborted.');return;}}const _0x1d48b0=typeof _0x106686[_0x36bf6c(0x19d)]==='string'?_0x106686[_0x36bf6c(0x19d)]['trim']():'';let _0x1f5be5=_0x1d48b0;!_0x1f5be5&&(_0x1f5be5=await promptInput('App\x20code',_0x1a58d3));if(!_0x1f5be5[_0x36bf6c(0x1b8)]())throw CliErrors[_0x36bf6c(0x1ab)](_0x36bf6c(0x189));await writeInitConfig(_0x2a8650,{'appcode':_0x1f5be5[_0x36bf6c(0x1b8)](),'env':_0x35b557},_0x106686),console[_0x36bf6c(0x1a5)]('\x0aInitialized\x20'+_0x2a8650),console['log'](_0x36bf6c(0x1b4)+_0x1f5be5[_0x36bf6c(0x1b8)]()),console[_0x36bf6c(0x1a5)](_0x36bf6c(0x1a4)+_0x35b557);}async function writeInitConfig(_0x1cdeb9,_0x16e26b,_0x70980e){const _0x372183=a31_0x4966d7;let _0x26148a={};existsSync(_0x1cdeb9)&&!_0x70980e[_0x372183(0x1ad)]&&(_0x26148a=readConfigFile(_0x1cdeb9));for(const [_0x461c07,_0xec5ef9]of Object['entries'](_0x16e26b)){_0xec5ef9!==undefined&&(_0x26148a[_0x461c07]=_0xec5ef9);}if(_0x26148a[_0x372183(0x1a9)])delete _0x26148a[_0x372183(0x1a9)];writeConfigFile(_0x1cdeb9,_0x26148a);}class AbortPrompt extends Error{constructor(){const _0x370ec4=a31_0x4966d7;super(_0x370ec4(0x1b7)),this[_0x370ec4(0x1b9)]=_0x370ec4(0x19a);}}function createSafeRl(){const _0x38e964=a31_0x4966d7,_0xbada0d=createInterface({'input':process[_0x38e964(0x183)],'output':process[_0x38e964(0x180)]});let _0x4cbcae;const _0x214afa=new Promise((_0x31e029,_0x14257c)=>{const _0x4b10e8=_0x38e964;_0x4cbcae=()=>{const _0x3eb432=a31_0xb6a6;_0x4cbcae&&(_0xbada0d['removeListener'](_0x3eb432(0x193),_0x4cbcae),_0x4cbcae=undefined);try{_0xbada0d[_0x3eb432(0x1aa)]();}catch{}_0x14257c(new AbortPrompt());},_0xbada0d[_0x4b10e8(0x1a6)]('SIGINT',_0x4cbcae);}),_0x331487=()=>{const _0x4a8d9d=_0x38e964;_0x4cbcae&&(_0xbada0d[_0x4a8d9d(0x192)](_0x4a8d9d(0x193),_0x4cbcae),_0x4cbcae=undefined);try{_0xbada0d[_0x4a8d9d(0x1aa)]();}catch{}};return{'rl':_0xbada0d,'abortPromise':_0x214afa,'disposeSuccess':_0x331487};}async function promptInput(_0x5a3e0e,_0x370f37){const _0x59cce5=a31_0x4966d7,{rl:_0x440bee,abortPromise:_0x5b3848,disposeSuccess:_0x3aa25a}=createSafeRl(),_0x106cdf=new Promise(_0x5ef27e=>{const _0x4d3177=a31_0xb6a6,_0x5f2455=_0x370f37?'\x20\x20'+_0x5a3e0e+'\x20('+_0x370f37+_0x4d3177(0x195):'\x20\x20'+_0x5a3e0e+':\x20';_0x440bee['question'](_0x5f2455,_0x377a56=>{const _0x4bd536=_0x4d3177;_0x3aa25a(),_0x5ef27e(_0x377a56[_0x4bd536(0x1b8)]()||_0x370f37);});});return Promise[_0x59cce5(0x1b0)]([_0x106cdf,_0x5b3848]);}async function promptYesNo(_0x593e5e,_0x3485ba){const _0x3a64bb=a31_0x4966d7,{rl:_0x5b5cee,abortPromise:_0xc43c77,disposeSuccess:_0x41a854}=createSafeRl(),_0x23bbf0=new Promise(_0x245b86=>{const _0x240fb0=a31_0xb6a6,_0x4bef16=_0x3485ba?'[Y/n]':_0x240fb0(0x1a7);_0x5b5cee[_0x240fb0(0x19e)]('\x20\x20'+_0x593e5e+'\x20'+_0x4bef16+':\x20',_0x16a14f=>{const _0x2f02c1=_0x240fb0;_0x41a854();const _0x457715=_0x16a14f[_0x2f02c1(0x1b8)]()[_0x2f02c1(0x1c2)]();if(_0x457715==='y'||_0x457715===_0x2f02c1(0x1ad))_0x245b86(!![]);else{if(_0x457715==='n'||_0x457715==='no')_0x245b86(![]);else _0x245b86(_0x3485ba);}});});return Promise[_0x3a64bb(0x1b0)]([_0x23bbf0,_0xc43c77]);}function loadExisting(_0x446549){if(!existsSync(_0x446549))return null;return readConfigFile(_0x446549);}function resolveFilePath(_0x57db9f){return isAbsolute(_0x57db9f)?_0x57db9f:resolve(process['cwd'](),_0x57db9f);}function readSourceFile(_0xb103bb){const _0xa3f96b=a31_0x4966d7;try{const _0x1b44df=readFileSync(_0xb103bb,{'encoding':_0xa3f96b(0x1a0)});return JSON[_0xa3f96b(0x1af)](_0x1b44df);}catch(_0x401d6e){throw CliErrors[_0xa3f96b(0x1ab)](_0xa3f96b(0x18b)+_0x401d6e[_0xa3f96b(0x1a8)]);}}function resolveInitEnv(_0x5e3632){const _0x232216=a31_0x4966d7,_0x53135c=_0x5e3632[_0x232216(0x1bf)];if(_0x53135c===undefined||_0x53135c==='')return DEFAULT_CONFIG_VALUES[_0x232216(0x1bf)];if(!RUNTIME_ENV_VALUES['includes'](_0x53135c))throw CliErrors[_0x232216(0x1ab)](_0x232216(0x188)+_0x53135c+_0x232216(0x1bd)+RUNTIME_ENV_VALUES[_0x232216(0x19b)](',\x20'));return _0x53135c;}
1
+ const a31_0x3a8ef3=a31_0x1be3;(function(_0x5f2d83,_0x44cf2b){const _0x5bf348=a31_0x1be3,_0xe97893=_0x5f2d83();while(!![]){try{const _0x46cee2=parseInt(_0x5bf348(0x196))/0x1+parseInt(_0x5bf348(0x18c))/0x2*(parseInt(_0x5bf348(0x180))/0x3)+parseInt(_0x5bf348(0x1a0))/0x4*(-parseInt(_0x5bf348(0x18a))/0x5)+parseInt(_0x5bf348(0x181))/0x6+-parseInt(_0x5bf348(0x19c))/0x7*(-parseInt(_0x5bf348(0x19b))/0x8)+parseInt(_0x5bf348(0x179))/0x9*(-parseInt(_0x5bf348(0x198))/0xa)+-parseInt(_0x5bf348(0x188))/0xb;if(_0x46cee2===_0x44cf2b)break;else _0xe97893['push'](_0xe97893['shift']());}catch(_0x3cb5fa){_0xe97893['push'](_0xe97893['shift']());}}}(a31_0x38de,0xa1c27));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x3a8ef3(0x19e),'type':a31_0x3a8ef3(0x176),'description':'App\x20code\x20for\x20the\x20project'},{'name':'env','type':a31_0x3a8ef3(0x176),'description':a31_0x3a8ef3(0x17a)+DEFAULT_CONFIG_VALUES[a31_0x3a8ef3(0x18b)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x3a8ef3(0x1aa),'type':'boolean','description':a31_0x3a8ef3(0x191)+PRODUCT_CONFIG[a31_0x3a8ef3(0x1b5)]+a31_0x3a8ef3(0x17b),'default':![]},{'name':a31_0x3a8ef3(0x199),'type':a31_0x3a8ef3(0x1a1),'description':a31_0x3a8ef3(0x193),'default':![]}];export const initImportFlagDefs=[{'name':a31_0x3a8ef3(0x17c),'type':a31_0x3a8ef3(0x176),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x3a8ef3(0x19e),'type':a31_0x3a8ef3(0x176),'description':'Override\x20imported\x20default\x20appcode'},{'name':a31_0x3a8ef3(0x18b),'type':a31_0x3a8ef3(0x176),'description':a31_0x3a8ef3(0x1ad),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x3a8ef3(0x1aa),'type':a31_0x3a8ef3(0x1a1),'description':a31_0x3a8ef3(0x191)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':a31_0x3a8ef3(0x1a1),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x5197ee){const _0x3fb286=a31_0x3a8ef3,_0x26e7b2=isNonInteractiveMode(_0x5197ee),_0x67a02d=_0x5197ee[_0x3fb286(0x1aa)]?'global':_0x3fb286(0x1ac),_0x58abd2=resolveWriteConfigPath(_0x67a02d);try{_0x26e7b2?await runNonInteractive(_0x5197ee,_0x58abd2):await runInteractive(_0x5197ee,_0x58abd2);}catch(_0x5db55a){if(_0x5db55a instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x5db55a;}}export async function runInitImport(_0x2fec1c){const _0x262670=a31_0x3a8ef3,_0x2d8f19=_0x2fec1c[_0x262670(0x1aa)]?_0x262670(0x1aa):_0x262670(0x1ac),_0x326896=resolveWriteConfigPath(_0x2d8f19);await runFromImport(_0x2fec1c,_0x326896);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x3a8ef3(0x1b7)]);async function runFromImport(_0x1d3ce5,_0x124aff){const _0x543712=a31_0x3a8ef3,_0x5ec32a=resolveFilePath(_0x1d3ce5[_0x543712(0x17c)]);if(!existsSync(_0x5ec32a))throw CliErrors[_0x543712(0x195)](_0x543712(0x192)+_0x5ec32a);const _0x4a7305=readSourceFile(_0x5ec32a),_0x47a370=convertToRuntimeConfig(_0x4a7305);_0x1d3ce5[_0x543712(0x19e)]&&(_0x47a370[_0x543712(0x19e)]=String(_0x1d3ce5[_0x543712(0x19e)]));_0x1d3ce5[_0x543712(0x18b)]&&(_0x47a370['env']=resolveInitEnv(_0x1d3ce5));if(!_0x47a370[_0x543712(0x19e)])throw CliErrors[_0x543712(0x195)](_0x543712(0x18e),_0x543712(0x1ba));await writeInitConfig(_0x124aff,_0x47a370,_0x1d3ce5),console[_0x543712(0x194)]('Imported\x20from\x20'+_0x5ec32a),console[_0x543712(0x194)]('\x20\x20config:\x20\x20'+_0x124aff),console['log'](_0x543712(0x1a4)+_0x47a370[_0x543712(0x19e)]);if(_0x47a370['defaultApp'])console[_0x543712(0x194)](_0x543712(0x17e)+_0x47a370['defaultApp']);}function convertToRuntimeConfig(_0x1ba554){const _0x197c34=a31_0x3a8ef3;if(_0x1ba554[_0x197c34(0x197)]&&typeof _0x1ba554[_0x197c34(0x197)]===_0x197c34(0x1a6))throw CliErrors[_0x197c34(0x195)](_0x197c34(0x1a5),_0x197c34(0x1bb));const _0x65504d={};for(const _0x321c2c of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1ba554[_0x321c2c]!==undefined&&(_0x65504d[_0x321c2c]=_0x1ba554[_0x321c2c]);}return!_0x65504d['riskLevel']&&(_0x65504d[_0x197c34(0x1b6)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x65504d;}async function runNonInteractive(_0x2f835f,_0x2cf387){const _0x233ac5=a31_0x3a8ef3,_0x3b53f6=_0x2f835f['appcode'];if(!_0x3b53f6)throw CliErrors[_0x233ac5(0x184)](_0x233ac5(0x19e),_0x233ac5(0x1ae)+CLI_BIN_NAME+_0x233ac5(0x189));const _0x55aa9e=resolveInitEnv(_0x2f835f);await writeInitConfig(_0x2cf387,{'appcode':_0x3b53f6,'env':_0x55aa9e},_0x2f835f),console[_0x233ac5(0x194)](_0x233ac5(0x187)+_0x2cf387),console[_0x233ac5(0x194)](_0x233ac5(0x1a4)+_0x3b53f6),console[_0x233ac5(0x194)](_0x233ac5(0x18d)+_0x55aa9e);}function a31_0x1be3(_0x442904,_0x4a56fe){_0x442904=_0x442904-0x176;const _0x38de47=a31_0x38de();let _0x1be3c8=_0x38de47[_0x442904];return _0x1be3c8;}function a31_0x38de(){const _0x562a60=['Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','object','Invalid\x20env\x20\x22','\x20already\x20exists.\x20Overwrite?','):\x20','global','trim','project','Override\x20imported\x20default\x20env','Usage:\x20','[y/N]','utf8','stdout','once','\x20init\x20—\x20Create\x20','[Y/n]','newConfigFileName','riskLevel','apiDir','close','\x22.\x20Allowed:\x20','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`.','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','File\x20','string','App\x20code\x20cannot\x20be\x20empty.','parse','9lZnOIg','Target\x20environment\x20(default\x20',')\x20instead\x20of\x20project','file','app','\x20\x20default:\x20','SIGINT','814221VUAVFh','7321710ANkOJi','question','AbortPrompt','flagMissing','toLowerCase','removeListener','Initialized\x20','2444860iEvMUM','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','155oavUWV','env','2KfhHyc','\x20\x20env:\x20\x20\x20\x20\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','cwd','race','Write\x20to\x20global\x20(~/','Source\x20file\x20not\x20found:\x20','Skip\x20confirmation\x20when\x20overwriting','log','validation','686848DnTYaO','apps','13023330wYKLXf','yes','User\x20aborted\x20prompt','14312kajGkA','119GPkBII','join','appcode','Aborted.','2812GaoXif','boolean','entries','includes','\x20\x20appcode:\x20'];a31_0x38de=function(){return _0x562a60;};return a31_0x38de();}async function runInteractive(_0x4160d1,_0x475142){const _0x208ae2=a31_0x3a8ef3,_0x4e5236=loadExisting(_0x475142),_0x4f23c3=typeof _0x4e5236?.[_0x208ae2(0x19e)]===_0x208ae2(0x176)?_0x4e5236[_0x208ae2(0x19e)]:'',_0x140663=resolveInitEnv(_0x4160d1);console[_0x208ae2(0x194)](CLI_BIN_NAME+_0x208ae2(0x1b3)+PRODUCT_CONFIG[_0x208ae2(0x1b5)]+'\x0a');if(existsSync(_0x475142)&&!_0x4160d1[_0x208ae2(0x199)]){const _0xd8fc57=await promptYesNo(_0x208ae2(0x1bc)+_0x475142+_0x208ae2(0x1a8),![]);if(!_0xd8fc57){console['log'](_0x208ae2(0x19f));return;}}const _0x3f429d=typeof _0x4160d1[_0x208ae2(0x19e)]===_0x208ae2(0x176)?_0x4160d1['appcode'][_0x208ae2(0x1ab)]():'';let _0x1ded02=_0x3f429d;!_0x1ded02&&(_0x1ded02=await promptInput('App\x20code',_0x4f23c3));if(!_0x1ded02[_0x208ae2(0x1ab)]())throw CliErrors[_0x208ae2(0x195)](_0x208ae2(0x177));await writeInitConfig(_0x475142,{'appcode':_0x1ded02[_0x208ae2(0x1ab)](),'env':_0x140663},_0x4160d1),console[_0x208ae2(0x194)]('\x0aInitialized\x20'+_0x475142),console[_0x208ae2(0x194)](_0x208ae2(0x1a4)+_0x1ded02[_0x208ae2(0x1ab)]()),console[_0x208ae2(0x194)](_0x208ae2(0x18d)+_0x140663);}async function writeInitConfig(_0x263ebd,_0x17eafe,_0x4d9f06){const _0x43505d=a31_0x3a8ef3;let _0x1a214c={};existsSync(_0x263ebd)&&!_0x4d9f06['yes']&&(_0x1a214c=readConfigFile(_0x263ebd));for(const [_0x597af9,_0x48e597]of Object[_0x43505d(0x1a2)](_0x17eafe)){_0x48e597!==undefined&&(_0x1a214c[_0x597af9]=_0x48e597);}if(_0x1a214c[_0x43505d(0x17d)])delete _0x1a214c['app'];writeConfigFile(_0x263ebd,_0x1a214c);}class AbortPrompt extends Error{constructor(){const _0xa1a4ff=a31_0x3a8ef3;super(_0xa1a4ff(0x19a)),this['name']=_0xa1a4ff(0x183);}}function createSafeRl(){const _0xdcfde0=a31_0x3a8ef3,_0x609b1=createInterface({'input':process['stdin'],'output':process[_0xdcfde0(0x1b1)]});let _0x4060bc;const _0x1c7133=new Promise((_0x11082c,_0x8610eb)=>{const _0x1b0e3f=_0xdcfde0;_0x4060bc=()=>{const _0x2d4b27=a31_0x1be3;_0x4060bc&&(_0x609b1[_0x2d4b27(0x186)]('SIGINT',_0x4060bc),_0x4060bc=undefined);try{_0x609b1[_0x2d4b27(0x1b8)]();}catch{}_0x8610eb(new AbortPrompt());},_0x609b1[_0x1b0e3f(0x1b2)](_0x1b0e3f(0x17f),_0x4060bc);}),_0x5687f4=()=>{const _0xcddfeb=_0xdcfde0;_0x4060bc&&(_0x609b1[_0xcddfeb(0x186)](_0xcddfeb(0x17f),_0x4060bc),_0x4060bc=undefined);try{_0x609b1[_0xcddfeb(0x1b8)]();}catch{}};return{'rl':_0x609b1,'abortPromise':_0x1c7133,'disposeSuccess':_0x5687f4};}async function promptInput(_0x25b5cd,_0x4e1b43){const {rl:_0x3f988e,abortPromise:_0x1f5f6e,disposeSuccess:_0x399be6}=createSafeRl(),_0x42db44=new Promise(_0x493336=>{const _0x434d20=a31_0x1be3,_0x583408=_0x4e1b43?'\x20\x20'+_0x25b5cd+'\x20('+_0x4e1b43+_0x434d20(0x1a9):'\x20\x20'+_0x25b5cd+':\x20';_0x3f988e[_0x434d20(0x182)](_0x583408,_0xffbea1=>{const _0x479e6c=_0x434d20;_0x399be6(),_0x493336(_0xffbea1[_0x479e6c(0x1ab)]()||_0x4e1b43);});});return Promise['race']([_0x42db44,_0x1f5f6e]);}async function promptYesNo(_0x48b2f9,_0x307826){const _0x2599d8=a31_0x3a8ef3,{rl:_0xfbcd98,abortPromise:_0x444338,disposeSuccess:_0x4b206d}=createSafeRl(),_0x5d99c7=new Promise(_0x336e87=>{const _0x3ffd3e=a31_0x1be3,_0x13bd73=_0x307826?_0x3ffd3e(0x1b4):_0x3ffd3e(0x1af);_0xfbcd98[_0x3ffd3e(0x182)]('\x20\x20'+_0x48b2f9+'\x20'+_0x13bd73+':\x20',_0x4b2c35=>{const _0x5343ab=_0x3ffd3e;_0x4b206d();const _0x4195cd=_0x4b2c35['trim']()[_0x5343ab(0x185)]();if(_0x4195cd==='y'||_0x4195cd===_0x5343ab(0x199))_0x336e87(!![]);else{if(_0x4195cd==='n'||_0x4195cd==='no')_0x336e87(![]);else _0x336e87(_0x307826);}});});return Promise[_0x2599d8(0x190)]([_0x5d99c7,_0x444338]);}function loadExisting(_0x34936e){if(!existsSync(_0x34936e))return null;return readConfigFile(_0x34936e);}function resolveFilePath(_0x60fa0a){const _0x417471=a31_0x3a8ef3;return isAbsolute(_0x60fa0a)?_0x60fa0a:resolve(process[_0x417471(0x18f)](),_0x60fa0a);}function readSourceFile(_0x1da7e1){const _0x2f63cf=a31_0x3a8ef3;try{const _0x358dab=readFileSync(_0x1da7e1,{'encoding':_0x2f63cf(0x1b0)});return JSON[_0x2f63cf(0x178)](_0x358dab);}catch(_0x4ed6cf){throw CliErrors[_0x2f63cf(0x195)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x4ed6cf['message']);}}function resolveInitEnv(_0x8cc834){const _0x29d919=a31_0x3a8ef3,_0x1b3989=_0x8cc834[_0x29d919(0x18b)];if(_0x1b3989===undefined||_0x1b3989==='')return DEFAULT_CONFIG_VALUES[_0x29d919(0x18b)];if(!RUNTIME_ENV_VALUES[_0x29d919(0x1a3)](_0x1b3989))throw CliErrors[_0x29d919(0x195)](_0x29d919(0x1a7)+_0x1b3989+_0x29d919(0x1b9)+RUNTIME_ENV_VALUES[_0x29d919(0x19d)](',\x20'));return _0x1b3989;}
@@ -1 +1 @@
1
- const a32_0x494a46=a32_0x2c76;(function(_0x27cbe7,_0x43457e){const _0x5eaeb0=a32_0x2c76,_0x4938ce=_0x27cbe7();while(!![]){try{const _0x43cd61=parseInt(_0x5eaeb0(0x1a3))/0x1+-parseInt(_0x5eaeb0(0x1d9))/0x2+-parseInt(_0x5eaeb0(0x19f))/0x3*(parseInt(_0x5eaeb0(0x1b0))/0x4)+-parseInt(_0x5eaeb0(0x1be))/0x5+-parseInt(_0x5eaeb0(0x1a7))/0x6*(-parseInt(_0x5eaeb0(0x1d5))/0x7)+parseInt(_0x5eaeb0(0x1bc))/0x8*(-parseInt(_0x5eaeb0(0x1cb))/0x9)+parseInt(_0x5eaeb0(0x1c0))/0xa*(parseInt(_0x5eaeb0(0x1d8))/0xb);if(_0x43cd61===_0x43457e)break;else _0x4938ce['push'](_0x4938ce['shift']());}catch(_0x4202a1){_0x4938ce['push'](_0x4938ce['shift']());}}}(a32_0x57e8,0x4a4bd));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':a32_0x494a46(0x1a4),'required':!![],'description':a32_0x494a46(0x1c8)},FILE_FLAG={'name':'file','type':a32_0x494a46(0x1a4),'required':!![],'description':a32_0x494a46(0x1bf)},QUERY_FLAG={'name':a32_0x494a46(0x1d7),'type':a32_0x494a46(0x1a4),'required':!![],'description':a32_0x494a46(0x1c5)},TOPK_FLAG={'name':a32_0x494a46(0x1aa),'type':a32_0x494a46(0x1ba),'description':a32_0x494a46(0x1d4)};function readKnowledgeFile(_0x367491){const _0x42e457=a32_0x494a46;if(!_0x367491)throw CliErrors[_0x42e457(0x1c4)](_0x42e457(0x1c7));if(!existsSync(_0x367491))throw CliErrors[_0x42e457(0x1c4)](_0x42e457(0x1d0)+_0x367491);if(!statSync(_0x367491)['isFile']())throw CliErrors['validation'](_0x42e457(0x1ad)+_0x367491);return readFileSync(_0x367491,_0x42e457(0x1ab));}function summarizePersonalItem(_0x2160ea){const _0x421fb1=a32_0x494a46;return{'id':_0x2160ea['id'],'title':_0x2160ea['title'],'version':_0x2160ea['version'],'ragStatus':_0x2160ea['ragStatus'],'ragErrorMessage':_0x2160ea[_0x421fb1(0x1c2)],'updateTime':_0x2160ea[_0x421fb1(0x19e)]};}function detailPersonalItem(_0x32de15){const _0x5cb12b=a32_0x494a46;return{'id':_0x32de15['id'],'appCode':_0x32de15[_0x5cb12b(0x1d2)],'scope':_0x32de15[_0x5cb12b(0x1b1)],'userId':_0x32de15[_0x5cb12b(0x1ae)],'title':_0x32de15['title'],'content':_0x32de15[_0x5cb12b(0x1af)]??'','version':_0x32de15[_0x5cb12b(0x1c1)],'ragStatus':_0x32de15[_0x5cb12b(0x1a6)],'ragErrorMessage':_0x32de15['ragErrorMessage'],'createTime':_0x32de15[_0x5cb12b(0x19b)],'updateTime':_0x32de15[_0x5cb12b(0x19e)]};}function summarizeSearchHit(_0x273b1a){const _0x3512dd=a32_0x494a46;return{'scope':_0x273b1a[_0x3512dd(0x1b1)],'title':_0x273b1a[_0x3512dd(0x1ca)],'docId':_0x273b1a[_0x3512dd(0x1cc)],'score':_0x273b1a[_0x3512dd(0x1cf)],'weightedScore':_0x273b1a[_0x3512dd(0x1b6)],'content':_0x273b1a[_0x3512dd(0x1af)],'metadata':_0x273b1a[_0x3512dd(0x1b2)]};}function readTopK(_0x46739c){const _0x5ed7a5=a32_0x494a46,_0x26025b=_0x46739c[_0x5ed7a5(0x1bb)]('topk');if(_0x26025b===undefined||_0x26025b===null||_0x26025b==='')return undefined;const _0x51c062=_0x46739c[_0x5ed7a5(0x1c6)](_0x5ed7a5(0x1aa));if(!Number[_0x5ed7a5(0x19d)](_0x51c062)||_0x51c062<0x1)throw CliErrors[_0x5ed7a5(0x1c4)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x51c062;}const kbList={'service':'kb','command':a32_0x494a46(0x1a5),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0xef97ec){const _0x45e51c=a32_0x494a46,_0x6c6a53=await listPersonalKnowledgeBaseItems(_0xef97ec['appCode']);if(_0xef97ec['bool'](_0x45e51c(0x1b7)))return{'ok':!![],'data':{'total':_0x6c6a53[_0x45e51c(0x1a1)],'items':_0x6c6a53}};return{'ok':!![],'data':{'total':_0x6c6a53[_0x45e51c(0x1a1)],'items':_0x6c6a53[_0x45e51c(0x1a0)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x494a46(0x1b8),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a32_0x494a46(0x1ac),'flags':[{...ID_FLAG,'description':a32_0x494a46(0x1d3)}],async 'execute'(_0x23354e){const _0x2150c5=a32_0x494a46,_0x123952=await getPersonalKnowledgeBaseItem(_0x23354e[_0x2150c5(0x1c6)]('id'),_0x23354e[_0x2150c5(0x1d2)]);return{'ok':!![],'data':detailPersonalItem(_0x123952)};}},kbCreate={'service':'kb','command':'create','description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a32_0x494a46(0x1d1),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0xb02a78){const _0x3746e2=a32_0x494a46,_0x5f42f1=_0xb02a78['str'](_0x3746e2(0x1ca)),_0xd8b518=readKnowledgeFile(_0xb02a78[_0x3746e2(0x1a9)](_0x3746e2(0x1a8))),_0x1d9ff2=await createPersonalKnowledgeBaseItem(_0xb02a78[_0x3746e2(0x1d2)],{'title':_0x5f42f1,'content':_0xd8b518});return{'ok':!![],'data':summarizePersonalItem(_0x1d9ff2),'message':'Created\x20KB\x20entry\x20'+_0x1d9ff2['id']+'\x20('+_0x1d9ff2[_0x3746e2(0x1ca)]+')'};},async 'dryRun'(_0x462c91){const _0x222b4a=a32_0x494a46,_0x3553e1=_0x462c91[_0x222b4a(0x1a9)](_0x222b4a(0x1ca)),_0x5559c7=readKnowledgeFile(_0x462c91[_0x222b4a(0x1a9)]('file'));return dryRun('POST',_0x222b4a(0x1b3))[_0x222b4a(0x1ce)]({'appCode':_0x462c91[_0x222b4a(0x1d2)],'title':_0x3553e1,'content':_0x5559c7})[_0x222b4a(0x1cd)](_0x222b4a(0x1b9)+_0x3553e1+'\x22')[_0x222b4a(0x1a2)]();}},kbUpdate={'service':'kb','command':a32_0x494a46(0x1d6),'description':a32_0x494a46(0x1c3),'risk':a32_0x494a46(0x1d1),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x494a46(0x1c9)},FILE_FLAG],async 'execute'(_0x452d9a){const _0x21490e=a32_0x494a46,_0x1c0791=_0x452d9a[_0x21490e(0x1c6)]('id'),_0x1112b6=readKnowledgeFile(_0x452d9a[_0x21490e(0x1a9)]('file')),_0x448c47=_0x452d9a[_0x21490e(0x1a9)](_0x21490e(0x1ca))||(await getPersonalKnowledgeBaseItem(_0x1c0791,_0x452d9a[_0x21490e(0x1d2)]))[_0x21490e(0x1ca)],_0x283135=await updatePersonalKnowledgeBaseItem(_0x1c0791,_0x452d9a['appCode'],{'title':_0x448c47,'content':_0x1112b6});return{'ok':!![],'data':summarizePersonalItem(_0x283135),'message':_0x21490e(0x1bd)+_0x283135['id']+'\x20('+_0x283135[_0x21490e(0x1ca)]+')'};},async 'dryRun'(_0x434ca2){const _0x1fc3ae=a32_0x494a46,_0x739d01=_0x434ca2[_0x1fc3ae(0x1c6)]('id'),_0x4ad223=readKnowledgeFile(_0x434ca2[_0x1fc3ae(0x1a9)](_0x1fc3ae(0x1a8))),_0x737a8a=_0x434ca2[_0x1fc3ae(0x1a9)]('title')||(await getPersonalKnowledgeBaseItem(_0x739d01,_0x434ca2[_0x1fc3ae(0x1d2)]))['title'];return dryRun('POST',_0x1fc3ae(0x1b5)+_0x739d01+'/update')['body']({'appCode':_0x434ca2[_0x1fc3ae(0x1d2)],'title':_0x737a8a,'content':_0x4ad223})['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x739d01)['build']();}},kbSearch={'service':'kb','command':'search','description':a32_0x494a46(0x19c),'risk':a32_0x494a46(0x1ac),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x18f1b9){const _0x58ba12=a32_0x494a46;if(!_0x18f1b9['str'](_0x58ba12(0x1d7))[_0x58ba12(0x1b4)]())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x18f1b9);},async 'execute'(_0x38a4a1){const _0x58f415=a32_0x494a46,_0xb5805e=_0x38a4a1['str'](_0x58f415(0x1d7))['trim'](),_0x4622df=readTopK(_0x38a4a1),_0xa7b94=await searchKnowledgeBase(_0x38a4a1[_0x58f415(0x1d2)],{'query':_0xb5805e,'topK':_0x4622df});return{'ok':!![],'data':{'total':_0xa7b94['length'],'hits':_0xa7b94[_0x58f415(0x1a0)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];function a32_0x2c76(_0x427681,_0xe5f725){_0x427681=_0x427681-0x19b;const _0x57e8ee=a32_0x57e8();let _0x2c7676=_0x57e8ee[_0x427681];return _0x2c7676;}function a32_0x57e8(){const _0x2ba90f=['scope','metadata','/client/knowledge-base/personal/create','trim','/client/knowledge-base/personal/','weightedScore','verbose','detail','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','number','flag','80LrMicG','Updated\x20KB\x20entry\x20','2661595KyyDIi','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','965720upqwuc','version','ragErrorMessage','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','validation','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','num','File\x20path\x20is\x20required.','Personal\x20knowledge-base\x20entry\x20title','Override\x20the\x20existing\x20entry\x20title','title','83853nAaEGw','docId','description','body','score','File\x20not\x20found:\x20','write','appCode','Personal\x20knowledge-base\x20entry\x20ID','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','133ykIzcM','update','query','77evnjof','1005708nrYnZm','createTime','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','isFinite','updateTime','3qxsBfY','map','length','build','608323yIyKyQ','string','list','ragStatus','187416tQpPEp','file','str','topk','utf8','read','File\x20is\x20not\x20a\x20regular\x20file:\x20','userId','content','1780604yocNmE'];a32_0x57e8=function(){return _0x2ba90f;};return a32_0x57e8();}
1
+ const a32_0x2f8459=a32_0x1db0;(function(_0x5363fb,_0x31671b){const _0x3563e4=a32_0x1db0,_0x505acc=_0x5363fb();while(!![]){try{const _0x3c55fb=parseInt(_0x3563e4(0xbc))/0x1*(-parseInt(_0x3563e4(0xc7))/0x2)+parseInt(_0x3563e4(0xb0))/0x3+-parseInt(_0x3563e4(0xab))/0x4*(parseInt(_0x3563e4(0xd6))/0x5)+-parseInt(_0x3563e4(0xcc))/0x6+-parseInt(_0x3563e4(0xd8))/0x7*(parseInt(_0x3563e4(0xd1))/0x8)+-parseInt(_0x3563e4(0xb8))/0x9+parseInt(_0x3563e4(0xd2))/0xa;if(_0x3c55fb===_0x31671b)break;else _0x505acc['push'](_0x505acc['shift']());}catch(_0x583f63){_0x505acc['push'](_0x505acc['shift']());}}}(a32_0x33e6,0x2b653));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';function a32_0x1db0(_0x172468,_0xda96e9){_0x172468=_0x172468-0xa4;const _0x33e6a0=a32_0x33e6();let _0x1db090=_0x33e6a0[_0x172468];return _0x1db090;}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x2f8459(0xbe),'type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x2f8459(0xcf),'type':a32_0x2f8459(0xdd),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a32_0x2f8459(0xc8),'type':a32_0x2f8459(0xdd),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x2f8459(0xcd),'type':a32_0x2f8459(0xaf),'description':a32_0x2f8459(0xcb)};function readKnowledgeFile(_0x41e906){const _0x284f88=a32_0x2f8459;if(!_0x41e906)throw CliErrors[_0x284f88(0xe2)](_0x284f88(0xc0));if(!existsSync(_0x41e906))throw CliErrors[_0x284f88(0xe2)]('File\x20not\x20found:\x20'+_0x41e906);if(!statSync(_0x41e906)[_0x284f88(0xe3)]())throw CliErrors['validation'](_0x284f88(0xc2)+_0x41e906);return readFileSync(_0x41e906,_0x284f88(0xc6));}function summarizePersonalItem(_0x4ea951){const _0x59865f=a32_0x2f8459;return{'id':_0x4ea951['id'],'title':_0x4ea951[_0x59865f(0xbe)],'version':_0x4ea951[_0x59865f(0xe0)],'ragStatus':_0x4ea951[_0x59865f(0xa9)],'ragErrorMessage':_0x4ea951[_0x59865f(0xaa)],'updateTime':_0x4ea951[_0x59865f(0xa6)]};}function detailPersonalItem(_0x221818){const _0x534c2f=a32_0x2f8459;return{'id':_0x221818['id'],'appCode':_0x221818[_0x534c2f(0xb3)],'scope':_0x221818['scope'],'userId':_0x221818[_0x534c2f(0xa4)],'title':_0x221818[_0x534c2f(0xbe)],'content':_0x221818[_0x534c2f(0xbd)]??'','version':_0x221818[_0x534c2f(0xe0)],'ragStatus':_0x221818[_0x534c2f(0xa9)],'ragErrorMessage':_0x221818[_0x534c2f(0xaa)],'createTime':_0x221818[_0x534c2f(0xd9)],'updateTime':_0x221818[_0x534c2f(0xa6)]};}function a32_0x33e6(){const _0x2c1fdc=['verbose','15736SFyvOS','createTime','build','bool','weightedScore','string','/client/knowledge-base/personal/create','/client/knowledge-base/personal/','version','body','validation','isFile','userId','score','updateTime','Created\x20KB\x20entry\x20','map','ragStatus','ragErrorMessage','4KTnCEB','read','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','trim','number','894369QLZrZV','--topk\x20must\x20be\x20a\x20positive\x20number.','scope','appCode','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','POST','detail','search','2666682bOXPAb','Personal\x20knowledge-base\x20entry\x20ID','num','length','62534sjSIOz','content','title','Override\x20the\x20existing\x20entry\x20title','File\x20path\x20is\x20required.','根据本地文件更新个人知识库条目','File\x20is\x20not\x20a\x20regular\x20file:\x20','create','write','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','utf8','6QdEeLA','query','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','根据本地文件创建个人知识库条目','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','1450710bNAOOH','topk','docId','file','str','56gZmFxm','8541700LCOyVH','Updated\x20KB\x20entry\x20','description','list','1165625KvgEFC'];a32_0x33e6=function(){return _0x2c1fdc;};return a32_0x33e6();}function summarizeSearchHit(_0x15c7d1){const _0x5c857c=a32_0x2f8459;return{'scope':_0x15c7d1[_0x5c857c(0xb2)],'title':_0x15c7d1[_0x5c857c(0xbe)],'docId':_0x15c7d1[_0x5c857c(0xce)],'score':_0x15c7d1[_0x5c857c(0xa5)],'weightedScore':_0x15c7d1[_0x5c857c(0xdc)],'content':_0x15c7d1[_0x5c857c(0xbd)],'metadata':_0x15c7d1['metadata']};}function readTopK(_0x4847ca){const _0x330da3=a32_0x2f8459,_0x463f33=_0x4847ca['flag'](_0x330da3(0xcd));if(_0x463f33===undefined||_0x463f33===null||_0x463f33==='')return undefined;const _0xf99bb4=_0x4847ca[_0x330da3(0xba)](_0x330da3(0xcd));if(!Number['isFinite'](_0xf99bb4)||_0xf99bb4<0x1)throw CliErrors[_0x330da3(0xe2)](_0x330da3(0xb1));return _0xf99bb4;}const kbList={'service':'kb','command':a32_0x2f8459(0xd5),'description':a32_0x2f8459(0xb4),'risk':a32_0x2f8459(0xac),'flags':[VERBOSE_FLAG],async 'execute'(_0x590d6e){const _0x2e2302=a32_0x2f8459,_0x53e79a=await listPersonalKnowledgeBaseItems(_0x590d6e[_0x2e2302(0xb3)]);if(_0x590d6e[_0x2e2302(0xdb)](_0x2e2302(0xd7)))return{'ok':!![],'data':{'total':_0x53e79a[_0x2e2302(0xbb)],'items':_0x53e79a}};return{'ok':!![],'data':{'total':_0x53e79a[_0x2e2302(0xbb)],'items':_0x53e79a['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x2f8459(0xb6),'description':a32_0x2f8459(0xad),'risk':a32_0x2f8459(0xac),'flags':[{...ID_FLAG,'description':a32_0x2f8459(0xb9)}],async 'execute'(_0x153b9a){const _0x440c37=a32_0x2f8459,_0x5e5616=await getPersonalKnowledgeBaseItem(_0x153b9a[_0x440c37(0xba)]('id'),_0x153b9a[_0x440c37(0xb3)]);return{'ok':!![],'data':detailPersonalItem(_0x5e5616)};}},kbCreate={'service':'kb','command':a32_0x2f8459(0xc3),'description':a32_0x2f8459(0xca),'risk':a32_0x2f8459(0xc4),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5f3575){const _0x581b3e=a32_0x2f8459,_0x119658=_0x5f3575[_0x581b3e(0xd0)]('title'),_0x4e5c18=readKnowledgeFile(_0x5f3575[_0x581b3e(0xd0)](_0x581b3e(0xcf))),_0x1917bf=await createPersonalKnowledgeBaseItem(_0x5f3575[_0x581b3e(0xb3)],{'title':_0x119658,'content':_0x4e5c18});return{'ok':!![],'data':summarizePersonalItem(_0x1917bf),'message':_0x581b3e(0xa7)+_0x1917bf['id']+'\x20('+_0x1917bf[_0x581b3e(0xbe)]+')'};},async 'dryRun'(_0x57218b){const _0x51736a=a32_0x2f8459,_0xd8e6b2=_0x57218b[_0x51736a(0xd0)](_0x51736a(0xbe)),_0x24844e=readKnowledgeFile(_0x57218b[_0x51736a(0xd0)](_0x51736a(0xcf)));return dryRun(_0x51736a(0xb5),_0x51736a(0xde))[_0x51736a(0xe1)]({'appCode':_0x57218b[_0x51736a(0xb3)],'title':_0xd8e6b2,'content':_0x24844e})[_0x51736a(0xd4)](_0x51736a(0xc9)+_0xd8e6b2+'\x22')[_0x51736a(0xda)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x2f8459(0xc1),'risk':a32_0x2f8459(0xc4),'flags':[{...ID_FLAG,'description':a32_0x2f8459(0xb9)},{...TITLE_FLAG,'required':![],'description':a32_0x2f8459(0xbf)},FILE_FLAG],async 'execute'(_0x5885b1){const _0x245adf=a32_0x2f8459,_0x2ec2de=_0x5885b1[_0x245adf(0xba)]('id'),_0x58caf3=readKnowledgeFile(_0x5885b1[_0x245adf(0xd0)](_0x245adf(0xcf))),_0x35af76=_0x5885b1['str'](_0x245adf(0xbe))||(await getPersonalKnowledgeBaseItem(_0x2ec2de,_0x5885b1['appCode']))['title'],_0x49fe75=await updatePersonalKnowledgeBaseItem(_0x2ec2de,_0x5885b1['appCode'],{'title':_0x35af76,'content':_0x58caf3});return{'ok':!![],'data':summarizePersonalItem(_0x49fe75),'message':_0x245adf(0xd3)+_0x49fe75['id']+'\x20('+_0x49fe75[_0x245adf(0xbe)]+')'};},async 'dryRun'(_0x255c42){const _0x4a4449=a32_0x2f8459,_0xdac9c=_0x255c42[_0x4a4449(0xba)]('id'),_0x4fb3a9=readKnowledgeFile(_0x255c42['str'](_0x4a4449(0xcf))),_0x1fef63=_0x255c42[_0x4a4449(0xd0)]('title')||(await getPersonalKnowledgeBaseItem(_0xdac9c,_0x255c42['appCode']))['title'];return dryRun(_0x4a4449(0xb5),_0x4a4449(0xdf)+_0xdac9c+'/update')[_0x4a4449(0xe1)]({'appCode':_0x255c42['appCode'],'title':_0x1fef63,'content':_0x4fb3a9})[_0x4a4449(0xd4)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0xdac9c)[_0x4a4449(0xda)]();}},kbSearch={'service':'kb','command':a32_0x2f8459(0xb7),'description':a32_0x2f8459(0xc5),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x45637a){const _0x1c5b53=a32_0x2f8459;if(!_0x45637a['str']('query')[_0x1c5b53(0xae)]())throw CliErrors[_0x1c5b53(0xe2)]('Search\x20query\x20is\x20required.');readTopK(_0x45637a);},async 'execute'(_0x36429a){const _0xacc24f=a32_0x2f8459,_0x4f6956=_0x36429a[_0xacc24f(0xd0)](_0xacc24f(0xc8))[_0xacc24f(0xae)](),_0x4a1157=readTopK(_0x36429a),_0x4e1a2a=await searchKnowledgeBase(_0x36429a[_0xacc24f(0xb3)],{'query':_0x4f6956,'topK':_0x4a1157});return{'ok':!![],'data':{'total':_0x4e1a2a[_0xacc24f(0xbb)],'hits':_0x4e1a2a[_0xacc24f(0xa8)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0xa591ca=a33_0x214c;(function(_0x4a049a,_0x4ca269){const _0x443017=a33_0x214c,_0x51bebd=_0x4a049a();while(!![]){try{const _0xcf330c=parseInt(_0x443017(0x14e))/0x1+-parseInt(_0x443017(0x15b))/0x2+-parseInt(_0x443017(0x165))/0x3+parseInt(_0x443017(0x15e))/0x4*(parseInt(_0x443017(0x149))/0x5)+parseInt(_0x443017(0x152))/0x6*(parseInt(_0x443017(0x153))/0x7)+parseInt(_0x443017(0x164))/0x8*(-parseInt(_0x443017(0x15d))/0x9)+parseInt(_0x443017(0x14c))/0xa;if(_0xcf330c===_0x4ca269)break;else _0x51bebd['push'](_0x51bebd['shift']());}catch(_0x1218e3){_0x51bebd['push'](_0x51bebd['shift']());}}}(a33_0x39ff,0x4be40));import{logger}from'../../utils/logger.js';function a33_0x214c(_0x442fa4,_0x42c8b9){_0x442fa4=_0x442fa4-0x144;const _0x39ff48=a33_0x39ff();let _0x214c93=_0x39ff48[_0x442fa4];return _0x214c93;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x39ff(){const _0x3891a4=['4lEmABi','\x20\x20\x20Duration:\x20','log','en-US','Clear\x20command\x20history\x20logs','timestamp','1113592nKuPzu','773535XzJRpa','show','readLogs','*\x20No\x20logs\x20found','duration','keys','error','read','30575ELyqbw','write','details','189410ikAwcB','command','400049kvtOPT','\x20\x20\x20Details:\x20','success','stringify','6fxcIal','3993633KoHSGU','View\x20command\x20history\x20logs','logs','length','toLocaleString','clearLogs','\x20\x20\x20Time:\x20','level','575464lYswAM','warn','9pEcwMv'];a33_0x39ff=function(){return _0x3891a4;};return a33_0x39ff();}function printLogs(_0x2d21d5){const _0x2fecb1=a33_0x214c;if(_0x2d21d5[_0x2fecb1(0x156)]===0x0){console['log'](_0x2fecb1(0x144));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x2d21d5['forEach']((_0x2a5148,_0x5eb39f)=>{const _0x38204a=_0x2fecb1,_0x51db2d=new Date(_0x2a5148[_0x38204a(0x163)])[_0x38204a(0x157)](_0x38204a(0x161)),_0x728b9c=_0x2a5148[_0x38204a(0x15a)]===_0x38204a(0x150)?'√':_0x2a5148['level']===_0x38204a(0x147)?'×':_0x2a5148['level']===_0x38204a(0x15c)?'!':'i';console[_0x38204a(0x160)](_0x5eb39f+0x1+'.\x20'+_0x728b9c+'\x20['+_0x2a5148[_0x38204a(0x14d)]+']\x20'+_0x2a5148['message']),console[_0x38204a(0x160)](_0x38204a(0x159)+_0x51db2d),_0x2a5148[_0x38204a(0x145)]&&console[_0x38204a(0x160)](_0x38204a(0x15f)+_0x2a5148[_0x38204a(0x145)]+'ms'),_0x2a5148[_0x38204a(0x14b)]&&Object[_0x38204a(0x146)](_0x2a5148[_0x38204a(0x14b)])[_0x38204a(0x156)]>0x0&&console[_0x38204a(0x160)](_0x38204a(0x14f)+JSON[_0x38204a(0x151)](_0x2a5148['details'],null,0x2)),console[_0x38204a(0x160)]('');});}export const logsDefinitions=[{'service':a33_0xa591ca(0x155),'command':a33_0xa591ca(0x166),'description':a33_0xa591ca(0x154),'risk':a33_0xa591ca(0x148),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x53f2c0){const _0x270232=a33_0xa591ca;return printLogs(logger[_0x270232(0x167)]()),{'ok':!![]};}},{'service':a33_0xa591ca(0x155),'command':'clear','description':a33_0xa591ca(0x162),'risk':a33_0xa591ca(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4ec5eb){const _0x42ffbe=a33_0xa591ca;return logger[_0x42ffbe(0x158)](),console[_0x42ffbe(0x160)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
1
+ const a33_0x56fbc8=a33_0x11fb;function a33_0x303b(){const _0x4e8f65=['show','readLogs','command','stringify','timestamp','message','forEach','3gmpeHp','6zrlkWg','5ItiekE','4702148hGKoYR','success','details','clearLogs','write','View\x20command\x20history\x20logs','17086656CtaIQJ','11ueIuih','toLocaleString','5451089sAEIMw','*\x20Logs\x20cleared','\x20\x20\x20Duration:\x20','9KJmEXO','清除命令历史日志','\x20logs:\x0a','468002nSLuSL','clear','7674808qCIjhH','read','10970710SOSZEY','length','level','916664icjSpF','log','\x20\x20\x20Time:\x20'];a33_0x303b=function(){return _0x4e8f65;};return a33_0x303b();}(function(_0x224465,_0x576b9d){const _0x11d436=a33_0x11fb,_0x58fc5=_0x224465();while(!![]){try{const _0x3590f2=parseInt(_0x11d436(0x190))/0x1+-parseInt(_0x11d436(0x174))/0x2*(-parseInt(_0x11d436(0x17e))/0x3)+-parseInt(_0x11d436(0x181))/0x4*(-parseInt(_0x11d436(0x180))/0x5)+-parseInt(_0x11d436(0x17f))/0x6*(parseInt(_0x11d436(0x18a))/0x7)+parseInt(_0x11d436(0x192))/0x8*(-parseInt(_0x11d436(0x18d))/0x9)+-parseInt(_0x11d436(0x171))/0xa+parseInt(_0x11d436(0x188))/0xb*(parseInt(_0x11d436(0x187))/0xc);if(_0x3590f2===_0x576b9d)break;else _0x58fc5['push'](_0x58fc5['shift']());}catch(_0x24c281){_0x58fc5['push'](_0x58fc5['shift']());}}}(a33_0x303b,0xa89b2));function a33_0x11fb(_0x1ab4aa,_0x3d8373){_0x1ab4aa=_0x1ab4aa-0x170;const _0x303b27=a33_0x303b();let _0x11fb95=_0x303b27[_0x1ab4aa];return _0x11fb95;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x97d130){const _0xe34611=a33_0x11fb;if(_0x97d130[_0xe34611(0x172)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0xe34611(0x175)]('*\x20'+CLI_DISPLAY_NAME+_0xe34611(0x18f)),_0x97d130[_0xe34611(0x17d)]((_0x4f778a,_0x5c062c)=>{const _0x157749=_0xe34611,_0x1abb21=new Date(_0x4f778a[_0x157749(0x17b)])[_0x157749(0x189)]('en-US'),_0x3c7b3f=_0x4f778a[_0x157749(0x173)]===_0x157749(0x182)?'√':_0x4f778a['level']==='error'?'×':_0x4f778a[_0x157749(0x173)]==='warn'?'!':'i';console[_0x157749(0x175)](_0x5c062c+0x1+'.\x20'+_0x3c7b3f+'\x20['+_0x4f778a[_0x157749(0x179)]+']\x20'+_0x4f778a[_0x157749(0x17c)]),console[_0x157749(0x175)](_0x157749(0x176)+_0x1abb21),_0x4f778a['duration']&&console[_0x157749(0x175)](_0x157749(0x18c)+_0x4f778a['duration']+'ms'),_0x4f778a[_0x157749(0x183)]&&Object['keys'](_0x4f778a[_0x157749(0x183)])[_0x157749(0x172)]>0x0&&console[_0x157749(0x175)]('\x20\x20\x20Details:\x20'+JSON[_0x157749(0x17a)](_0x4f778a[_0x157749(0x183)],null,0x2)),console[_0x157749(0x175)]('');});}export const logsDefinitions=[{'service':'logs','command':a33_0x56fbc8(0x177),'description':a33_0x56fbc8(0x186),'risk':a33_0x56fbc8(0x170),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x186571){const _0x5cefcb=a33_0x56fbc8;return printLogs(logger[_0x5cefcb(0x178)]()),{'ok':!![]};}},{'service':'logs','command':a33_0x56fbc8(0x191),'description':a33_0x56fbc8(0x18e),'risk':a33_0x56fbc8(0x185),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x45f9c5){const _0x15f15d=a33_0x56fbc8;return logger[_0x15f15d(0x184)](),console[_0x15f15d(0x175)](_0x15f15d(0x18b)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x32f810=a34_0x1658;(function(_0x3d6938,_0x48c821){const _0x2ecd02=a34_0x1658,_0x39d4d1=_0x3d6938();while(!![]){try{const _0x4bcbb3=parseInt(_0x2ecd02(0x1d2))/0x1*(parseInt(_0x2ecd02(0x1cf))/0x2)+parseInt(_0x2ecd02(0x1f2))/0x3+-parseInt(_0x2ecd02(0x1d7))/0x4*(-parseInt(_0x2ecd02(0x1ed))/0x5)+-parseInt(_0x2ecd02(0x1d1))/0x6+-parseInt(_0x2ecd02(0x1c0))/0x7*(parseInt(_0x2ecd02(0x1e7))/0x8)+parseInt(_0x2ecd02(0x1de))/0x9*(-parseInt(_0x2ecd02(0x1ce))/0xa)+parseInt(_0x2ecd02(0x1eb))/0xb;if(_0x4bcbb3===_0x48c821)break;else _0x39d4d1['push'](_0x39d4d1['shift']());}catch(_0x5ec6f2){_0x39d4d1['push'](_0x39d4d1['shift']());}}}(a34_0x261d,0x64ca8));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_0x1658(_0xcc32f0,_0x4a8d9c){_0xcc32f0=_0xcc32f0-0x1c0;const _0x261df6=a34_0x261d();let _0x1658c2=_0x261df6[_0xcc32f0];return _0x1658c2;}const SUPPORTED_SCENES=[a34_0x32f810(0x1e2),a34_0x32f810(0x1e5),a34_0x32f810(0x1d4),a34_0x32f810(0x1ca)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x32f810(0x1cd),'general':a34_0x32f810(0x1ec),'form':'Table','idCard':a34_0x32f810(0x1e6)},SCENE_FLAG={'name':'scene','type':a34_0x32f810(0x1db),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x32f810(0x1e3)},IMAGE_FILE_FLAG={'name':a34_0x32f810(0x1c6),'type':a34_0x32f810(0x1db),'description':'Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR'},IMAGE_URL_FLAG={'name':a34_0x32f810(0x1d0),'type':a34_0x32f810(0x1db),'description':a34_0x32f810(0x1d3)};function normalizeScene(_0x72155f){const _0xe95517=a34_0x32f810,_0x2bf7ed=_0x72155f[_0xe95517(0x1d5)]()['toLowerCase']();if(_0x2bf7ed===_0xe95517(0x1e0))return _0xe95517(0x1ca);if(_0x2bf7ed===_0xe95517(0x1e2)||_0x2bf7ed===_0xe95517(0x1e5)||_0x2bf7ed===_0xe95517(0x1d4))return _0x2bf7ed;throw CliErrors[_0xe95517(0x1e9)](_0xe95517(0x1f5)+_0x72155f+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x102f10){const _0xf393b=a34_0x32f810,_0x1cbf00=_0x102f10[_0xf393b(0x1e8)](_0xf393b(0x1c6))['trim'](),_0x4cc89e=_0x102f10[_0xf393b(0x1e8)](_0xf393b(0x1d0))[_0xf393b(0x1d5)]();return{'imageFile':_0x1cbf00,'imageUrl':_0x4cc89e,'count':[_0x1cbf00,_0x4cc89e]['filter'](Boolean)[_0xf393b(0x1cc)]};}function validateInputSelection(_0x25e15e){const _0x74ccd7=a34_0x32f810,_0x45bcb8=selectedInputs(_0x25e15e);if(_0x45bcb8[_0x74ccd7(0x1f1)]!==0x1)throw CliErrors[_0x74ccd7(0x1e9)](_0x74ccd7(0x1d6));return _0x45bcb8;}function withScene(_0x188580,_0x4a4743,_0x10cd4c){const _0x2a4f55=a34_0x32f810;return{..._0x188580,'scene':_0x4a4743,..._0x10cd4c?{'sourceFile':{'fileName':_0x10cd4c[_0x2a4f55(0x1c3)],'filePath':_0x10cd4c[_0x2a4f55(0x1c4)]}}:{}};}const ocrRecognize={'service':a34_0x32f810(0x1d8),'command':a34_0x32f810(0x1da),'description':a34_0x32f810(0x1c5),'risk':a34_0x32f810(0x1c7),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x23c652){const _0x5a0c19=a34_0x32f810,_0xaa969b=normalizeScene(_0x23c652[_0x5a0c19(0x1e8)](_0x5a0c19(0x1ef))),_0x4a0d29=SCENE_TO_LEGACY_TYPE[_0xaa969b],_0x561f1a=validateInputSelection(_0x23c652);if(_0x561f1a['imageUrl'])return dryRun(_0x5a0c19(0x1f4),'/client/ocr')[_0x5a0c19(0x1c1)]({'appCode':_0x23c652['appCode'],'url':_0x561f1a[_0x5a0c19(0x1cb)],'type':_0x4a0d29})[_0x5a0c19(0x1e1)]('Preview:\x20recognize\x20'+_0xaa969b+'\x20OCR\x20from\x20URL')['build']();const _0x5c04c0=requireRuntimeUploadFile(_0x561f1a[_0x5a0c19(0x1df)],_0x5a0c19(0x1c6));return dryRun('POST',_0x5a0c19(0x1c8))['body']({'steps':[{'method':_0x5a0c19(0x1f4),'url':'/client/uploadFile','body':{'appCode':_0x23c652[_0x5a0c19(0x1d9)],'multipart':{'file':_0x5c04c0}}},{'method':_0x5a0c19(0x1f4),'url':_0x5a0c19(0x1ea),'body':{'filePath':_0x5a0c19(0x1e4),'downloadFlag':![]}},{'method':_0x5a0c19(0x1f4),'url':_0x5a0c19(0x1dd),'body':{'appCode':_0x23c652[_0x5a0c19(0x1d9)],'url':_0x5a0c19(0x1ee),'type':_0x4a0d29}}]})['description'](_0x5a0c19(0x1f3)+_0xaa969b+_0x5a0c19(0x1dc))['build']();},async 'execute'(_0x18a8db){const _0x1983b8=a34_0x32f810,_0x35ac02=normalizeScene(_0x18a8db['str'](_0x1983b8(0x1ef))),_0x2f034c=SCENE_TO_LEGACY_TYPE[_0x35ac02],_0x47c26f=validateInputSelection(_0x18a8db);if(_0x47c26f[_0x1983b8(0x1cb)]){const _0x4f0f40=await recognizeRuntimeOcr(_0x18a8db[_0x1983b8(0x1d9)],{'url':_0x47c26f[_0x1983b8(0x1cb)],'type':_0x2f034c});return{'ok':!![],'data':withScene(_0x4f0f40,_0x35ac02)};}const _0x37975c=requireRuntimeUploadFile(_0x47c26f[_0x1983b8(0x1df)],_0x1983b8(0x1c6)),_0x295ffc=await uploadRuntimeFile(_0x18a8db[_0x1983b8(0x1d9)],_0x37975c['path']);if(!_0x295ffc[_0x1983b8(0x1c4)])throw CliErrors[_0x1983b8(0x1c2)]('File\x20upload\x20response\x20missing\x20filePath.');const _0x11d10f=await queryRuntimeFileUrl(_0x295ffc[_0x1983b8(0x1c4)],{'download':![]});if(!_0x11d10f[_0x1983b8(0x1f0)])throw CliErrors[_0x1983b8(0x1c2)](_0x1983b8(0x1c9));const _0x10d680=await recognizeRuntimeOcr(_0x18a8db[_0x1983b8(0x1d9)],{'url':_0x11d10f[_0x1983b8(0x1f0)],'type':_0x2f034c});return{'ok':!![],'data':withScene(_0x10d680,_0x35ac02,_0x295ffc)};}};function a34_0x261d(){const _0x4582fe=['imageUrl','length','Invoice','10LHpJWH','2FwNEag','image-url','2182896VjQKqd','485948dTwYJa','Publicly\x20accessible\x20image\x20or\x20file\x20URL','form','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','16504QEbNRp','ocr','appCode','recognize','string','\x20OCR','/client/ocr','6091947xRbvxf','imageFile','idcard','description','invoice','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','<filePath\x20returned\x20by\x20/client/uploadFile>','general','IdCard','1538344mKeqkr','str','validation','/client/queryFileUrl','7881137JWNOcd','General','305uzzMWl','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','scene','fileUrl','count','2305830qTUZsP','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','POST','Unsupported\x20OCR\x20scene:\x20','28GAfLMp','body','apiError','fileName','filePath','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','image-file','write','/client/uploadFile','File\x20URL\x20response\x20missing\x20fileUrl.','idCard'];a34_0x261d=function(){return _0x4582fe;};return a34_0x261d();}export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x253bb7=a34_0xa62c;(function(_0x5b8318,_0x1ebc72){const _0x369b76=a34_0xa62c,_0x57b3a3=_0x5b8318();while(!![]){try{const _0x27d8a1=parseInt(_0x369b76(0x176))/0x1+-parseInt(_0x369b76(0x151))/0x2*(parseInt(_0x369b76(0x15f))/0x3)+parseInt(_0x369b76(0x140))/0x4*(-parseInt(_0x369b76(0x169))/0x5)+-parseInt(_0x369b76(0x157))/0x6*(-parseInt(_0x369b76(0x164))/0x7)+parseInt(_0x369b76(0x146))/0x8+parseInt(_0x369b76(0x156))/0x9*(-parseInt(_0x369b76(0x147))/0xa)+-parseInt(_0x369b76(0x16b))/0xb;if(_0x27d8a1===_0x1ebc72)break;else _0x57b3a3['push'](_0x57b3a3['shift']());}catch(_0x1e838c){_0x57b3a3['push'](_0x57b3a3['shift']());}}}(a34_0x950c,0xe96bd));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x950c(){const _0x3fdf04=['fileName','filePath','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','apiError','path','image-file','ocr','Publicly\x20accessible\x20image\x20or\x20file\x20URL','350888tJIyGy','trim','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','appCode','build','560ABWZlF','fileUrl','general','str','Invoice','imageFile','6917896cdggXO','7725670yeLgzs','description','length','validation','filter','scene','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','form','POST','\x20OCR\x20from\x20URL','57892tpjwLX','IdCard','\x20OCR','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','body','9qUxMTi','42JgSFxV','imageUrl','/client/uploadFile','invoice','count','File\x20upload\x20response\x20missing\x20filePath.','Preview:\x20recognize\x20','recognize','6ZGBHdL','File\x20URL\x20response\x20missing\x20fileUrl.','Table','string','Unsupported\x20OCR\x20scene:\x20','1418823VvdUKu','idcard','idCard','join','read','28825NVOqra','image-url','448756tEUXct','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','General'];a34_0x950c=function(){return _0x3fdf04;};return a34_0x950c();}function a34_0xa62c(_0x855ebe,_0x1eb9ac){_0x855ebe=_0x855ebe-0x13c;const _0x950cf0=a34_0x950c();let _0xa62c13=_0x950cf0[_0x855ebe];return _0xa62c13;}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x253bb7(0x15a),a34_0x253bb7(0x142),'form',a34_0x253bb7(0x166)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x253bb7(0x144),'general':a34_0x253bb7(0x16d),'form':a34_0x253bb7(0x161),'idCard':a34_0x253bb7(0x152)},SCENE_FLAG={'name':a34_0x253bb7(0x14c),'type':a34_0x253bb7(0x162),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x253bb7(0x154)},IMAGE_FILE_FLAG={'name':'image-file','type':a34_0x253bb7(0x162),'description':a34_0x253bb7(0x170)},IMAGE_URL_FLAG={'name':a34_0x253bb7(0x16a),'type':a34_0x253bb7(0x162),'description':a34_0x253bb7(0x175)};function normalizeScene(_0x2718f4){const _0x31750a=a34_0x253bb7,_0x50e9f1=_0x2718f4[_0x31750a(0x13c)]()['toLowerCase']();if(_0x50e9f1===_0x31750a(0x165))return _0x31750a(0x166);if(_0x50e9f1===_0x31750a(0x15a)||_0x50e9f1===_0x31750a(0x142)||_0x50e9f1===_0x31750a(0x14e))return _0x50e9f1;throw CliErrors[_0x31750a(0x14a)](_0x31750a(0x163)+_0x2718f4+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x31750a(0x167)](',\x20'));}function selectedInputs(_0x1743d0){const _0x1fa779=a34_0x253bb7,_0x5a965d=_0x1743d0[_0x1fa779(0x143)](_0x1fa779(0x173))[_0x1fa779(0x13c)](),_0x5490ce=_0x1743d0[_0x1fa779(0x143)]('image-url')[_0x1fa779(0x13c)]();return{'imageFile':_0x5a965d,'imageUrl':_0x5490ce,'count':[_0x5a965d,_0x5490ce][_0x1fa779(0x14b)](Boolean)[_0x1fa779(0x149)]};}function validateInputSelection(_0x4e2608){const _0xa90336=a34_0x253bb7,_0x37aad1=selectedInputs(_0x4e2608);if(_0x37aad1[_0xa90336(0x15b)]!==0x1)throw CliErrors[_0xa90336(0x14a)](_0xa90336(0x13d));return _0x37aad1;}function withScene(_0x157cc5,_0x370d4b,_0x3ecae6){const _0x2272e9=a34_0x253bb7;return{..._0x157cc5,'scene':_0x370d4b,..._0x3ecae6?{'sourceFile':{'fileName':_0x3ecae6[_0x2272e9(0x16e)],'filePath':_0x3ecae6[_0x2272e9(0x16f)]}}:{}};}const ocrRecognize={'service':a34_0x253bb7(0x174),'command':a34_0x253bb7(0x15e),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0x253bb7(0x168),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x56c1cb){const _0xebe297=a34_0x253bb7,_0x397e5b=normalizeScene(_0x56c1cb[_0xebe297(0x143)](_0xebe297(0x14c))),_0x3de424=SCENE_TO_LEGACY_TYPE[_0x397e5b],_0x1e6967=validateInputSelection(_0x56c1cb);if(_0x1e6967[_0xebe297(0x158)])return dryRun(_0xebe297(0x14f),'/client/ocr')[_0xebe297(0x155)]({'appCode':_0x56c1cb[_0xebe297(0x13e)],'url':_0x1e6967['imageUrl'],'type':_0x3de424})[_0xebe297(0x148)](_0xebe297(0x15d)+_0x397e5b+_0xebe297(0x150))['build']();const _0x79ff0d=requireRuntimeUploadFile(_0x1e6967[_0xebe297(0x145)],_0xebe297(0x173));return dryRun(_0xebe297(0x14f),_0xebe297(0x159))[_0xebe297(0x155)]({'steps':[{'method':_0xebe297(0x14f),'url':_0xebe297(0x159),'body':{'appCode':_0x56c1cb[_0xebe297(0x13e)],'multipart':{'file':_0x79ff0d}}},{'method':_0xebe297(0x14f),'url':'/client/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':'POST','url':'/client/ocr','body':{'appCode':_0x56c1cb[_0xebe297(0x13e)],'url':_0xebe297(0x14d),'type':_0x3de424}}]})['description'](_0xebe297(0x16c)+_0x397e5b+_0xebe297(0x153))[_0xebe297(0x13f)]();},async 'execute'(_0x3a61f6){const _0x40ecf3=a34_0x253bb7,_0x4e4332=normalizeScene(_0x3a61f6[_0x40ecf3(0x143)](_0x40ecf3(0x14c))),_0x3cbe38=SCENE_TO_LEGACY_TYPE[_0x4e4332],_0x125a6c=validateInputSelection(_0x3a61f6);if(_0x125a6c['imageUrl']){const _0x3a15fe=await recognizeRuntimeOcr(_0x3a61f6[_0x40ecf3(0x13e)],{'url':_0x125a6c[_0x40ecf3(0x158)],'type':_0x3cbe38});return{'ok':!![],'data':withScene(_0x3a15fe,_0x4e4332)};}const _0x57a46e=requireRuntimeUploadFile(_0x125a6c[_0x40ecf3(0x145)],'image-file'),_0x5ae768=await uploadRuntimeFile(_0x3a61f6[_0x40ecf3(0x13e)],_0x57a46e[_0x40ecf3(0x172)]);if(!_0x5ae768[_0x40ecf3(0x16f)])throw CliErrors[_0x40ecf3(0x171)](_0x40ecf3(0x15c));const _0x26ba4a=await queryRuntimeFileUrl(_0x5ae768[_0x40ecf3(0x16f)],{'download':![]});if(!_0x26ba4a['fileUrl'])throw CliErrors[_0x40ecf3(0x171)](_0x40ecf3(0x160));const _0x531c10=await recognizeRuntimeOcr(_0x3a61f6[_0x40ecf3(0x13e)],{'url':_0x26ba4a[_0x40ecf3(0x141)],'type':_0x3cbe38});return{'ok':!![],'data':withScene(_0x531c10,_0x4e4332,_0x5ae768)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x142c44=a35_0x3f14;(function(_0x246262,_0x40fc92){const _0x141b5e=a35_0x3f14,_0x2c9245=_0x246262();while(!![]){try{const _0xac1112=-parseInt(_0x141b5e(0x220))/0x1+-parseInt(_0x141b5e(0x20b))/0x2*(-parseInt(_0x141b5e(0x1f8))/0x3)+-parseInt(_0x141b5e(0x21e))/0x4*(parseInt(_0x141b5e(0x210))/0x5)+parseInt(_0x141b5e(0x203))/0x6*(-parseInt(_0x141b5e(0x207))/0x7)+parseInt(_0x141b5e(0x226))/0x8+-parseInt(_0x141b5e(0x204))/0x9*(-parseInt(_0x141b5e(0x1ec))/0xa)+-parseInt(_0x141b5e(0x214))/0xb*(-parseInt(_0x141b5e(0x21b))/0xc);if(_0xac1112===_0x40fc92)break;else _0x2c9245['push'](_0x2c9245['shift']());}catch(_0x9a3c64){_0x2c9245['push'](_0x2c9245['shift']());}}}(a35_0xa5c6,0xe8beb));import{existsSync,readFileSync,statSync}from'node:fs';function a35_0x3f14(_0x284a9a,_0x241b2b){_0x284a9a=_0x284a9a-0x1e6;const _0xa5c6cd=a35_0xa5c6();let _0x3f1439=_0xa5c6cd[_0x284a9a];return _0x3f1439;}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_0x142c44(0x1fc)},FUNCTION_NAME_FLAG={'name':a35_0x142c44(0x1e8),'type':a35_0x142c44(0x1fa),'required':!![],'description':a35_0x142c44(0x1e7)},DESCRIPTION_FLAG={'name':a35_0x142c44(0x1f4),'type':a35_0x142c44(0x1fa),'description':a35_0x142c44(0x217)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x142c44(0x1fa),'description':a35_0x142c44(0x1f5)};function normalizeFunctionName(_0x6172ae){const _0xbeca37=a35_0x142c44,_0x417bbc=String(_0x6172ae||'')['trim']();if(!_0x417bbc||!FUNCTION_NAME_PATTERN[_0xbeca37(0x1ff)](_0x417bbc))throw CliErrors['validation']('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x417bbc;}function readScriptFile(_0x8ab19b){const _0x5c1afe=a35_0x142c44;if(!_0x8ab19b)throw CliErrors[_0x5c1afe(0x21c)]('File\x20path\x20is\x20required.');if(!existsSync(_0x8ab19b))throw CliErrors[_0x5c1afe(0x21c)](_0x5c1afe(0x223)+_0x8ab19b);if(!statSync(_0x8ab19b)[_0x5c1afe(0x1fe)]())throw CliErrors[_0x5c1afe(0x21c)](_0x5c1afe(0x1f6)+_0x8ab19b);const _0xbc781=readFileSync(_0x8ab19b,_0x5c1afe(0x222));if(!_0xbc781[_0x5c1afe(0x1f2)]())throw CliErrors['validation']('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0xbc781;}function optionalTrimmed(_0x98da6c){const _0x32dd17=a35_0x142c44,_0xa5c8cf=String(_0x98da6c||'')[_0x32dd17(0x1f2)]();return _0xa5c8cf||undefined;}function a35_0xa5c6(){const _0x613673=['string','flag','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','personal-bff','isFile','test','appCode','scriptContent','--params\x20must\x20be\x20a\x20JSON\x20object.','5536710dhbfNN','36YxIqBA','/update','high-risk-write','14nUcnuW','scriptType','num','map','1096HbosuS','config','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','createTime','read','2302460nYifQV','params','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','bool','3453142OElRpL','updateTime','body','Personal\x20BFF\x20description','list','Update\x20a\x20personal\x20BFF\x20by\x20id','Personal\x20BFF\x20script\x20ID','120SubnZq','validation','Show\x20one\x20personal\x20BFF\x20by\x20id','12NJJWQH','update','707484zoCYVb','Updated\x20personal\x20BFF\x20','utf8','File\x20not\x20found:\x20','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','keys','2088872yqLBiv','POST','version','verbose','exec','createUserId','sourceSessionId','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','name','length','build','write','360940yzHixi','Created\x20personal\x20BFF\x20','file','isArray','str','source-session-id','trim','functionName','description','Optional\x20source\x20RuntimeAgent\x20session\x20id','File\x20is\x20not\x20a\x20regular\x20file:\x20','gmtCreate','7353HfMNdX','Executed\x20personal\x20BFF\x20'];a35_0xa5c6=function(){return _0x613673;};return a35_0xa5c6();}function summarizeBff(_0x54d160){const _0x3a6ecd=a35_0x142c44;return{'id':_0x54d160['id'],'appCode':_0x54d160['appCode'],'functionName':_0x54d160[_0x3a6ecd(0x1f3)],'description':_0x54d160[_0x3a6ecd(0x1f4)],'scriptType':_0x54d160[_0x3a6ecd(0x208)],'version':_0x54d160['version'],'gmtModified':_0x54d160['gmtModified'],'updateTime':_0x54d160[_0x3a6ecd(0x215)]};}function detailBff(_0x293832){const _0x3c1f2d=a35_0x142c44;return{'id':_0x293832['id'],'appCode':_0x293832['appCode'],'functionName':_0x293832[_0x3c1f2d(0x1f3)],'description':_0x293832[_0x3c1f2d(0x1f4)],'scriptType':_0x293832[_0x3c1f2d(0x208)],'scriptContent':_0x293832[_0x3c1f2d(0x201)]??'','config':_0x293832[_0x3c1f2d(0x20c)],'version':_0x293832[_0x3c1f2d(0x228)],'createUserId':_0x293832[_0x3c1f2d(0x22b)],'gmtCreate':_0x293832[_0x3c1f2d(0x1f7)],'gmtModified':_0x293832['gmtModified'],'createTime':_0x293832[_0x3c1f2d(0x20e)],'updateTime':_0x293832[_0x3c1f2d(0x215)]};}function buildCreateInput(_0x39815d){const _0x30aa0a=a35_0x142c44;return{'functionName':normalizeFunctionName(_0x39815d['str'](_0x30aa0a(0x1e8))),...optionalTrimmed(_0x39815d['str'](_0x30aa0a(0x1f4)))?{'description':optionalTrimmed(_0x39815d[_0x30aa0a(0x1f0)](_0x30aa0a(0x1f4)))}:{},'scriptContent':readScriptFile(_0x39815d[_0x30aa0a(0x1f0)](_0x30aa0a(0x1ee))),...optionalTrimmed(_0x39815d['str'](_0x30aa0a(0x1f1)))?{'sourceSessionId':optionalTrimmed(_0x39815d[_0x30aa0a(0x1f0)](_0x30aa0a(0x1f1)))}:{}};}function buildUpdateInput(_0xcd768f){const _0x23ac7b=a35_0x142c44,_0x186764={};optionalTrimmed(_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1e8)))&&(_0x186764[_0x23ac7b(0x1f3)]=normalizeFunctionName(_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1e8))));_0xcd768f[_0x23ac7b(0x1fb)](_0x23ac7b(0x1f4))!==undefined&&(_0x186764['description']=_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1f4)));optionalTrimmed(_0xcd768f[_0x23ac7b(0x1f0)]('file'))&&(_0x186764['scriptContent']=readScriptFile(_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1ee))));_0xcd768f['flag'](_0x23ac7b(0x1f1))!==undefined&&(_0x186764[_0x23ac7b(0x1e6)]=_0xcd768f[_0x23ac7b(0x1f0)](_0x23ac7b(0x1f1)));if(Object[_0x23ac7b(0x225)](_0x186764)['length']===0x0)throw CliErrors[_0x23ac7b(0x21c)]('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x186764;}function parseExecParams(_0x3ec175){const _0x41fea5=a35_0x142c44,_0x1d130a=parseJsonParams(_0x3ec175)??{};if(Array[_0x41fea5(0x1ef)](_0x1d130a))throw CliErrors['validation'](_0x41fea5(0x202));return _0x1d130a;}const personalBffList={'service':a35_0x142c44(0x1fd),'command':a35_0x142c44(0x218),'description':a35_0x142c44(0x20d),'risk':a35_0x142c44(0x20f),'flags':[VERBOSE_FLAG],async 'execute'(_0x3da5ef){const _0x582c98=a35_0x142c44,_0x31e204=await listPersonalBffs(_0x3da5ef[_0x582c98(0x200)]);return{'ok':!![],'data':{'total':_0x31e204[_0x582c98(0x1e9)],'items':_0x3da5ef[_0x582c98(0x213)](_0x582c98(0x229))?_0x31e204:_0x31e204[_0x582c98(0x20a)](summarizeBff)}};}},personalBffDetail={'service':a35_0x142c44(0x1fd),'command':'detail','description':a35_0x142c44(0x21d),'risk':a35_0x142c44(0x20f),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x30ab30){const _0x3550f8=a35_0x142c44,_0xb56e7=await getPersonalBff(_0x30ab30[_0x3550f8(0x209)]('id'),_0x30ab30[_0x3550f8(0x200)]);return{'ok':!![],'data':detailBff(_0xb56e7)};}},personalBffCreate={'service':a35_0x142c44(0x1fd),'command':'create','description':a35_0x142c44(0x224),'risk':a35_0x142c44(0x1eb),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x52d7e7){const _0x302995=a35_0x142c44,_0x1f522f=buildCreateInput(_0x52d7e7),_0x27190c=await createPersonalBff(_0x52d7e7[_0x302995(0x200)],_0x1f522f);return{'ok':!![],'data':detailBff(_0x27190c),'message':_0x302995(0x1ed)+_0x27190c['id']+(_0x27190c[_0x302995(0x1f3)]?'\x20('+_0x27190c[_0x302995(0x1f3)]+')':'')};},async 'dryRun'(_0xb96af){const _0x5493d9=a35_0x142c44,_0x23f590=buildCreateInput(_0xb96af);return dryRun(_0x5493d9(0x227),'/client/runtime-bff/personal/create')[_0x5493d9(0x216)]({'appCode':_0xb96af[_0x5493d9(0x200)],..._0x23f590})[_0x5493d9(0x1f4)]('Preview:\x20create\x20personal\x20BFF\x20'+_0x23f590['functionName'])[_0x5493d9(0x1ea)]();}},personalBffUpdate={'service':'personal-bff','command':a35_0x142c44(0x21f),'description':a35_0x142c44(0x219),'risk':a35_0x142c44(0x1eb),'flags':[{...ID_FLAG,'description':a35_0x142c44(0x21a)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x464654){const _0x33a7f6=a35_0x142c44,_0x102353=_0x464654[_0x33a7f6(0x209)]('id'),_0x359860=buildUpdateInput(_0x464654),_0x5a8578=await updatePersonalBff(_0x102353,_0x464654[_0x33a7f6(0x200)],_0x359860);return{'ok':!![],'data':detailBff(_0x5a8578),'message':_0x33a7f6(0x221)+_0x5a8578['id']+(_0x5a8578[_0x33a7f6(0x1f3)]?'\x20('+_0x5a8578['functionName']+')':'')};},async 'dryRun'(_0x4c0b66){const _0x43a4c0=a35_0x142c44,_0xf9c2bc=_0x4c0b66[_0x43a4c0(0x209)]('id'),_0xf2216d=buildUpdateInput(_0x4c0b66);return dryRun(_0x43a4c0(0x227),'/client/runtime-bff/personal/'+_0xf9c2bc+_0x43a4c0(0x205))[_0x43a4c0(0x216)]({'appCode':_0x4c0b66[_0x43a4c0(0x200)],..._0xf2216d})[_0x43a4c0(0x1f4)]('Preview:\x20update\x20personal\x20BFF\x20'+_0xf9c2bc)['build']();}},personalBffExec={'service':'personal-bff','command':a35_0x142c44(0x22a),'description':'Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','risk':a35_0x142c44(0x206),'flags':[{...ID_FLAG,'description':a35_0x142c44(0x21a)},{...PARAMS_FLAG,'description':a35_0x142c44(0x212)}],async 'validate'(_0x11ed84){const _0x44beac=a35_0x142c44;parseExecParams(_0x11ed84[_0x44beac(0x1f0)](_0x44beac(0x211)));},async 'execute'(_0x4ef73a){const _0x1a5272=a35_0x142c44,_0x3d22bb=_0x4ef73a['num']('id'),_0x2acc3c=parseExecParams(_0x4ef73a[_0x1a5272(0x1f0)](_0x1a5272(0x211))),_0x3dabb5=await executePersonalBff(_0x3d22bb,_0x4ef73a[_0x1a5272(0x200)],_0x2acc3c);return{'ok':!![],'data':{'result':_0x3dabb5},'message':_0x1a5272(0x1f9)+_0x3d22bb};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x3d9499=a35_0x2283;(function(_0x363235,_0x1f9e48){const _0x3564e4=a35_0x2283,_0x577ea1=_0x363235();while(!![]){try{const _0x1de267=-parseInt(_0x3564e4(0xbd))/0x1+-parseInt(_0x3564e4(0xe0))/0x2*(parseInt(_0x3564e4(0xbc))/0x3)+-parseInt(_0x3564e4(0xd1))/0x4+parseInt(_0x3564e4(0xaa))/0x5+-parseInt(_0x3564e4(0xce))/0x6*(parseInt(_0x3564e4(0xc4))/0x7)+parseInt(_0x3564e4(0xa6))/0x8*(-parseInt(_0x3564e4(0xab))/0x9)+parseInt(_0x3564e4(0xa0))/0xa*(parseInt(_0x3564e4(0xcd))/0xb);if(_0x1de267===_0x1f9e48)break;else _0x577ea1['push'](_0x577ea1['shift']());}catch(_0x3c815a){_0x577ea1['push'](_0x577ea1['shift']());}}}(a35_0x5d13,0xf2ac8));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_0x3d9499(0xa2),'type':'string','description':a35_0x3d9499(0xb8)},FUNCTION_NAME_FLAG={'name':a35_0x3d9499(0xdf),'type':a35_0x3d9499(0xb0),'required':!![],'description':a35_0x3d9499(0xa5)},DESCRIPTION_FLAG={'name':a35_0x3d9499(0xa7),'type':'string','description':a35_0x3d9499(0xdd)},SOURCE_SESSION_FLAG={'name':a35_0x3d9499(0xb4),'type':a35_0x3d9499(0xb0),'description':a35_0x3d9499(0xac)};function normalizeFunctionName(_0x8b07ca){const _0x3fd9ff=a35_0x3d9499,_0x1242ac=String(_0x8b07ca||'')[_0x3fd9ff(0xd3)]();if(!_0x1242ac||!FUNCTION_NAME_PATTERN[_0x3fd9ff(0xda)](_0x1242ac))throw CliErrors[_0x3fd9ff(0xd4)](_0x3fd9ff(0xa8));return _0x1242ac;}function readScriptFile(_0x3fe2ef){const _0xc952a5=a35_0x3d9499;if(!_0x3fe2ef)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x3fe2ef))throw CliErrors[_0xc952a5(0xd4)](_0xc952a5(0xdb)+_0x3fe2ef);if(!statSync(_0x3fe2ef)['isFile']())throw CliErrors[_0xc952a5(0xd4)](_0xc952a5(0xad)+_0x3fe2ef);const _0x4da51f=readFileSync(_0x3fe2ef,_0xc952a5(0xe1));if(!_0x4da51f[_0xc952a5(0xd3)]())throw CliErrors[_0xc952a5(0xd4)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x4da51f;}function optionalTrimmed(_0x56beae){const _0x947df5=a35_0x3d9499,_0x33abbc=String(_0x56beae||'')[_0x947df5(0xd3)]();return _0x33abbc||undefined;}function summarizeBff(_0x2b8f5a){const _0x143b56=a35_0x3d9499;return{'id':_0x2b8f5a['id'],'appCode':_0x2b8f5a['appCode'],'functionName':_0x2b8f5a['functionName'],'description':_0x2b8f5a['description'],'scriptType':_0x2b8f5a[_0x143b56(0xba)],'version':_0x2b8f5a[_0x143b56(0xb2)],'gmtModified':_0x2b8f5a[_0x143b56(0xb1)],'updateTime':_0x2b8f5a[_0x143b56(0xc5)]};}function a35_0x5d13(){const _0x4d3f23=['Optional\x20source\x20RuntimeAgent\x20session\x20id','File\x20is\x20not\x20a\x20regular\x20file:\x20','keys','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','string','gmtModified','version','Created\x20personal\x20BFF\x20','source-session-id','createTime','Executed\x20personal\x20BFF\x20','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','verbose','scriptType','/client/runtime-bff/personal/create','2396085kkqock','1416488pIawoS','/update','flag','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','appCode','str','update','98EYkbHi','updateTime','create','high-risk-write','gmtCreate','scriptContent','Preview:\x20create\x20personal\x20BFF\x20','build','params','44450131nWHIKq','413952nMRDrT','length','Personal\x20BFF\x20script\x20ID','3571592ZQKVgH','createUserId','trim','validation','Show\x20one\x20personal\x20BFF\x20by\x20id','--params\x20must\x20be\x20a\x20JSON\x20object.','body','根据本地脚本文件创建个人\x20BFF','functionName','test','File\x20not\x20found:\x20','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','Personal\x20BFF\x20description','personal-bff','name','2UNKEgq','utf8','10CVUEKG','detail','file','POST','num','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','7288GoiJfc','description','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','read','8774645vosiou','7191hkehme'];a35_0x5d13=function(){return _0x4d3f23;};return a35_0x5d13();}function detailBff(_0x17767d){const _0x50e493=a35_0x3d9499;return{'id':_0x17767d['id'],'appCode':_0x17767d[_0x50e493(0xc1)],'functionName':_0x17767d[_0x50e493(0xd9)],'description':_0x17767d[_0x50e493(0xa7)],'scriptType':_0x17767d[_0x50e493(0xba)],'scriptContent':_0x17767d[_0x50e493(0xc9)]??'','config':_0x17767d['config'],'version':_0x17767d[_0x50e493(0xb2)],'createUserId':_0x17767d[_0x50e493(0xd2)],'gmtCreate':_0x17767d[_0x50e493(0xc8)],'gmtModified':_0x17767d[_0x50e493(0xb1)],'createTime':_0x17767d[_0x50e493(0xb5)],'updateTime':_0x17767d[_0x50e493(0xc5)]};}function buildCreateInput(_0xec741c){const _0x296530=a35_0x3d9499;return{'functionName':normalizeFunctionName(_0xec741c[_0x296530(0xc2)](_0x296530(0xdf))),...optionalTrimmed(_0xec741c['str'](_0x296530(0xa7)))?{'description':optionalTrimmed(_0xec741c[_0x296530(0xc2)](_0x296530(0xa7)))}:{},'scriptContent':readScriptFile(_0xec741c['str'](_0x296530(0xa2))),...optionalTrimmed(_0xec741c[_0x296530(0xc2)]('source-session-id'))?{'sourceSessionId':optionalTrimmed(_0xec741c[_0x296530(0xc2)](_0x296530(0xb4)))}:{}};}function buildUpdateInput(_0x384d66){const _0x14425a=a35_0x3d9499,_0x2bccc2={};optionalTrimmed(_0x384d66[_0x14425a(0xc2)]('name'))&&(_0x2bccc2['functionName']=normalizeFunctionName(_0x384d66['str'](_0x14425a(0xdf))));_0x384d66['flag'](_0x14425a(0xa7))!==undefined&&(_0x2bccc2[_0x14425a(0xa7)]=_0x384d66[_0x14425a(0xc2)]('description'));optionalTrimmed(_0x384d66[_0x14425a(0xc2)](_0x14425a(0xa2)))&&(_0x2bccc2[_0x14425a(0xc9)]=readScriptFile(_0x384d66[_0x14425a(0xc2)](_0x14425a(0xa2))));_0x384d66[_0x14425a(0xbf)]('source-session-id')!==undefined&&(_0x2bccc2['sourceSessionId']=_0x384d66[_0x14425a(0xc2)]('source-session-id'));if(Object[_0x14425a(0xae)](_0x2bccc2)[_0x14425a(0xcf)]===0x0)throw CliErrors[_0x14425a(0xd4)](_0x14425a(0xc0));return _0x2bccc2;}function a35_0x2283(_0x43a4b3,_0x3857ef){_0x43a4b3=_0x43a4b3-0xa0;const _0x5d13d7=a35_0x5d13();let _0x228312=_0x5d13d7[_0x43a4b3];return _0x228312;}function parseExecParams(_0x183946){const _0x3ca5f0=a35_0x3d9499,_0x12a3bc=parseJsonParams(_0x183946)??{};if(Array['isArray'](_0x12a3bc))throw CliErrors[_0x3ca5f0(0xd4)](_0x3ca5f0(0xd6));return _0x12a3bc;}const personalBffList={'service':a35_0x3d9499(0xde),'command':'list','description':a35_0x3d9499(0xdc),'risk':a35_0x3d9499(0xa9),'flags':[VERBOSE_FLAG],async 'execute'(_0x40857d){const _0x2556fd=a35_0x3d9499,_0x4f5d4c=await listPersonalBffs(_0x40857d[_0x2556fd(0xc1)]);return{'ok':!![],'data':{'total':_0x4f5d4c[_0x2556fd(0xcf)],'items':_0x40857d['bool'](_0x2556fd(0xb9))?_0x4f5d4c:_0x4f5d4c['map'](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a35_0x3d9499(0xa1),'description':a35_0x3d9499(0xd5),'risk':a35_0x3d9499(0xa9),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x19f2d6){const _0x590acd=a35_0x3d9499,_0x4bba69=await getPersonalBff(_0x19f2d6[_0x590acd(0xa4)]('id'),_0x19f2d6[_0x590acd(0xc1)]);return{'ok':!![],'data':detailBff(_0x4bba69)};}},personalBffCreate={'service':'personal-bff','command':a35_0x3d9499(0xc6),'description':a35_0x3d9499(0xd8),'risk':'write','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3cc036){const _0x56749a=a35_0x3d9499,_0x56d492=buildCreateInput(_0x3cc036),_0x1db24f=await createPersonalBff(_0x3cc036[_0x56749a(0xc1)],_0x56d492);return{'ok':!![],'data':detailBff(_0x1db24f),'message':_0x56749a(0xb3)+_0x1db24f['id']+(_0x1db24f[_0x56749a(0xd9)]?'\x20('+_0x1db24f[_0x56749a(0xd9)]+')':'')};},async 'dryRun'(_0x59cc9f){const _0xe2c13b=a35_0x3d9499,_0x4ece7d=buildCreateInput(_0x59cc9f);return dryRun(_0xe2c13b(0xa3),_0xe2c13b(0xbb))[_0xe2c13b(0xd7)]({'appCode':_0x59cc9f[_0xe2c13b(0xc1)],..._0x4ece7d})[_0xe2c13b(0xa7)](_0xe2c13b(0xca)+_0x4ece7d[_0xe2c13b(0xd9)])[_0xe2c13b(0xcb)]();}},personalBffUpdate={'service':a35_0x3d9499(0xde),'command':a35_0x3d9499(0xc3),'description':'根据\x20ID\x20更新个人\x20BFF','risk':'write','flags':[{...ID_FLAG,'description':a35_0x3d9499(0xd0)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x26fcc2){const _0x1a0de4=a35_0x3d9499,_0x307a18=_0x26fcc2[_0x1a0de4(0xa4)]('id'),_0x126787=buildUpdateInput(_0x26fcc2),_0x2d9bcd=await updatePersonalBff(_0x307a18,_0x26fcc2[_0x1a0de4(0xc1)],_0x126787);return{'ok':!![],'data':detailBff(_0x2d9bcd),'message':'Updated\x20personal\x20BFF\x20'+_0x2d9bcd['id']+(_0x2d9bcd[_0x1a0de4(0xd9)]?'\x20('+_0x2d9bcd[_0x1a0de4(0xd9)]+')':'')};},async 'dryRun'(_0x5e06ed){const _0x32a4ea=a35_0x3d9499,_0x46f55d=_0x5e06ed[_0x32a4ea(0xa4)]('id'),_0x10529e=buildUpdateInput(_0x5e06ed);return dryRun('POST','/client/runtime-bff/personal/'+_0x46f55d+_0x32a4ea(0xbe))[_0x32a4ea(0xd7)]({'appCode':_0x5e06ed[_0x32a4ea(0xc1)],..._0x10529e})[_0x32a4ea(0xa7)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x46f55d)[_0x32a4ea(0xcb)]();}},personalBffExec={'service':a35_0x3d9499(0xde),'command':'exec','description':a35_0x3d9499(0xb7),'risk':a35_0x3d9499(0xc7),'flags':[{...ID_FLAG,'description':a35_0x3d9499(0xd0)},{...PARAMS_FLAG,'description':a35_0x3d9499(0xaf)}],async 'validate'(_0x22147c){const _0x5c0e54=a35_0x3d9499;parseExecParams(_0x22147c[_0x5c0e54(0xc2)]('params'));},async 'execute'(_0x56cc34){const _0x4463af=a35_0x3d9499,_0x2b24eb=_0x56cc34[_0x4463af(0xa4)]('id'),_0xe09625=parseExecParams(_0x56cc34[_0x4463af(0xc2)](_0x4463af(0xcc))),_0x57dabf=await executePersonalBff(_0x2b24eb,_0x56cc34[_0x4463af(0xc1)],_0xe09625);return{'ok':!![],'data':{'result':_0x57dabf},'message':_0x4463af(0xb6)+_0x2b24eb};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x3f8dde=a36_0x3473;(function(_0x2bf63f,_0x2ec0ea){const _0x1fe768=a36_0x3473,_0x491ac2=_0x2bf63f();while(!![]){try{const _0x1a2df5=-parseInt(_0x1fe768(0x178))/0x1*(parseInt(_0x1fe768(0x18e))/0x2)+-parseInt(_0x1fe768(0x189))/0x3*(parseInt(_0x1fe768(0x193))/0x4)+-parseInt(_0x1fe768(0x183))/0x5+-parseInt(_0x1fe768(0x17a))/0x6+-parseInt(_0x1fe768(0x19c))/0x7+-parseInt(_0x1fe768(0x18a))/0x8*(-parseInt(_0x1fe768(0x181))/0x9)+parseInt(_0x1fe768(0x19e))/0xa;if(_0x1a2df5===_0x2ec0ea)break;else _0x491ac2['push'](_0x491ac2['shift']());}catch(_0x4a2591){_0x491ac2['push'](_0x491ac2['shift']());}}}(a36_0x3a56,0x5ad85));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();function a36_0x3a56(){const _0x433e49=['service','set','Knowledge\x20Base','Datasets','79266AvOXpt','40CayNOS','Instant\x20API','Runtime\x20App\x20Config','map','5680NRpbwz','Self\x20Update','Configuration','BFF\x20Scripts','push','64PzebHK','CLI\x20Built-in\x20Skill','has','Artifacts','login','install','isSingleCommand','Service\x20Tree','read','4643800YHUCHt','values','22019120ztbdMr','description','\x20\x20[write]','get','OCR','Skills','API\x20Documentation','command','SQL\x20Queries','7pvHubw','\x20\x20[high-risk-write]','814446iRjOwN','Logs','Agent\x20Schedules','run','File','list','Workspace','197784XwOHWm','risk','3489590Xysfhj','defaultCommand'];a36_0x3a56=function(){return _0x433e49;};return a36_0x3a56();}function a36_0x3473(_0x5011e6,_0x572688){_0x5011e6=_0x5011e6-0x178;const _0x3a5659=a36_0x3a56();let _0x3473d5=_0x3a5659[_0x5011e6];return _0x3473d5;}export const serviceGroups=new Map();function registerDefinitions(_0x39ba30){const _0x588864=a36_0x3473;for(const _0x2d7de0 of _0x39ba30){definitions[_0x588864(0x186)](_0x2d7de0[_0x588864(0x185)]+':'+_0x2d7de0[_0x588864(0x1a5)],_0x2d7de0);let _0x131bd5=serviceGroups[_0x588864(0x1a1)](_0x2d7de0['service']);!_0x131bd5&&(_0x131bd5=[],serviceGroups[_0x588864(0x186)](_0x2d7de0[_0x588864(0x185)],_0x131bd5)),_0x131bd5[_0x588864(0x192)](_0x2d7de0);}}function registerService(_0x3aae1a,_0x4896e9,_0x3958ec){const _0x5cde79=a36_0x3473;registerDefinitions(_0x4896e9);const _0xfbcc44=_0x20f867=>_0x20f867===_0x5cde79(0x19b)?'':_0x20f867==='write'?_0x5cde79(0x1a0):_0x5cde79(0x179),_0x154fec={'service':_0x4896e9[0x0][_0x5cde79(0x185)],'label':_0x3aae1a,'commands':_0x4896e9[_0x5cde79(0x18d)](_0x183584=>({'command':_0x183584[_0x5cde79(0x1a5)],'description':_0x183584[_0x5cde79(0x19f)],'tag':_0xfbcc44(_0x183584[_0x5cde79(0x182)])})),'defaultCommand':_0x3958ec?.[_0x5cde79(0x184)]??(_0x3958ec?.[_0x5cde79(0x199)]?_0x4896e9[0x0]['command']:undefined),'isSingleCommand':_0x3958ec?.[_0x5cde79(0x199)]};serviceRegistry[_0x5cde79(0x192)](_0x154fec),serviceByName['set'](_0x154fec[_0x5cde79(0x185)],_0x154fec);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x3f8dde(0x197)}),registerService('App\x20Management',appDefinitions,{'defaultCommand':a36_0x3f8dde(0x17f)}),registerService(a36_0x3f8dde(0x180),workspaceDefinitions),registerService(a36_0x3f8dde(0x18c),appConfigDefinitions),registerService(a36_0x3f8dde(0x190),configDefinitions,{'defaultCommand':a36_0x3f8dde(0x17f)}),registerService(a36_0x3f8dde(0x1a4),apiDocDefinitions),registerService(a36_0x3f8dde(0x188),datasetDefinitions),registerService(a36_0x3f8dde(0x18b),dataDefinitions),registerService(a36_0x3f8dde(0x1a6),sqlDefinitions),registerService(a36_0x3f8dde(0x191),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService(a36_0x3f8dde(0x196),artifactDefinitions),registerService(a36_0x3f8dde(0x17e),fileDefinitions),registerService(a36_0x3f8dde(0x1a2),ocrDefinitions),registerService(a36_0x3f8dde(0x187),kbDefinitions),registerService(a36_0x3f8dde(0x17c),scheduleDefinitions,{'defaultCommand':a36_0x3f8dde(0x17f)}),registerService(a36_0x3f8dde(0x19a),serviceDefinitions,{'defaultCommand':'list'}),registerService(a36_0x3f8dde(0x1a3),skillDefinitions,{'defaultCommand':a36_0x3f8dde(0x198)}),registerService(a36_0x3f8dde(0x194),cliSkillDefinitions,{'defaultCommand':'install'}),registerService(a36_0x3f8dde(0x18f),[updateDefinition],{'defaultCommand':a36_0x3f8dde(0x17d),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x3f8dde(0x17b),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x3e751a,_0x3202e6){return definitions['get'](_0x3e751a+':'+_0x3202e6);}export function isKnownService(_0x39b06d){const _0x2df082=a36_0x3f8dde;return serviceByName[_0x2df082(0x195)](_0x39b06d);}export function getServiceEntry(_0x168db2){const _0x5bd4af=a36_0x3f8dde;return serviceByName[_0x5bd4af(0x1a1)](_0x168db2);}export function getAllDefinitions(){const _0xeb616c=a36_0x3f8dde;return Array['from'](definitions[_0xeb616c(0x19d)]());}
1
+ const a36_0x3ba8a0=a36_0x295f;(function(_0x385e00,_0x1e2b5f){const _0x1aa63d=a36_0x295f,_0x18c4e6=_0x385e00();while(!![]){try{const _0x5cdf0d=parseInt(_0x1aa63d(0xef))/0x1*(-parseInt(_0x1aa63d(0xea))/0x2)+-parseInt(_0x1aa63d(0xe6))/0x3*(-parseInt(_0x1aa63d(0xf0))/0x4)+parseInt(_0x1aa63d(0xf2))/0x5+-parseInt(_0x1aa63d(0xf9))/0x6+-parseInt(_0x1aa63d(0xfd))/0x7*(-parseInt(_0x1aa63d(0xee))/0x8)+-parseInt(_0x1aa63d(0xd9))/0x9*(parseInt(_0x1aa63d(0x101))/0xa)+parseInt(_0x1aa63d(0xdf))/0xb;if(_0x5cdf0d===_0x1e2b5f)break;else _0x18c4e6['push'](_0x18c4e6['shift']());}catch(_0x56ddf1){_0x18c4e6['push'](_0x18c4e6['shift']());}}}(a36_0x3b47,0xbd0ad));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';function a36_0x3b47(){const _0x52620a=['Schema','Logs','Personal\x20BFF','120ogWcod','service','has','run','Service\x20Tree','login','isSingleCommand','109323BXXAjO','Knowledge\x20Base','command','Authentication','SQL\x20Queries','install','4395501mhFZqv','get','map','BFF\x20Scripts','\x20\x20[write]','write','read','109521wHDyIb','push','\x20\x20[high-risk-write]','Agent\x20Schedules','14254brjCci','OCR','Artifacts','description','9490984SlXOVZ','205atnByV','116CSqBpb','set','4266945uaJpPY','values','list','App\x20Management','File','defaultCommand','Runtime\x20App\x20Config','6701640NhgwVb','Instant\x20API','risk','show','7dHVTBZ'];a36_0x3b47=function(){return _0x52620a;};return a36_0x3b47();}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();function a36_0x295f(_0x50f844,_0xe69dc9){_0x50f844=_0x50f844-0xd3;const _0x3b47ff=a36_0x3b47();let _0x295f6e=_0x3b47ff[_0x50f844];return _0x295f6e;}export const serviceGroups=new Map();function registerDefinitions(_0x4f3573){const _0x5ab77e=a36_0x295f;for(const _0x1da49b of _0x4f3573){definitions[_0x5ab77e(0xf1)](_0x1da49b[_0x5ab77e(0xd3)]+':'+_0x1da49b['command'],_0x1da49b);let _0x4025ba=serviceGroups['get'](_0x1da49b[_0x5ab77e(0xd3)]);!_0x4025ba&&(_0x4025ba=[],serviceGroups['set'](_0x1da49b[_0x5ab77e(0xd3)],_0x4025ba)),_0x4025ba[_0x5ab77e(0xe7)](_0x1da49b);}}function registerService(_0x415ef3,_0x229f27,_0x41da9f){const _0x30c141=a36_0x295f;registerDefinitions(_0x229f27);const _0x427689=_0x428bc3=>_0x428bc3===_0x30c141(0xe5)?'':_0x428bc3===_0x30c141(0xe4)?_0x30c141(0xe3):_0x30c141(0xe8),_0x480053={'service':_0x229f27[0x0][_0x30c141(0xd3)],'label':_0x415ef3,'commands':_0x229f27[_0x30c141(0xe1)](_0x156881=>({'command':_0x156881['command'],'description':_0x156881[_0x30c141(0xed)],'tag':_0x427689(_0x156881[_0x30c141(0xfb)])})),'defaultCommand':_0x41da9f?.[_0x30c141(0xf7)]??(_0x41da9f?.['isSingleCommand']?_0x229f27[0x0][_0x30c141(0xdb)]:undefined),'isSingleCommand':_0x41da9f?.[_0x30c141(0xd8)]};serviceRegistry['push'](_0x480053),serviceByName[_0x30c141(0xf1)](_0x480053['service'],_0x480053);}registerService(a36_0x3ba8a0(0xdc),authDefinitions,{'defaultCommand':a36_0x3ba8a0(0xd7)}),registerService(a36_0x3ba8a0(0xf5),appDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService('Workspace',workspaceDefinitions),registerService(a36_0x3ba8a0(0xf8),appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService('API\x20Documentation',apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a36_0x3ba8a0(0xfa),dataDefinitions),registerService(a36_0x3ba8a0(0xdd),sqlDefinitions),registerService(a36_0x3ba8a0(0xe2),bffDefinitions),registerService(a36_0x3ba8a0(0x100),personalBffDefinitions),registerService(a36_0x3ba8a0(0xec),artifactDefinitions),registerService(a36_0x3ba8a0(0xf6),fileDefinitions),registerService(a36_0x3ba8a0(0xeb),ocrDefinitions),registerService(a36_0x3ba8a0(0xda),kbDefinitions),registerService(a36_0x3ba8a0(0xe9),scheduleDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService(a36_0x3ba8a0(0xd6),serviceDefinitions,{'defaultCommand':a36_0x3ba8a0(0xf4)}),registerService('Skills',skillDefinitions,{'defaultCommand':a36_0x3ba8a0(0xde)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a36_0x3ba8a0(0xde)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x3ba8a0(0xd5),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x3ba8a0(0xfe),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x3ba8a0(0xff),logsDefinitions,{'defaultCommand':a36_0x3ba8a0(0xfc)});export function findDefinition(_0x1d1c55,_0x268e69){const _0x5222f6=a36_0x3ba8a0;return definitions[_0x5222f6(0xe0)](_0x1d1c55+':'+_0x268e69);}export function isKnownService(_0x179b40){const _0x2dfcc4=a36_0x3ba8a0;return serviceByName[_0x2dfcc4(0xd4)](_0x179b40);}export function getServiceEntry(_0x33773e){const _0x5acd50=a36_0x3ba8a0;return serviceByName[_0x5acd50(0xe0)](_0x33773e);}export function getAllDefinitions(){const _0x4d86bb=a36_0x3ba8a0;return Array['from'](definitions[_0x4d86bb(0xf3)]());}
@@ -1 +1 @@
1
- const a37_0x1abb11=a37_0x420b;(function(_0x4eb012,_0xcbde8a){const _0x14e737=a37_0x420b,_0x5037f1=_0x4eb012();while(!![]){try{const _0x5c6da2=parseInt(_0x14e737(0xa9))/0x1+-parseInt(_0x14e737(0xd5))/0x2+-parseInt(_0x14e737(0xa7))/0x3+parseInt(_0x14e737(0xad))/0x4+parseInt(_0x14e737(0xa2))/0x5*(-parseInt(_0x14e737(0xb7))/0x6)+-parseInt(_0x14e737(0xc1))/0x7+-parseInt(_0x14e737(0xdb))/0x8*(-parseInt(_0x14e737(0x97))/0x9);if(_0x5c6da2===_0xcbde8a)break;else _0x5037f1['push'](_0x5037f1['shift']());}catch(_0x278700){_0x5037f1['push'](_0x5037f1['shift']());}}}(a37_0x4e83,0x6b5e7));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a37_0x420b(_0x1481e3,_0x1b786a){_0x1481e3=_0x1481e3-0x97;const _0x4e83df=a37_0x4e83();let _0x420b6b=_0x4e83df[_0x1481e3];return _0x420b6b;}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_0x1abb11(0x9a),'type':a37_0x1abb11(0xcd),'required':!![],'enum':[a37_0x1abb11(0xae),a37_0x1abb11(0xce)],'description':a37_0x1abb11(0xbc)},CRON_FLAG={'name':'cron','type':a37_0x1abb11(0xcd),'description':a37_0x1abb11(0xda)},SCHEDULED_AT_FLAG={'name':'scheduled-at','type':'string','description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x1abb11(0xb2),'type':a37_0x1abb11(0xcd),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a37_0x1abb11(0xd3),'type':a37_0x1abb11(0xcd),'required':!![],'description':a37_0x1abb11(0xc6)},CHANNEL_FLAG={'name':a37_0x1abb11(0x9f),'type':a37_0x1abb11(0xcd),'enum':[a37_0x1abb11(0xb0),a37_0x1abb11(0xaf)],'default':a37_0x1abb11(0xaf),'description':a37_0x1abb11(0x9d)},SCHEDULE_ID_FLAG={'name':a37_0x1abb11(0xd4),'type':a37_0x1abb11(0xcd),'required':!![],'description':a37_0x1abb11(0xc4),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x1abb11(0xbd)}},LIMIT_FLAG={'name':a37_0x1abb11(0xba),'type':a37_0x1abb11(0xc5),'default':0x14,'description':a37_0x1abb11(0xd8)},CURSOR_FLAG={'name':a37_0x1abb11(0xde),'type':a37_0x1abb11(0xcd),'description':a37_0x1abb11(0xa4)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x175ff1){const _0x20f3c9=a37_0x1abb11,_0x51fefc=_0x175ff1['str']('kind'),_0x2d225d=_0x175ff1['str'](_0x20f3c9(0xb2))['trim'](),_0x40fe61=_0x175ff1['str'](_0x20f3c9(0xd3))[_0x20f3c9(0xcf)](),_0x323903=_0x175ff1[_0x20f3c9(0xd6)](_0x20f3c9(0x9f)),_0x165acd=_0x175ff1['str'](_0x20f3c9(0xbe)),_0x1c2707=_0x175ff1['str'](_0x20f3c9(0xd7));if(!_0x2d225d)throw CliErrors[_0x20f3c9(0xa0)]('--title\x20must\x20not\x20be\x20blank.');if(!_0x40fe61)throw CliErrors[_0x20f3c9(0xa0)](_0x20f3c9(0xb4));if(_0x51fefc===_0x20f3c9(0xae)){if(!_0x165acd||_0x1c2707)throw CliErrors[_0x20f3c9(0xa0)]('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x51fefc,'timezone':_0x20f3c9(0xbb),'cron':_0x165acd,'title':_0x2d225d,'prompt':_0x40fe61,'channel':_0x323903};}if(_0x51fefc===_0x20f3c9(0xce)){if(!_0x1c2707||_0x165acd)throw CliErrors[_0x20f3c9(0xa0)](_0x20f3c9(0xcb));return{'kind':_0x51fefc,'timezone':_0x20f3c9(0xbb),'scheduledAt':_0x1c2707,'title':_0x2d225d,'prompt':_0x40fe61,'channel':_0x323903};}throw CliErrors[_0x20f3c9(0xa0)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function a37_0x4e83(){const _0x4328fd=['Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','create','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','1980186YLmpLN','high-risk-write','630880cHVBSo','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','\x20schedule\x20','Preview:\x20run\x20schedule\x20','2312644vlDZmB','CRON','premium','auto','isSafeInteger','title','\x20from\x20schedule\x20','--prompt\x20must\x20not\x20be\x20blank.','run','/api/harness/apps/','30tksMIA','/run','read','limit','UTC','Schedule\x20kind:\x20CRON\x20or\x20ONCE','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','cron','Create\x20a\x20recurring\x20or\x20one-time\x20Agent\x20schedule','Preview:\x20delete\x20schedule\x20','2777516kEISLv','POST','appCode','Schedule\x20UUID','number','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','taskId','scheduleId','list','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','detail','string','ONCE','trim','DELETE','\x20immediately','length','prompt','schedule-id','1391254dXvMGy','str','scheduled-at','Page\x20size\x20from\x201\x20to\x20100','Schedule\x20input\x20is\x20valid','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','11051912DyGELt','body','schedule','cursor','9CXolFi','Preview:\x20create\x20an\x20Agent\x20schedule','build','kind','Delete\x20a\x20schedule\x20and\x20stop\x20its\x20future\x20triggers','description','Task\x20channel:\x20auto\x20or\x20premium','Run\x20one\x20schedule\x20immediately\x20and\x20create\x20a\x20Task','channel','validation','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','398270DxAsgk','num'];a37_0x4e83=function(){return _0x4328fd;};return a37_0x4e83();}function scheduleCollectionPath(_0x88391c){const _0x53c877=a37_0x1abb11;return _0x53c877(0xb6)+encodeURIComponent(_0x88391c)+'/schedules';}function scheduleItemPath(_0x55e5b0,_0x446264){return scheduleCollectionPath(_0x55e5b0)+'/'+encodeURIComponent(_0x446264);}const scheduleValidate={'service':a37_0x1abb11(0xdd),'command':'validate','description':a37_0x1abb11(0xa1),'risk':'read','flags':INPUT_FLAGS,async 'validate'(_0x4bec6b){readScheduleInput(_0x4bec6b);},async 'execute'(_0x2aa0dd){const _0xd7900f=a37_0x1abb11,_0x1d1423=readScheduleInput(_0x2aa0dd),_0x2440e0=await validateRuntimeSchedule(_0x2aa0dd[_0xd7900f(0xc3)],_0x1d1423);return{'ok':!![],'data':_0x2440e0,'message':_0xd7900f(0xd9)};}},scheduleCreate={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xa5),'description':a37_0x1abb11(0xbf),'risk':'high-risk-write','flags':INPUT_FLAGS,async 'validate'(_0x8fde16){readScheduleInput(_0x8fde16);},async 'execute'(_0x49f7b0){const _0x532118=a37_0x1abb11,_0x8a98c7=readScheduleInput(_0x49f7b0),_0x4c4ef9=await validateRuntimeSchedule(_0x49f7b0[_0x532118(0xc3)],_0x8a98c7),_0x8d4fde=await createRuntimeSchedule(_0x49f7b0[_0x532118(0xc3)],_0x4c4ef9);return{'ok':!![],'data':_0x8d4fde,'message':'Created\x20'+_0x8d4fde['kind']+_0x532118(0xab)+_0x8d4fde[_0x532118(0xc9)]};},async 'dryRun'(_0x1bf673){const _0x54dc40=a37_0x1abb11,_0x707f3f=readScheduleInput(_0x1bf673);return dryRun('POST',scheduleCollectionPath(_0x1bf673['appCode']))[_0x54dc40(0xdc)](_0x707f3f)['description'](_0x54dc40(0x98))[_0x54dc40(0x99)]();}},scheduleList={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xca),'description':a37_0x1abb11(0xaa),'risk':a37_0x1abb11(0xb9),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3d48){const _0x5f0fa1=a37_0x1abb11,_0x39f5f6=_0x3d48['num']('limit');if(!Number[_0x5f0fa1(0xb1)](_0x39f5f6)||_0x39f5f6<0x1||_0x39f5f6>0x64)throw CliErrors[_0x5f0fa1(0xa0)](_0x5f0fa1(0xa6));const _0x5b2907=_0x3d48[_0x5f0fa1(0xd6)](_0x5f0fa1(0xde));if(_0x5b2907&&(_0x5b2907[_0x5f0fa1(0xd2)]>0x400||_0x5b2907[_0x5f0fa1(0xcf)]()!==_0x5b2907))throw CliErrors['validation'](_0x5f0fa1(0xc7));},async 'execute'(_0x4bf5a4){const _0x4cff4f=a37_0x1abb11,_0x31d1d9=_0x4bf5a4[_0x4cff4f(0xd6)](_0x4cff4f(0xde)),_0x423718=await listRuntimeSchedules(_0x4bf5a4['appCode'],{'limit':_0x4bf5a4[_0x4cff4f(0xa3)](_0x4cff4f(0xba)),..._0x31d1d9?{'cursor':_0x31d1d9}:{}});return{'ok':!![],'data':_0x423718};}},scheduleDetail={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xcc),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x1abb11(0xb9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x473f7d){const _0x3fa3a7=a37_0x1abb11,_0x9966b2=await getRuntimeSchedule(_0x473f7d['appCode'],_0x473f7d['str'](_0x3fa3a7(0xd4)));return{'ok':!![],'data':_0x9966b2};}},scheduleRun={'service':a37_0x1abb11(0xdd),'command':a37_0x1abb11(0xb5),'description':a37_0x1abb11(0x9e),'risk':a37_0x1abb11(0xa8),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x2833ef){const _0xb9c2d3=a37_0x1abb11,_0x1f1d90=_0x2833ef[_0xb9c2d3(0xd6)](_0xb9c2d3(0xd4)),_0x54b8d4=await runRuntimeSchedule(_0x2833ef[_0xb9c2d3(0xc3)],_0x1f1d90);return{'ok':!![],'data':_0x54b8d4,'message':'Queued\x20Task\x20'+_0x54b8d4[_0xb9c2d3(0xc8)]+_0xb9c2d3(0xb3)+_0x1f1d90};},async 'dryRun'(_0x476d65){const _0x27d10d=a37_0x1abb11,_0x1e59bb=_0x476d65['str'](_0x27d10d(0xd4));return dryRun(_0x27d10d(0xc2),scheduleItemPath(_0x476d65[_0x27d10d(0xc3)],_0x1e59bb)+_0x27d10d(0xb8))['description'](_0x27d10d(0xac)+_0x1e59bb+_0x27d10d(0xd1))['build']();}},scheduleDelete={'service':'schedule','command':'delete','description':a37_0x1abb11(0x9b),'risk':'high-risk-write','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x57e38e){const _0x1e9e38=a37_0x1abb11,_0x237b53=_0x57e38e[_0x1e9e38(0xd6)](_0x1e9e38(0xd4)),_0x323b6e=await deleteRuntimeSchedule(_0x57e38e[_0x1e9e38(0xc3)],_0x237b53);return{'ok':!![],'data':_0x323b6e,'message':'Deleted\x20schedule\x20'+_0x237b53};},async 'dryRun'(_0xd1bd0a){const _0x40417c=a37_0x1abb11,_0xac5a79=_0xd1bd0a['str']('schedule-id');return dryRun(_0x40417c(0xd0),scheduleItemPath(_0xd1bd0a[_0x40417c(0xc3)],_0xac5a79))[_0x40417c(0x9c)](_0x40417c(0xc0)+_0xac5a79)[_0x40417c(0x99)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x4b747b=a37_0x7883;(function(_0x377c5d,_0x4613ca){const _0x21cf45=a37_0x7883,_0x17a003=_0x377c5d();while(!![]){try{const _0x18b04c=parseInt(_0x21cf45(0xc0))/0x1*(-parseInt(_0x21cf45(0xe8))/0x2)+-parseInt(_0x21cf45(0xe3))/0x3+parseInt(_0x21cf45(0xcc))/0x4*(parseInt(_0x21cf45(0xc7))/0x5)+-parseInt(_0x21cf45(0xe1))/0x6*(parseInt(_0x21cf45(0xc4))/0x7)+parseInt(_0x21cf45(0xac))/0x8+-parseInt(_0x21cf45(0xc8))/0x9*(-parseInt(_0x21cf45(0xdb))/0xa)+parseInt(_0x21cf45(0xad))/0xb*(parseInt(_0x21cf45(0xc1))/0xc);if(_0x18b04c===_0x4613ca)break;else _0x17a003['push'](_0x17a003['shift']());}catch(_0xee4fdb){_0x17a003['push'](_0x17a003['shift']());}}}(a37_0x40d3,0xb92af));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';function a37_0x7883(_0x340ac4,_0x57a5e4){_0x340ac4=_0x340ac4-0xac;const _0x40d319=a37_0x40d3();let _0x78838f=_0x40d319[_0x340ac4];return _0x78838f;}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_0x4b747b(0xf8),'type':a37_0x4b747b(0xb3),'required':!![],'enum':[a37_0x4b747b(0xdc),a37_0x4b747b(0xde)],'description':a37_0x4b747b(0xb4)},CRON_FLAG={'name':a37_0x4b747b(0xd8),'type':a37_0x4b747b(0xb3),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x4b747b(0xd1),'type':a37_0x4b747b(0xb3),'description':a37_0x4b747b(0xbd)},TITLE_FLAG={'name':a37_0x4b747b(0xf1),'type':'string','required':!![],'description':a37_0x4b747b(0xcf)},PROMPT_FLAG={'name':a37_0x4b747b(0xea),'type':'string','required':!![],'description':a37_0x4b747b(0xd9)},CHANNEL_FLAG={'name':a37_0x4b747b(0xaf),'type':'string','enum':[a37_0x4b747b(0xd4),a37_0x4b747b(0xef)],'default':a37_0x4b747b(0xef),'description':a37_0x4b747b(0xd3)},SCHEDULE_ID_FLAG={'name':a37_0x4b747b(0xf0),'type':'string','required':!![],'description':a37_0x4b747b(0xcd),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x4b747b(0xc9)}},LIMIT_FLAG={'name':'limit','type':a37_0x4b747b(0xbf),'default':0x14,'description':'Page\x20size\x20from\x201\x20to\x20100'},CURSOR_FLAG={'name':a37_0x4b747b(0xb8),'type':a37_0x4b747b(0xb3),'description':a37_0x4b747b(0xb2)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x1c25e7){const _0x3dc6f7=a37_0x4b747b,_0x29aae3=_0x1c25e7[_0x3dc6f7(0xbc)](_0x3dc6f7(0xf8)),_0x343f3c=_0x1c25e7['str'](_0x3dc6f7(0xf1))[_0x3dc6f7(0xee)](),_0x26dfd4=_0x1c25e7['str'](_0x3dc6f7(0xea))['trim'](),_0x1075d8=_0x1c25e7[_0x3dc6f7(0xbc)](_0x3dc6f7(0xaf)),_0x53401c=_0x1c25e7[_0x3dc6f7(0xbc)]('cron'),_0x598d3b=_0x1c25e7[_0x3dc6f7(0xbc)](_0x3dc6f7(0xd1));if(!_0x343f3c)throw CliErrors['validation']('--title\x20must\x20not\x20be\x20blank.');if(!_0x26dfd4)throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xd7));if(_0x29aae3===_0x3dc6f7(0xdc)){if(!_0x53401c||_0x598d3b)throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xe9));return{'kind':_0x29aae3,'timezone':_0x3dc6f7(0xe6),'cron':_0x53401c,'title':_0x343f3c,'prompt':_0x26dfd4,'channel':_0x1075d8};}if(_0x29aae3==='ONCE'){if(!_0x598d3b||_0x53401c)throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xf7));return{'kind':_0x29aae3,'timezone':'UTC','scheduledAt':_0x598d3b,'title':_0x343f3c,'prompt':_0x26dfd4,'channel':_0x1075d8};}throw CliErrors[_0x3dc6f7(0xae)](_0x3dc6f7(0xf4));}function scheduleCollectionPath(_0x5386b0){const _0x2ad22a=a37_0x4b747b;return _0x2ad22a(0xda)+encodeURIComponent(_0x5386b0)+_0x2ad22a(0xb7);}function scheduleItemPath(_0x4e1072,_0x5efa05){return scheduleCollectionPath(_0x4e1072)+'/'+encodeURIComponent(_0x5efa05);}function a37_0x40d3(){const _0x1a3f19=['Deleted\x20schedule\x20','223728HQnUuf','Schedule\x20UUID','high-risk-write','Schedule\x20title','Created\x20','scheduled-at','description','Task\x20channel:\x20auto\x20or\x20premium','auto','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','appCode','--prompt\x20must\x20not\x20be\x20blank.','cron','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','/api/harness/apps/','20ZcCbzp','CRON','/run','ONCE','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','Preview:\x20create\x20an\x20Agent\x20schedule','342282nVUNyS','list','2957055tzIrtH','立即运行一次定时任务并创建\x20Task','schedule','UTC','删除定时任务并停止其后续触发','2IWtUNY','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','prompt','build','body','isSafeInteger','trim','premium','schedule-id','title','Preview:\x20delete\x20schedule\x20','scheduleId','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','Schedule\x20input\x20is\x20valid','read','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','kind','963920lUKWiB','15414388aItZrq','validation','channel','num','limit','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','string','Schedule\x20kind:\x20CRON\x20or\x20ONCE','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Preview:\x20run\x20schedule\x20','/schedules','cursor','Queued\x20Task\x20','length','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','str','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','run','number','1047398RNdink','12GfKFqp','delete','POST','70nCWDQC','Show\x20one\x20schedule\x20by\x20schedule\x20ID','validate','115JUDkpi','2491947hxDqIC','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','detail'];a37_0x40d3=function(){return _0x1a3f19;};return a37_0x40d3();}const scheduleValidate={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xc6),'description':a37_0x4b747b(0xdf),'risk':a37_0x4b747b(0xf6),'flags':INPUT_FLAGS,async 'validate'(_0x167250){readScheduleInput(_0x167250);},async 'execute'(_0x438579){const _0xb5101=a37_0x4b747b,_0xad2dc6=readScheduleInput(_0x438579),_0x3a69a9=await validateRuntimeSchedule(_0x438579[_0xb5101(0xd6)],_0xad2dc6);return{'ok':!![],'data':_0x3a69a9,'message':_0xb5101(0xf5)};}},scheduleCreate={'service':a37_0x4b747b(0xe5),'command':'create','description':'创建周期性或单次执行的\x20Agent\x20定时任务','risk':a37_0x4b747b(0xce),'flags':INPUT_FLAGS,async 'validate'(_0x246b41){readScheduleInput(_0x246b41);},async 'execute'(_0x2e5a40){const _0x2998b9=a37_0x4b747b,_0x392040=readScheduleInput(_0x2e5a40),_0x56215e=await validateRuntimeSchedule(_0x2e5a40[_0x2998b9(0xd6)],_0x392040),_0xd4be8c=await createRuntimeSchedule(_0x2e5a40[_0x2998b9(0xd6)],_0x56215e);return{'ok':!![],'data':_0xd4be8c,'message':_0x2998b9(0xd0)+_0xd4be8c[_0x2998b9(0xf8)]+'\x20schedule\x20'+_0xd4be8c[_0x2998b9(0xf3)]};},async 'dryRun'(_0x3ec642){const _0x4e9f14=a37_0x4b747b,_0x52b36f=readScheduleInput(_0x3ec642);return dryRun(_0x4e9f14(0xc3),scheduleCollectionPath(_0x3ec642[_0x4e9f14(0xd6)]))[_0x4e9f14(0xec)](_0x52b36f)['description'](_0x4e9f14(0xe0))['build']();}},scheduleList={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xe2),'description':a37_0x4b747b(0xbb),'risk':a37_0x4b747b(0xf6),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x25d674){const _0x52a3cc=a37_0x4b747b,_0x45b38a=_0x25d674['num'](_0x52a3cc(0xb1));if(!Number[_0x52a3cc(0xed)](_0x45b38a)||_0x45b38a<0x1||_0x45b38a>0x64)throw CliErrors[_0x52a3cc(0xae)](_0x52a3cc(0xb5));const _0x5572e6=_0x25d674[_0x52a3cc(0xbc)](_0x52a3cc(0xb8));if(_0x5572e6&&(_0x5572e6[_0x52a3cc(0xba)]>0x400||_0x5572e6[_0x52a3cc(0xee)]()!==_0x5572e6))throw CliErrors['validation'](_0x52a3cc(0xd5));},async 'execute'(_0x1aa283){const _0x117add=a37_0x4b747b,_0x59ee2c=_0x1aa283[_0x117add(0xbc)](_0x117add(0xb8)),_0x3a2713=await listRuntimeSchedules(_0x1aa283[_0x117add(0xd6)],{'limit':_0x1aa283[_0x117add(0xb0)](_0x117add(0xb1)),..._0x59ee2c?{'cursor':_0x59ee2c}:{}});return{'ok':!![],'data':_0x3a2713};}},scheduleDetail={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xca),'description':a37_0x4b747b(0xc5),'risk':'read','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x461f75){const _0x3ed5ea=a37_0x4b747b,_0x86b10b=await getRuntimeSchedule(_0x461f75[_0x3ed5ea(0xd6)],_0x461f75[_0x3ed5ea(0xbc)](_0x3ed5ea(0xf0)));return{'ok':!![],'data':_0x86b10b};}},scheduleRun={'service':'schedule','command':a37_0x4b747b(0xbe),'description':a37_0x4b747b(0xe4),'risk':a37_0x4b747b(0xce),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x12a13b){const _0x118808=a37_0x4b747b,_0x541e8a=_0x12a13b[_0x118808(0xbc)](_0x118808(0xf0)),_0x46d21e=await runRuntimeSchedule(_0x12a13b[_0x118808(0xd6)],_0x541e8a);return{'ok':!![],'data':_0x46d21e,'message':_0x118808(0xb9)+_0x46d21e['taskId']+'\x20from\x20schedule\x20'+_0x541e8a};},async 'dryRun'(_0x5ec3e5){const _0x267fb3=a37_0x4b747b,_0x3e019d=_0x5ec3e5[_0x267fb3(0xbc)](_0x267fb3(0xf0));return dryRun(_0x267fb3(0xc3),scheduleItemPath(_0x5ec3e5[_0x267fb3(0xd6)],_0x3e019d)+_0x267fb3(0xdd))[_0x267fb3(0xd2)](_0x267fb3(0xb6)+_0x3e019d+'\x20immediately')['build']();}},scheduleDelete={'service':a37_0x4b747b(0xe5),'command':a37_0x4b747b(0xc2),'description':a37_0x4b747b(0xe7),'risk':'high-risk-write','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x5c3c74){const _0x3acbe5=a37_0x4b747b,_0x3a2b8d=_0x5c3c74[_0x3acbe5(0xbc)](_0x3acbe5(0xf0)),_0xeca137=await deleteRuntimeSchedule(_0x5c3c74['appCode'],_0x3a2b8d);return{'ok':!![],'data':_0xeca137,'message':_0x3acbe5(0xcb)+_0x3a2b8d};},async 'dryRun'(_0x4d1319){const _0x143197=a37_0x4b747b,_0xb87974=_0x4d1319[_0x143197(0xbc)](_0x143197(0xf0));return dryRun('DELETE',scheduleItemPath(_0x4d1319[_0x143197(0xd6)],_0xb87974))[_0x143197(0xd2)](_0x143197(0xf2)+_0xb87974)[_0x143197(0xeb)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x2fcaaf=a38_0x3964;function a38_0x3964(_0x41d92d,_0x32c763){_0x41d92d=_0x41d92d-0x66;const _0x5be85d=a38_0x5be8();let _0x3964e1=_0x5be85d[_0x41d92d];return _0x3964e1;}(function(_0x34805a,_0x954664){const _0x1be59f=a38_0x3964,_0x536895=_0x34805a();while(!![]){try{const _0x2c9f41=-parseInt(_0x1be59f(0x6c))/0x1+-parseInt(_0x1be59f(0x6b))/0x2*(parseInt(_0x1be59f(0x70))/0x3)+-parseInt(_0x1be59f(0x68))/0x4+parseInt(_0x1be59f(0x67))/0x5*(parseInt(_0x1be59f(0x66))/0x6)+parseInt(_0x1be59f(0x6d))/0x7+parseInt(_0x1be59f(0x69))/0x8+parseInt(_0x1be59f(0x72))/0x9;if(_0x2c9f41===_0x954664)break;else _0x536895['push'](_0x536895['shift']());}catch(_0x616177){_0x536895['push'](_0x536895['shift']());}}}(a38_0x5be8,0xd10b2));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x1350bb){const _0x51ad7a=await buildSchemaPayload();return{'ok':!![],'data':_0x51ad7a};}function a38_0x5be8(){const _0x464605=['1438146uFYUrm','1656571aXmpHu','7832342cTtHRD','read','schema','3cgWTAy','export','14651037PFyNWn','786630JFlDHt','5DSmENa','275644yIJsPB','3383144hgkrHG','Export\x20machine-readable\x20command\x20schema\x20(JSON)'];a38_0x5be8=function(){return _0x464605;};return a38_0x5be8();}export const schemaDefinition={'service':a38_0x2fcaaf(0x6f),'command':a38_0x2fcaaf(0x71),'description':a38_0x2fcaaf(0x6a),'risk':a38_0x2fcaaf(0x6e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a38_0x5595e9=a38_0x1591;(function(_0x340878,_0xea9b15){const _0x1a7c44=a38_0x1591,_0x45b097=_0x340878();while(!![]){try{const _0x542a71=parseInt(_0x1a7c44(0x1ab))/0x1+parseInt(_0x1a7c44(0x1ae))/0x2+-parseInt(_0x1a7c44(0x1a9))/0x3*(-parseInt(_0x1a7c44(0x1ac))/0x4)+-parseInt(_0x1a7c44(0x1b3))/0x5*(-parseInt(_0x1a7c44(0x1a7))/0x6)+parseInt(_0x1a7c44(0x1b0))/0x7+-parseInt(_0x1a7c44(0x1ad))/0x8+parseInt(_0x1a7c44(0x1b2))/0x9*(-parseInt(_0x1a7c44(0x1a6))/0xa);if(_0x542a71===_0xea9b15)break;else _0x45b097['push'](_0x45b097['shift']());}catch(_0x5c522d){_0x45b097['push'](_0x45b097['shift']());}}}(a38_0x1d79,0x4598b));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0xc63ef){const _0x8ef9b=await buildSchemaPayload();return{'ok':!![],'data':_0x8ef9b};}export const schemaDefinition={'service':a38_0x5595e9(0x1af),'command':a38_0x5595e9(0x1b1),'description':a38_0x5595e9(0x1a8),'risk':a38_0x5595e9(0x1aa),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a38_0x1591(_0x173b5e,_0x1121ab){_0x173b5e=_0x173b5e-0x1a6;const _0x1d79af=a38_0x1d79();let _0x159158=_0x1d79af[_0x173b5e];return _0x159158;}function a38_0x1d79(){const _0x401765=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','3543kGrVdf','read','334627NOPaAi','376gvUMNf','3390680FZMwEy','327304WqckaY','schema','1366911DSQGLI','export','51219lSICOX','55lhdYIP','1010rmWeWa','261342MTKbug'];a38_0x1d79=function(){return _0x401765;};return a38_0x1d79();}