@lovrabet/lovrabet-cli 2.2.1-beta.1 → 2.2.2-beta.1

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 (136) 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/postinstall.js +1 -1
  103. package/lib/runtime/confirmation.js +1 -1
  104. package/lib/runtime/event.js +1 -1
  105. package/lib/runtime/index.js +1 -1
  106. package/lib/runtime/queue.js +1 -1
  107. package/lib/runtime/resolve.js +1 -1
  108. package/lib/skills/builtin-skill.js +1 -1
  109. package/lib/skills/npx-skills-add.js +1 -1
  110. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  111. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  112. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  113. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  114. package/lib/skills/runtime-skill-sync/links.js +1 -1
  115. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  116. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  117. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  118. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  119. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  120. package/lib/skills/runtime-skill-sync/push.js +1 -1
  121. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  122. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  123. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  124. package/lib/skills/runtime-skill-sync.js +1 -1
  125. package/lib/skills/skill-presence.js +1 -1
  126. package/lib/utils/apply-jq-filter.js +1 -1
  127. package/lib/utils/logger.js +1 -1
  128. package/lib/utils/lossless-json.js +1 -1
  129. package/lib/utils/params.js +1 -1
  130. package/lib/utils/platform.js +1 -1
  131. package/lib/utils/update-notice.js +1 -1
  132. package/lib/utils/version.js +1 -1
  133. package/lib/utils/write-cli-side-channel.js +1 -1
  134. package/package.json +2 -1
  135. package/skills/lovrabet/SKILL.md +1 -1
  136. package/skills/lovrabet.manifest.json +3 -3
@@ -1 +1 @@
1
- const a28_0x151a2c=a28_0x4ea3;(function(_0x50a0e0,_0x153ce8){const _0x205499=a28_0x4ea3,_0xe3cf39=_0x50a0e0();while(!![]){try{const _0x4c582d=parseInt(_0x205499(0x164))/0x1*(parseInt(_0x205499(0x159))/0x2)+-parseInt(_0x205499(0x162))/0x3+parseInt(_0x205499(0x165))/0x4+-parseInt(_0x205499(0x161))/0x5+parseInt(_0x205499(0x166))/0x6*(-parseInt(_0x205499(0x15d))/0x7)+-parseInt(_0x205499(0x15c))/0x8+parseInt(_0x205499(0x15b))/0x9;if(_0x4c582d===_0x153ce8)break;else _0xe3cf39['push'](_0xe3cf39['shift']());}catch(_0x3073b4){_0xe3cf39['push'](_0xe3cf39['shift']());}}}(a28_0x4ee9,0x66570));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';function a28_0x4ee9(){const _0x3fe6f7=['63884LNumnh','sdk-doc','9036981wEiipl','1732880sFdUPZ','1186815huLaQx','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','appCode','dataset','2779285ToOFih','1172865ZHYmqX','trim','12aEXQMW','2815312YPVuxm','18UyyNNG','code','str','string'];a28_0x4ee9=function(){return _0x3fe6f7;};return a28_0x4ee9();}import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x2b6373){const _0x57b308=a28_0x4ea3,_0x1e4621=typeof _0x2b6373===_0x57b308(0x158)?_0x2b6373[_0x57b308(0x163)]():'';return _0x1e4621||DEFAULT_MARKDOWN;}function a28_0x4ea3(_0x199bc6,_0x57e39a){_0x199bc6=_0x199bc6-0x157;const _0x4ee903=a28_0x4ee9();let _0x4ea3b8=_0x4ee903[_0x199bc6];return _0x4ea3b8;}export const datasetSdkDoc={'service':a28_0x151a2c(0x160),'command':a28_0x151a2c(0x15a),'description':a28_0x151a2c(0x15e),'risk':'read','flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x300b9a){const _0x2a4ec9=a28_0x151a2c,_0x14e060=_0x300b9a[_0x2a4ec9(0x157)](_0x2a4ec9(0x167)),_0x7424ee=await getDatasetSdkUsageDoc(_0x14e060,_0x300b9a[_0x2a4ec9(0x15f)]);return{'ok':!![],'data':{'code':_0x14e060,'appCode':_0x300b9a[_0x2a4ec9(0x15f)],'markdown':formatDatasetSdkMarkdown(_0x7424ee)}};}};
1
+ const a28_0x502be2=a28_0x4ef2;(function(_0x2f5cc8,_0x56d2bd){const _0xde7a=a28_0x4ef2,_0x2d30de=_0x2f5cc8();while(!![]){try{const _0x316165=parseInt(_0xde7a(0xe0))/0x1*(parseInt(_0xde7a(0xdb))/0x2)+parseInt(_0xde7a(0xe1))/0x3+parseInt(_0xde7a(0xe5))/0x4+parseInt(_0xde7a(0xdc))/0x5*(parseInt(_0xde7a(0xeb))/0x6)+-parseInt(_0xde7a(0xe2))/0x7*(-parseInt(_0xde7a(0xe6))/0x8)+parseInt(_0xde7a(0xec))/0x9+parseInt(_0xde7a(0xde))/0xa*(-parseInt(_0xde7a(0xe8))/0xb);if(_0x316165===_0x56d2bd)break;else _0x2d30de['push'](_0x2d30de['shift']());}catch(_0x339246){_0x2d30de['push'](_0x2d30de['shift']());}}}(a28_0x111e,0xd2c33));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x4ef2(_0x17f17b,_0x5d5c0c){_0x17f17b=_0x17f17b-0xd9;const _0x111ed3=a28_0x111e();let _0x4ef293=_0x111ed3[_0x17f17b];return _0x4ef293;}const DEFAULT_MARKDOWN=a28_0x502be2(0xdf);function a28_0x111e(){const _0x23e1b9=['code','appCode','8MqgIrh','478115liHSwD','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','23193190IZRjmK','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','67944EkNroM','2141838YOPlzy','593201bYdrtA','trim','sdk-doc','2803908HSqdVL','32WIHmnN','str','11pKpIVV','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','dataset','18BNrkBX','7830558MaeGih'];a28_0x111e=function(){return _0x23e1b9;};return a28_0x111e();}export function formatDatasetSdkMarkdown(_0xfac516){const _0x4f59af=a28_0x502be2,_0x2d79ff=typeof _0xfac516==='string'?_0xfac516[_0x4f59af(0xe3)]():'';return _0x2d79ff||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x502be2(0xea),'command':a28_0x502be2(0xe4),'description':a28_0x502be2(0xdd),'risk':'read','flags':[{...CODE_FLAG,'description':a28_0x502be2(0xe9)}],async 'execute'(_0x138475){const _0x24f967=a28_0x502be2,_0x281f07=_0x138475[_0x24f967(0xe7)](_0x24f967(0xd9)),_0x1a56a4=await getDatasetSdkUsageDoc(_0x281f07,_0x138475[_0x24f967(0xda)]);return{'ok':!![],'data':{'code':_0x281f07,'appCode':_0x138475[_0x24f967(0xda)],'markdown':formatDatasetSdkMarkdown(_0x1a56a4)}};}};
@@ -1 +1 @@
1
- const a29_0x534ddf=a29_0x3237;(function(_0x46ef23,_0x103f1b){const _0x4e73cb=a29_0x3237,_0x19afa6=_0x46ef23();while(!![]){try{const _0x3d43a3=parseInt(_0x4e73cb(0x99))/0x1*(parseInt(_0x4e73cb(0xb8))/0x2)+-parseInt(_0x4e73cb(0xb1))/0x3+-parseInt(_0x4e73cb(0xaf))/0x4+-parseInt(_0x4e73cb(0xbe))/0x5+-parseInt(_0x4e73cb(0xbb))/0x6+-parseInt(_0x4e73cb(0x7e))/0x7+parseInt(_0x4e73cb(0xc9))/0x8;if(_0x3d43a3===_0x103f1b)break;else _0x19afa6['push'](_0x19afa6['shift']());}catch(_0x3b2c71){_0x19afa6['push'](_0x19afa6['shift']());}}}(a29_0x278e,0x3828a));import a29_0xb411fa from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a29_0x3237(_0x16d2d3,_0x26fc55){_0x16d2d3=_0x16d2d3-0x77;const _0x278e12=a29_0x278e();let _0x3237e8=_0x278e12[_0x16d2d3];return _0x3237e8;}import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';function a29_0x278e(){const _0x4143b5=['padEnd','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','registryPath','✓\x20Valid\x20JSON','name','locale','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','green','(not\x20found)','verbose','(not\x20set)','\x20(legacy/compat\x20only)','\x20\x20auth\x20(effective):\x20','arch','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(no\x20file)','773208VSzhuL','\x20\x20Installed\x20Path:\x20\x20','321309drsqrq','packageVersion','doctor','\x20\x20Config\x20Files','source','ClientAk','(default)','28zEAaAq','missing','\x20commands)','1905492neVSds','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20Built-in\x20Skill','252685SxgdjR','reason','red','format','⚠\x20Empty\x20(treated\x20as\x20{})','✓\x20current','\x20\x20Merged\x20Config','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','7603384AiYljX','riskLevel','✓\x20Loaded','(removed\x20—\x20cookie\x20auth\x20disabled)','version','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Skill\x20Version:\x20\x20\x20','empty','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','current','bold','serviceCode','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','path','serviceCount','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2981769FIuGCL','gray','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','log','Project','(missing)','yellow','repairCommand','state','✗\x20Invalid','installedPath','repeat','\x20Imported\x20from:\x20','\x20\x20Auth','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','read','(none)','defaultApp','(default:\x20','message','\x20\x20Package\x20Version:\x20','pageSize','status','currentApp','26721fhKyrR','(set,\x20length=','env','✗\x20Invalid\x20JSON'];a29_0x278e=function(){return _0x4143b5;};return a29_0x278e();}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x1402e3){const _0x2af583=a29_0x3237,_0x319672=getCliVersion(),_0x98461=buildConfigFromFlags({});await initGlobalEnvironment(_0x98461),console[_0x2af583(0x83)](),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x77)](CLI_BIN_NAME+'\x20doctor')),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x7f)]('─'[_0x2af583(0x8b)](0x32))),console[_0x2af583(0x83)](_0x2af583(0xad)+_0x319672),console[_0x2af583(0x83)](_0x2af583(0xd2)+process[_0x2af583(0xcd)]),console[_0x2af583(0x83)](_0x2af583(0x8e)+process['platform']+'\x20'+process[_0x2af583(0xac)]);const _0x30add5=inspectBuiltinSkill();console[_0x2af583(0x83)](),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x77)](_0x2af583(0xbd))),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0xa5)[_0x2af583(0x8b)](0x1e))),console[_0x2af583(0x83)](_0x2af583(0x81)+(_0x30add5[_0x2af583(0x88)]===_0x2af583(0xd3)?a29_0xb411fa[_0x2af583(0xa6)](_0x2af583(0xc3)):a29_0xb411fa['red']('✗\x20'+_0x30add5[_0x2af583(0x88)]))),console[_0x2af583(0x83)](_0x2af583(0x95)+_0x30add5[_0x2af583(0xb2)]),console['log'](_0x2af583(0xd0)+(_0x30add5['skillVersion']||a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0x85)))),console[_0x2af583(0x83)](_0x2af583(0xb0)+(_0x30add5[_0x2af583(0x8a)]||a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0xa7))));_0x30add5[_0x2af583(0x88)]!==_0x2af583(0xd3)&&console['log'](_0x2af583(0x9e)+_0x30add5[_0x2af583(0x87)]);_0x30add5[_0x2af583(0xbf)]&&console['log']('\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x30add5['reason']);console[_0x2af583(0x83)](),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x77)](_0x2af583(0xb4))),console['log'](a29_0xb411fa['gray'](_0x2af583(0xa5)[_0x2af583(0x8b)](0x1e)));const _0x9ddd2f=getGlobalConfigPath(),_0x49d5f5=getProjectConfigPath();console['log']('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x9ddd2f||a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0xa7)))),console[_0x2af583(0x83)](_0x2af583(0xc5)+(_0x49d5f5||a29_0xb411fa[_0x2af583(0x7f)]('(not\x20found)'))),console[_0x2af583(0x83)](),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x77)](_0x2af583(0x9f))),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x7f)]('\x20\x20─'['repeat'](0x1e)));const _0x2c7a26=(_0x28a3bf,_0x4597db)=>{const _0x119afd=_0x2af583;if(!_0x4597db){console[_0x119afd(0x83)]('\x20\x20'+_0x28a3bf[_0x119afd(0x9d)](0x11)+'\x20'+a29_0xb411fa[_0x119afd(0x7f)](_0x119afd(0xae)));return;}const _0x3fe177=inspectCliConfigJsonFile(_0x4597db);if(_0x3fe177[_0x119afd(0x97)]==='ok')console[_0x119afd(0x83)]('\x20\x20'+_0x28a3bf['padEnd'](0x11)+'\x20'+a29_0xb411fa['green'](_0x119afd(0xa1)));else{if(_0x3fe177[_0x119afd(0x97)]===_0x119afd(0xd1))console[_0x119afd(0x83)]('\x20\x20'+_0x28a3bf['padEnd'](0x11)+'\x20'+a29_0xb411fa['yellow'](_0x119afd(0xc2)));else _0x3fe177[_0x119afd(0x97)]==='missing'?console[_0x119afd(0x83)]('\x20\x20'+_0x28a3bf['padEnd'](0x11)+'\x20'+a29_0xb411fa[_0x119afd(0x7f)](_0x119afd(0x85))):(console['log']('\x20\x20'+_0x28a3bf['padEnd'](0x11)+'\x20'+a29_0xb411fa[_0x119afd(0xc0)](_0x119afd(0x9c))),console[_0x119afd(0x83)]('\x20\x20'+''[_0x119afd(0x9d)](0x11)+'\x20'+a29_0xb411fa['red'](_0x3fe177[_0x119afd(0x94)])));}};_0x2c7a26('Global',_0x9ddd2f),_0x2c7a26(_0x2af583(0x84),_0x49d5f5),console['log'](),console[_0x2af583(0x83)](a29_0xb411fa['bold'](_0x2af583(0xc4))),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0xa5)[_0x2af583(0x8b)](0x1e))),console[_0x2af583(0x83)](_0x2af583(0xc7)+(_0x98461[_0x2af583(0x7a)]||a29_0xb411fa[_0x2af583(0xc0)](_0x2af583(0xa9)))),console[_0x2af583(0x83)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x98461[_0x2af583(0x9b)]);const _0x1f960c=isLegacyCompatConfigKey(_0x2af583(0xa3))?a29_0xb411fa[_0x2af583(0x7f)](_0x98461['locale']+_0x2af583(0xaa)):_0x98461[_0x2af583(0xa3)];console['log'](_0x2af583(0x79)+_0x1f960c),console[_0x2af583(0x83)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x98461[_0x2af583(0x92)]||a29_0xb411fa['gray'](_0x2af583(0x91)))),console['log'](_0x2af583(0xbc)+(_0x98461[_0x2af583(0x98)]||a29_0xb411fa[_0x2af583(0x7f)]('(none)'))),console[_0x2af583(0x83)](_0x2af583(0xc8)+(_0x98461[_0x2af583(0xc1)]||a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0x93)+DEFAULT_CONFIG_VALUES[_0x2af583(0xc1)]+')'))),console['log'](_0x2af583(0xa4)+(_0x98461[_0x2af583(0x96)]??a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0xb7)))),console[_0x2af583(0x83)](_0x2af583(0xce)+_0x98461[_0x2af583(0xca)]),console[_0x2af583(0x83)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x98461[_0x2af583(0xa8)]),console['log'](_0x2af583(0xab)+AUTH_MODE[_0x2af583(0xb6)]),console[_0x2af583(0x83)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x98461['accessKey']?a29_0xb411fa[_0x2af583(0xa6)](_0x2af583(0x9a)+_0x98461[_0x2af583(0x82)]['length']+')'):a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0x91)))),console['log'](),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x77)]('\x20\x20API\x20Endpoints')),console['log'](a29_0xb411fa[_0x2af583(0x7f)]('\x20\x20─'[_0x2af583(0x8b)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x2af583(0x83)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x2af583(0x83)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x2af583(0x83)](),console[_0x2af583(0x83)](a29_0xb411fa['bold']('\x20\x20Service\x20Tree')),console[_0x2af583(0x83)](a29_0xb411fa['gray'](_0x2af583(0xa5)[_0x2af583(0x8b)](0x1e)));const _0x8e369=inspectServiceRegistry();console[_0x2af583(0x83)](_0x2af583(0x8f)+_0x8e369[_0x2af583(0xa0)]),console['log'](_0x2af583(0x7d)+formatServiceRegistryStatus(_0x8e369)),console[_0x2af583(0x83)](_0x2af583(0xcf)+_0x8e369[_0x2af583(0x7c)]),console['log'](_0x2af583(0x80)+_0x8e369['commandCount']);for(const _0xbb07d0 of _0x8e369['services']){console[_0x2af583(0x83)]('\x20\x20'+(_0xbb07d0[_0x2af583(0x78)]+':')['padEnd'](0x11)+'\x20'+(_0xbb07d0[_0x2af583(0xa2)]||a29_0xb411fa['gray'](_0x2af583(0xc6)))+'\x20('+_0xbb07d0['commandCount']+_0x2af583(0xba)),console[_0x2af583(0x83)]('\x20\x20'+''[_0x2af583(0x9d)](0x11)+_0x2af583(0x8c)+_0xbb07d0[_0x2af583(0xb5)][_0x2af583(0x7b)]);}return console[_0x2af583(0x83)](),console[_0x2af583(0x83)](a29_0xb411fa[_0x2af583(0x77)](_0x2af583(0x8d))),console[_0x2af583(0x83)](a29_0xb411fa['gray'](_0x2af583(0xa5)['repeat'](0x1e))),console[_0x2af583(0x83)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a29_0xb411fa[_0x2af583(0xa6)](AUTH_MODE[_0x2af583(0xb6)]+'\x20(accessKey)')),console[_0x2af583(0x83)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0xb411fa[_0x2af583(0x7f)](_0x2af583(0xcc))),console[_0x2af583(0x83)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x3f5cd1){const _0x274712=a29_0x3237;if(_0x3f5cd1['status']==='ok')return a29_0xb411fa[_0x274712(0xa6)](_0x274712(0xcb));if(_0x3f5cd1['status']===_0x274712(0xb9))return a29_0xb411fa[_0x274712(0x7f)](_0x274712(0xa7));if(_0x3f5cd1[_0x274712(0x97)]===_0x274712(0xd1))return a29_0xb411fa[_0x274712(0x86)]('⚠\x20Empty');return a29_0xb411fa[_0x274712(0xc0)](_0x274712(0x89)+(_0x3f5cd1[_0x274712(0x94)]?':\x20'+_0x3f5cd1['message']:''));}export const doctorDefinition={'service':a29_0x534ddf(0xb3),'command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0x534ddf(0x90),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x52160f=a29_0x38c1;(function(_0x4e1c67,_0x19b312){const _0x433b2e=a29_0x38c1,_0x5d04bf=_0x4e1c67();while(!![]){try{const _0x5d1e0f=-parseInt(_0x433b2e(0x1ba))/0x1*(-parseInt(_0x433b2e(0x1bf))/0x2)+-parseInt(_0x433b2e(0x175))/0x3*(parseInt(_0x433b2e(0x18f))/0x4)+parseInt(_0x433b2e(0x17e))/0x5+parseInt(_0x433b2e(0x1b9))/0x6+-parseInt(_0x433b2e(0x193))/0x7+-parseInt(_0x433b2e(0x19f))/0x8+-parseInt(_0x433b2e(0x174))/0x9;if(_0x5d1e0f===_0x19b312)break;else _0x5d04bf['push'](_0x5d04bf['shift']());}catch(_0x122638){_0x5d04bf['push'](_0x5d04bf['shift']());}}}(a29_0xb49f,0xa1bd2));import a29_0x5a9b5f 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_0xb49f(){const _0x437d60=['(default:\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','\x20\x20Package\x20Version:\x20','✗\x20Invalid\x20JSON','reason','riskLevel','repeat','log','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','6432276LfTfoP','431ibZTZG','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','(set,\x20length=','\x20\x20Reason:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','3726OPyIgs','Diagnose\x20CLI\x20configuration\x20and\x20environment','✓\x20Valid\x20JSON','\x20\x20─','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','message','serviceCount','⚠\x20Empty\x20(treated\x20as\x20{})','⚠\x20Empty','locale','\x20\x20Config\x20JSON','name','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','green','pageSize','✓\x20Loaded','(no\x20file)','\x20\x20Built-in\x20Skill','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(unnamed)','1452636SZsEVD','69ttcydQ','env','\x20doctor','appCode','current','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20State:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','3150750RRGFFq','arch','accessKey','empty','\x20\x20Merged\x20Config','serviceCode','(not\x20set)','\x20\x20Repair:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20Imported\x20from:\x20','Global','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Auth','doctor','red','version','packageVersion','✓\x20current','73780WFiGjr','gray','(missing)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2059659kxMhSa','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','format','bold','repairCommand','(not\x20found)','(none)','missing','ClientAk','7702328fhmUjR','skillVersion','padEnd','verbose','commandCount','check','(default)','\x20\x20API\x20Endpoints','state','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','yellow','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'];a29_0xb49f=function(){return _0x437d60;};return a29_0xb49f();}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';import{inspectBuiltinSkill}from'../skills/builtin-skill.js';async function execute(_0x433265){const _0x2e0541=a29_0x38c1,_0x4c090e=getCliVersion(),_0x205eed=buildConfigFromFlags({});await initGlobalEnvironment(_0x205eed),console[_0x2e0541(0x1b7)](),console['log'](a29_0x5a9b5f['bold'](CLI_BIN_NAME+_0x2e0541(0x177))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)]('─'[_0x2e0541(0x1b6)](0x32))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1ac)+_0x4c090e),console[_0x2e0541(0x1b7)](_0x2e0541(0x1ae)+process[_0x2e0541(0x18c)]),console[_0x2e0541(0x1b7)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process['platform']+'\x20'+process[_0x2e0541(0x17f)]);const _0x585a17=inspectBuiltinSkill();console[_0x2e0541(0x1b7)](),console['log'](a29_0x5a9b5f['bold'](_0x2e0541(0x1d0))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['gray'](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e))),console['log'](_0x2e0541(0x17c)+(_0x585a17[_0x2e0541(0x1a7)]===_0x2e0541(0x179)?a29_0x5a9b5f['green'](_0x2e0541(0x18e)):a29_0x5a9b5f[_0x2e0541(0x18b)]('✗\x20'+_0x585a17[_0x2e0541(0x1a7)]))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1b2)+_0x585a17[_0x2e0541(0x18d)]),console[_0x2e0541(0x1b7)]('\x20\x20Skill\x20Version:\x20\x20\x20'+(_0x585a17[_0x2e0541(0x1a0)]||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x191)))),console[_0x2e0541(0x1b7)]('\x20\x20Installed\x20Path:\x20\x20'+(_0x585a17['installedPath']||a29_0x5a9b5f['gray']('(not\x20found)')));_0x585a17['state']!==_0x2e0541(0x179)&&console[_0x2e0541(0x1b7)](_0x2e0541(0x185)+_0x585a17[_0x2e0541(0x19a)]);_0x585a17[_0x2e0541(0x1b4)]&&console[_0x2e0541(0x1b7)](_0x2e0541(0x1be)+_0x585a17[_0x2e0541(0x1b4)]);console[_0x2e0541(0x1b7)](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x199)]('\x20\x20Config\x20Files')),console['log'](a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e)));const _0x193108=getGlobalConfigPath(),_0x2a96cc=getProjectConfigPath();console[_0x2e0541(0x1b7)](_0x2e0541(0x1b0)+(_0x193108||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x19b)))),console['log'](_0x2e0541(0x1d1)+(_0x2a96cc||a29_0x5a9b5f['gray'](_0x2e0541(0x19b)))),console['log'](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['bold'](_0x2e0541(0x1c9))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e)));const _0x1cad42=(_0x14015d,_0x361a35)=>{const _0x29f93e=_0x2e0541;if(!_0x361a35){console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d['padEnd'](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x190)](_0x29f93e(0x1cf)));return;}const _0x19058d=inspectCliConfigJsonFile(_0x361a35);if(_0x19058d[_0x29f93e(0x195)]==='ok')console['log']('\x20\x20'+_0x14015d[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x1cc)](_0x29f93e(0x1c1)));else{if(_0x19058d[_0x29f93e(0x195)]==='empty')console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x1aa)](_0x29f93e(0x1c6)));else _0x19058d[_0x29f93e(0x195)]===_0x29f93e(0x19d)?console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x190)](_0x29f93e(0x191))):(console[_0x29f93e(0x1b7)]('\x20\x20'+_0x14015d['padEnd'](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x18b)](_0x29f93e(0x1b3))),console[_0x29f93e(0x1b7)]('\x20\x20'+''[_0x29f93e(0x1a1)](0x11)+'\x20'+a29_0x5a9b5f[_0x29f93e(0x18b)](_0x19058d[_0x29f93e(0x1c4)])));}};_0x1cad42(_0x2e0541(0x187),_0x193108),_0x1cad42('Project',_0x2a96cc),console[_0x2e0541(0x1b7)](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['bold'](_0x2e0541(0x182))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)]('\x20\x20─'[_0x2e0541(0x1b6)](0x1e))),console['log'](_0x2e0541(0x1bb)+(_0x205eed[_0x2e0541(0x178)]||a29_0x5a9b5f[_0x2e0541(0x18b)](_0x2e0541(0x184)))),console[_0x2e0541(0x1b7)](_0x2e0541(0x17a)+_0x205eed[_0x2e0541(0x176)]);const _0xc80b5a=isLegacyCompatConfigKey('locale')?a29_0x5a9b5f[_0x2e0541(0x190)](_0x205eed[_0x2e0541(0x1c8)]+'\x20(legacy/compat\x20only)'):_0x205eed[_0x2e0541(0x1c8)];console[_0x2e0541(0x1b7)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xc80b5a),console[_0x2e0541(0x1b7)](_0x2e0541(0x1c3)+(_0x205eed[_0x2e0541(0x1bc)]||a29_0x5a9b5f[_0x2e0541(0x190)]('(none)'))),console[_0x2e0541(0x1b7)](_0x2e0541(0x196)+(_0x205eed['currentApp']||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x19c)))),console[_0x2e0541(0x1b7)](_0x2e0541(0x192)+(_0x205eed[_0x2e0541(0x198)]||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1ad)+DEFAULT_CONFIG_VALUES[_0x2e0541(0x198)]+')'))),console[_0x2e0541(0x1b7)](_0x2e0541(0x197)+(_0x205eed[_0x2e0541(0x1cd)]??a29_0x5a9b5f['gray'](_0x2e0541(0x1a5)))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1b8)+_0x205eed[_0x2e0541(0x1b5)]),console[_0x2e0541(0x1b7)](_0x2e0541(0x17b)+_0x205eed[_0x2e0541(0x1a2)]),console[_0x2e0541(0x1b7)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE['ClientAk']),console[_0x2e0541(0x1b7)](_0x2e0541(0x17d)+(_0x205eed[_0x2e0541(0x180)]?a29_0x5a9b5f[_0x2e0541(0x1cc)](_0x2e0541(0x1bd)+_0x205eed[_0x2e0541(0x180)]['length']+')'):a29_0x5a9b5f[_0x2e0541(0x190)]('(none)'))),console[_0x2e0541(0x1b7)](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x199)](_0x2e0541(0x1a6))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f['gray'](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e))),console[_0x2e0541(0x1b7)](_0x2e0541(0x1af)+getApiDomain()),console[_0x2e0541(0x1b7)](_0x2e0541(0x1ab)+getUserDomain()),console[_0x2e0541(0x1b7)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x2e0541(0x1b7)](),console['log'](a29_0x5a9b5f[_0x2e0541(0x199)](_0x2e0541(0x1b1))),console['log'](a29_0x5a9b5f['gray'](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e)));const _0x326b7a=inspectServiceRegistry();console['log']('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x326b7a['registryPath']),console[_0x2e0541(0x1b7)](_0x2e0541(0x1a8)+formatServiceRegistryStatus(_0x326b7a)),console[_0x2e0541(0x1b7)](_0x2e0541(0x1cb)+_0x326b7a[_0x2e0541(0x1c5)]),console[_0x2e0541(0x1b7)](_0x2e0541(0x1a9)+_0x326b7a[_0x2e0541(0x1a3)]);for(const _0xcbd2d of _0x326b7a['services']){console[_0x2e0541(0x1b7)]('\x20\x20'+(_0xcbd2d[_0x2e0541(0x183)]+':')[_0x2e0541(0x1a1)](0x11)+'\x20'+(_0xcbd2d[_0x2e0541(0x1ca)]||a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1d2)))+'\x20('+_0xcbd2d[_0x2e0541(0x1a3)]+'\x20commands)'),console[_0x2e0541(0x1b7)]('\x20\x20'+''[_0x2e0541(0x1a1)](0x11)+_0x2e0541(0x186)+_0xcbd2d['source']['path']);}return console['log'](),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x199)](_0x2e0541(0x189))),console[_0x2e0541(0x1b7)](a29_0x5a9b5f[_0x2e0541(0x190)](_0x2e0541(0x1c2)[_0x2e0541(0x1b6)](0x1e))),console[_0x2e0541(0x1b7)](_0x2e0541(0x194)+a29_0x5a9b5f[_0x2e0541(0x1cc)](AUTH_MODE[_0x2e0541(0x19e)]+'\x20(accessKey)')),console[_0x2e0541(0x1b7)](_0x2e0541(0x188)+a29_0x5a9b5f[_0x2e0541(0x190)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x2e0541(0x1b7)](),{'ok':!![]};}function a29_0x38c1(_0x553482,_0x30ff84){_0x553482=_0x553482-0x174;const _0xb49fff=a29_0xb49f();let _0x38c1ad=_0xb49fff[_0x553482];return _0x38c1ad;}function formatServiceRegistryStatus(_0x1c4ef8){const _0x53f7b4=a29_0x38c1;if(_0x1c4ef8[_0x53f7b4(0x195)]==='ok')return a29_0x5a9b5f[_0x53f7b4(0x1cc)](_0x53f7b4(0x1ce));if(_0x1c4ef8['status']==='missing')return a29_0x5a9b5f[_0x53f7b4(0x190)]('(not\x20found)');if(_0x1c4ef8[_0x53f7b4(0x195)]===_0x53f7b4(0x181))return a29_0x5a9b5f[_0x53f7b4(0x1aa)](_0x53f7b4(0x1c7));return a29_0x5a9b5f['red']('✗\x20Invalid'+(_0x1c4ef8[_0x53f7b4(0x1c4)]?':\x20'+_0x1c4ef8['message']:''));}export const doctorDefinition={'service':a29_0x52160f(0x18a),'command':a29_0x52160f(0x1a4),'description':a29_0x52160f(0x1c0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x5f1a0b=a30_0x4660;(function(_0x4f27a1,_0x5f39dc){const _0x3df78f=a30_0x4660,_0x5cc86a=_0x4f27a1();while(!![]){try{const _0x1d3937=parseInt(_0x3df78f(0x125))/0x1+parseInt(_0x3df78f(0x117))/0x2+-parseInt(_0x3df78f(0x110))/0x3*(parseInt(_0x3df78f(0x102))/0x4)+-parseInt(_0x3df78f(0x107))/0x5+parseInt(_0x3df78f(0x111))/0x6*(-parseInt(_0x3df78f(0x113))/0x7)+parseInt(_0x3df78f(0x10a))/0x8*(parseInt(_0x3df78f(0x11b))/0x9)+parseInt(_0x3df78f(0x120))/0xa;if(_0x1d3937===_0x5f39dc)break;else _0x5cc86a['push'](_0x5cc86a['shift']());}catch(_0x42869e){_0x5cc86a['push'](_0x5cc86a['shift']());}}}(a30_0x4ab1,0x8ecdb));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a30_0x4ab1(){const _0x250d76=['trim','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3811576YGJmFt','filePath','Uploaded\x20file:\x20','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','download','description','44067ePNlma','207390ObNSit','upload','119uyHEuL','POST','build','path','1603912oNhQxX','validation','read','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','9fckjcy','/client/uploadFile','str','file','Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','8671310SJfaAA','\x20to\x20runtime\x20app\x20','File','appCode','string','162910OfLRfP','bool','196kulJCh','boolean','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','filePath\x20is\x20required.','query-url','2080775ARIKGr'];a30_0x4ab1=function(){return _0x250d76;};return a30_0x4ab1();}import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x4660(_0xc69446,_0x2d4dc0){_0xc69446=_0xc69446-0x102;const _0x4ab188=a30_0x4ab1();let _0x4660d7=_0x4ab188[_0xc69446];return _0x4660d7;}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':'string','required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':'filepath','type':a30_0x5f1a0b(0x124),'required':!![],'description':a30_0x5f1a0b(0x10d)},DOWNLOAD_FLAG={'name':a30_0x5f1a0b(0x10e),'type':a30_0x5f1a0b(0x103),'description':a30_0x5f1a0b(0x11f)},LONG_TERM_FLAG={'name':'long-term','type':a30_0x5f1a0b(0x103),'description':a30_0x5f1a0b(0x104)};function requireFilePath(_0x3ee00f){const _0x5426a5=a30_0x5f1a0b,_0x526afd=_0x3ee00f[_0x5426a5(0x108)]();if(!_0x526afd)throw CliErrors[_0x5426a5(0x118)](_0x5426a5(0x105));return _0x526afd;}const fileUpload={'service':'file','command':a30_0x5f1a0b(0x112),'description':a30_0x5f1a0b(0x11a),'risk':a30_0x5f1a0b(0x119),'flags':[FILE_FLAG],async 'dryRun'(_0x5c1fb2){const _0x5476f1=a30_0x5f1a0b,_0x2d026c=requireRuntimeUploadFile(_0x5c1fb2[_0x5476f1(0x11d)](_0x5476f1(0x11e)),_0x5476f1(0x122));return dryRun(_0x5476f1(0x114),_0x5476f1(0x11c))['body']({'appCode':_0x5c1fb2[_0x5476f1(0x123)],'multipart':{'file':_0x2d026c}})[_0x5476f1(0x10f)]('Preview:\x20upload\x20'+_0x2d026c[_0x5476f1(0x116)]+_0x5476f1(0x121)+_0x5c1fb2[_0x5476f1(0x123)])[_0x5476f1(0x115)]();},async 'execute'(_0x4e3c6a){const _0x703e8a=a30_0x5f1a0b,_0x3fd7a8=requireRuntimeUploadFile(_0x4e3c6a[_0x703e8a(0x11d)](_0x703e8a(0x11e)),_0x703e8a(0x122)),_0x257377=await uploadRuntimeFile(_0x4e3c6a[_0x703e8a(0x123)],_0x3fd7a8[_0x703e8a(0x116)]);return{'ok':!![],'data':_0x257377,'message':_0x257377[_0x703e8a(0x10b)]?_0x703e8a(0x10c)+_0x257377['filePath']+'.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.':_0x703e8a(0x109)};}},fileQueryUrl={'service':'file','command':a30_0x5f1a0b(0x106),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x5f1a0b(0x119),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0xd996b3){const _0x4b5fa7=a30_0x5f1a0b,_0x1ac662=requireFilePath(_0xd996b3[_0x4b5fa7(0x11d)]('filepath')),_0x4c6bd=await queryRuntimeFileUrl(_0x1ac662,{'download':_0xd996b3[_0x4b5fa7(0x126)](_0x4b5fa7(0x10e)),'longTerm':_0xd996b3[_0x4b5fa7(0x126)]('long-term')});return{'ok':!![],'data':_0x4c6bd};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x560475=a30_0x3e8e;(function(_0x7ccebe,_0x39e0ef){const _0x1aa4f1=a30_0x3e8e,_0x170d49=_0x7ccebe();while(!![]){try{const _0x22b2c8=-parseInt(_0x1aa4f1(0x8b))/0x1+-parseInt(_0x1aa4f1(0x99))/0x2+parseInt(_0x1aa4f1(0xa2))/0x3*(-parseInt(_0x1aa4f1(0x82))/0x4)+parseInt(_0x1aa4f1(0xa1))/0x5*(-parseInt(_0x1aa4f1(0x98))/0x6)+parseInt(_0x1aa4f1(0x81))/0x7+-parseInt(_0x1aa4f1(0x8e))/0x8*(-parseInt(_0x1aa4f1(0x93))/0x9)+-parseInt(_0x1aa4f1(0x9e))/0xa*(-parseInt(_0x1aa4f1(0x96))/0xb);if(_0x22b2c8===_0x39e0ef)break;else _0x170d49['push'](_0x170d49['shift']());}catch(_0xeb2a2){_0x170d49['push'](_0x170d49['shift']());}}}(a30_0x55aa,0x640fe));function a30_0x55aa(){const _0x370d95=['474800JdLZrp','string','query-url','8504opvgko','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','long-term','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','trim','6552EfFvCV','upload','path','4304113mpaYhk','File','4098LvlvpT','1089634omPqKN','filepath','description','str','appCode','50BnFCMn','bool','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','5975QQUgGW','13683yFJYYP','download','boolean','1428616tXAOnP','604ryLzik','file','read','Preview:\x20upload\x20','Uploaded\x20file:\x20','validation','filePath\x20is\x20required.','Path\x20to\x20the\x20local\x20file\x20to\x20upload','filePath'];a30_0x55aa=function(){return _0x370d95;};return a30_0x55aa();}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x560475(0x83),'type':a30_0x560475(0x8c),'required':!![],'description':a30_0x560475(0x89)},FILEPATH_FLAG={'name':a30_0x560475(0x9a),'type':a30_0x560475(0x8c),'required':!![],'description':a30_0x560475(0x91)},DOWNLOAD_FLAG={'name':a30_0x560475(0x7f),'type':'boolean','description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a30_0x560475(0x90),'type':a30_0x560475(0x80),'description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function a30_0x3e8e(_0x554541,_0x52e395){_0x554541=_0x554541-0x7f;const _0x55aac4=a30_0x55aa();let _0x3e8e97=_0x55aac4[_0x554541];return _0x3e8e97;}function requireFilePath(_0x373198){const _0x32e62e=a30_0x560475,_0x4fe285=_0x373198[_0x32e62e(0x92)]();if(!_0x4fe285)throw CliErrors[_0x32e62e(0x87)](_0x32e62e(0x88));return _0x4fe285;}const fileUpload={'service':a30_0x560475(0x83),'command':a30_0x560475(0x94),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x560475(0x84),'flags':[FILE_FLAG],async 'dryRun'(_0x5e71db){const _0x18fb32=a30_0x560475,_0x10a563=requireRuntimeUploadFile(_0x5e71db[_0x18fb32(0x9c)](_0x18fb32(0x83)),_0x18fb32(0x97));return dryRun('POST','/client/uploadFile')['body']({'appCode':_0x5e71db[_0x18fb32(0x9d)],'multipart':{'file':_0x10a563}})[_0x18fb32(0x9b)](_0x18fb32(0x85)+_0x10a563[_0x18fb32(0x95)]+'\x20to\x20runtime\x20app\x20'+_0x5e71db['appCode'])['build']();},async 'execute'(_0x29f4a4){const _0x5ddf2a=a30_0x560475,_0x28b983=requireRuntimeUploadFile(_0x29f4a4['str']('file'),'File'),_0x32dabb=await uploadRuntimeFile(_0x29f4a4[_0x5ddf2a(0x9d)],_0x28b983[_0x5ddf2a(0x95)]);return{'ok':!![],'data':_0x32dabb,'message':_0x32dabb[_0x5ddf2a(0x8a)]?_0x5ddf2a(0x86)+_0x32dabb[_0x5ddf2a(0x8a)]+_0x5ddf2a(0x8f):_0x5ddf2a(0xa0)};}},fileQueryUrl={'service':'file','command':a30_0x560475(0x8d),'description':'Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','risk':a30_0x560475(0x84),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x45b710){const _0x1dfe27=a30_0x560475,_0x4dab88=requireFilePath(_0x45b710['str'](_0x1dfe27(0x9a))),_0x29ff87=await queryRuntimeFileUrl(_0x4dab88,{'download':_0x45b710[_0x1dfe27(0x9f)]('download'),'longTerm':_0x45b710[_0x1dfe27(0x9f)]('long-term')});return{'ok':!![],'data':_0x29ff87};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x835b5c=a31_0x2e7a;(function(_0x5b594a,_0x27acdd){const _0x1af158=a31_0x2e7a,_0x3f60d9=_0x5b594a();while(!![]){try{const _0x2dbaff=-parseInt(_0x1af158(0x9f))/0x1*(parseInt(_0x1af158(0x85))/0x2)+-parseInt(_0x1af158(0x90))/0x3*(parseInt(_0x1af158(0x8d))/0x4)+parseInt(_0x1af158(0x7d))/0x5+-parseInt(_0x1af158(0x8e))/0x6*(-parseInt(_0x1af158(0x82))/0x7)+parseInt(_0x1af158(0x86))/0x8*(parseInt(_0x1af158(0x99))/0x9)+parseInt(_0x1af158(0x79))/0xa*(parseInt(_0x1af158(0x91))/0xb)+parseInt(_0x1af158(0x93))/0xc*(-parseInt(_0x1af158(0x9d))/0xd);if(_0x2dbaff===_0x27acdd)break;else _0x3f60d9['push'](_0x3f60d9['shift']());}catch(_0x1a172c){_0x3f60d9['push'](_0x3f60d9['shift']());}}}(a31_0x4e33,0x314ae));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';function a31_0x2e7a(_0x22391c,_0x1af708){_0x22391c=_0x22391c-0x72;const _0x4e338d=a31_0x4e33();let _0x2e7a40=_0x4e338d[_0x22391c];return _0x2e7a40;}import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':'string','description':a31_0x835b5c(0x77),'required':!![]},{'name':a31_0x835b5c(0x88),'type':a31_0x835b5c(0x7c),'description':a31_0x835b5c(0x97)},{'name':a31_0x835b5c(0x83),'type':'string','description':a31_0x835b5c(0x95),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x835b5c(0x7b),'type':a31_0x835b5c(0xa0),'description':a31_0x835b5c(0x98)+PRODUCT_CONFIG[a31_0x835b5c(0x7e)]+a31_0x835b5c(0x8f),'default':![]},{'name':a31_0x835b5c(0x89),'type':'boolean','description':a31_0x835b5c(0x76),'default':![]}];export async function runAppImport(_0x9be06){const _0x119925=a31_0x835b5c,_0xa2c3e8=_0x9be06['global']?_0x119925(0x7b):_0x119925(0x7a),_0x56b80f=resolveWriteConfigPath(_0xa2c3e8);await runFromImport(_0x9be06,_0x56b80f);}async function runFromImport(_0xfd062,_0x3d997f){const _0xa5231d=a31_0x835b5c,_0x6a16ca=resolveFilePath(_0xfd062[_0xa5231d(0x84)]);if(!existsSync(_0x6a16ca))throw CliErrors['validation'](_0xa5231d(0x87)+_0x6a16ca);const _0x9b2bd7=readSourceFile(_0x6a16ca),_0x52c746=convertToRuntimeConfig(_0x9b2bd7);_0xfd062[_0xa5231d(0x88)]&&(_0x52c746[_0xa5231d(0x88)]=String(_0xfd062['appcode']));_0xfd062[_0xa5231d(0x83)]&&(_0x52c746[_0xa5231d(0x83)]=resolveImportEnv(_0xfd062));if(!_0x52c746['appcode'])throw CliErrors[_0xa5231d(0x92)](_0xa5231d(0x94),_0xa5231d(0xa1));await writeImportConfig(_0x3d997f,_0x52c746,_0xfd062),console[_0xa5231d(0x80)](_0xa5231d(0x9e)+_0x6a16ca),console[_0xa5231d(0x80)](_0xa5231d(0x9c)+_0x3d997f),console[_0xa5231d(0x80)](_0xa5231d(0x96)+_0x52c746[_0xa5231d(0x88)]);if(_0x52c746[_0xa5231d(0x8c)])console[_0xa5231d(0x80)](_0xa5231d(0x8b)+_0x52c746[_0xa5231d(0x8c)]);}function convertToRuntimeConfig(_0x373859){const _0xae1c3a=a31_0x835b5c;if(_0x373859['apps']&&typeof _0x373859[_0xae1c3a(0x72)]==='object')throw CliErrors['validation'](_0xae1c3a(0x74),_0xae1c3a(0x7f));const _0x369ed9={};for(const _0x2beec8 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x373859[_0x2beec8]!==undefined&&(_0x369ed9[_0x2beec8]=_0x373859[_0x2beec8]);}return!_0x369ed9['riskLevel']&&(_0x369ed9[_0xae1c3a(0x73)]=DEFAULT_CONFIG_VALUES[_0xae1c3a(0x73)]),_0x369ed9;}async function writeImportConfig(_0x45cca9,_0x1cb9dc,_0x4b22f2){const _0x25df7a=a31_0x835b5c;let _0x5c0690={};existsSync(_0x45cca9)&&!_0x4b22f2['yes']&&(_0x5c0690=readConfigFile(_0x45cca9));for(const [_0x598114,_0x5c190e]of Object['entries'](_0x1cb9dc)){_0x5c190e!==undefined&&(_0x5c0690[_0x598114]=_0x5c190e);}if(_0x5c0690[_0x25df7a(0x81)])delete _0x5c0690['app'];writeConfigFile(_0x45cca9,_0x5c0690);}function resolveFilePath(_0x56aa36){return isAbsolute(_0x56aa36)?_0x56aa36:resolve(process['cwd'](),_0x56aa36);}function a31_0x4e33(){const _0x3abec2=['parse','\x20\x20config:\x20\x20','52gepGwr','Imported\x20from\x20','453YygKrZ','boolean','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`.','apps','riskLevel','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Invalid\x20env\x20\x22','Skip\x20confirmation\x20when\x20overwriting','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Failed\x20to\x20parse\x20source\x20file:\x20','80ibypDg','project','global','string','1322790HoMmVw','newConfigFileName','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','log','app','7uTbehV','env','file','828guJjCp','40FpBlpa','Source\x20file\x20not\x20found:\x20','appcode','yes','utf8','\x20\x20default:\x20','defaultApp','4GvAbrt','928254toqvHg',')\x20instead\x20of\x20project','781917hYCuae','373714VJFrzX','validation','756228VeyRBt','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Override\x20imported\x20default\x20env','\x20\x20appcode:\x20','Override\x20imported\x20default\x20appcode','Write\x20to\x20global\x20(~/','379980ADBANd','join'];a31_0x4e33=function(){return _0x3abec2;};return a31_0x4e33();}function readSourceFile(_0x3d4aec){const _0x3607ac=a31_0x835b5c;try{const _0x335f24=readFileSync(_0x3d4aec,{'encoding':_0x3607ac(0x8a)});return JSON[_0x3607ac(0x9b)](_0x335f24);}catch(_0x55419){throw CliErrors[_0x3607ac(0x92)](_0x3607ac(0x78)+_0x55419['message']);}}function resolveImportEnv(_0x563410){const _0x20bb78=a31_0x835b5c,_0x584512=_0x563410[_0x20bb78(0x83)];if(_0x584512===undefined||_0x584512==='')return DEFAULT_CONFIG_VALUES[_0x20bb78(0x83)];if(!RUNTIME_ENV_VALUES['includes'](_0x584512))throw CliErrors[_0x20bb78(0x92)](_0x20bb78(0x75)+_0x584512+'\x22.\x20Allowed:\x20'+RUNTIME_ENV_VALUES[_0x20bb78(0x9a)](',\x20'));return _0x584512;}
1
+ const a31_0x56d7e8=a31_0x1010;(function(_0x102a45,_0x1a6a4d){const _0x4c4c7b=a31_0x1010,_0x12e929=_0x102a45();while(!![]){try{const _0x18b889=-parseInt(_0x4c4c7b(0x114))/0x1+parseInt(_0x4c4c7b(0x11e))/0x2+-parseInt(_0x4c4c7b(0x11b))/0x3+-parseInt(_0x4c4c7b(0x10d))/0x4*(-parseInt(_0x4c4c7b(0x123))/0x5)+-parseInt(_0x4c4c7b(0x115))/0x6*(parseInt(_0x4c4c7b(0x127))/0x7)+parseInt(_0x4c4c7b(0x121))/0x8*(parseInt(_0x4c4c7b(0x129))/0x9)+parseInt(_0x4c4c7b(0x11a))/0xa;if(_0x18b889===_0x1a6a4d)break;else _0x12e929['push'](_0x12e929['shift']());}catch(_0x51f97b){_0x12e929['push'](_0x12e929['shift']());}}}(a31_0x1e25,0xbc03d));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';function a31_0x1010(_0x5495b7,_0x5755ce){_0x5495b7=_0x5495b7-0x10a;const _0x1e258e=a31_0x1e25();let _0x101006=_0x1e258e[_0x5495b7];return _0x101006;}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}from'../context.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const appImportFlagDefs=[{'name':'file','type':'string','description':a31_0x56d7e8(0x111),'required':!![]},{'name':a31_0x56d7e8(0x137),'type':a31_0x56d7e8(0x134),'description':'Override\x20imported\x20default\x20appcode'},{'name':a31_0x56d7e8(0x125),'type':'string','description':a31_0x56d7e8(0x12e),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x56d7e8(0x10c),'type':a31_0x56d7e8(0x117),'description':a31_0x56d7e8(0x12a)+PRODUCT_CONFIG[a31_0x56d7e8(0x11f)]+a31_0x56d7e8(0x119),'default':![]},{'name':a31_0x56d7e8(0x110),'type':'boolean','description':a31_0x56d7e8(0x139),'default':![]}];export async function runAppImport(_0x2f9e99){const _0x311d5e=a31_0x56d7e8,_0x7a68d6=_0x2f9e99[_0x311d5e(0x10c)]?_0x311d5e(0x10c):_0x311d5e(0x128),_0x23ad4e=resolveWriteConfigPath(_0x7a68d6);await runFromImport(_0x2f9e99,_0x23ad4e);}async function runFromImport(_0xa60a14,_0x4c3176){const _0x430b1b=a31_0x56d7e8,_0x34e212=resolveFilePath(_0xa60a14[_0x430b1b(0x133)]);if(!existsSync(_0x34e212))throw CliErrors[_0x430b1b(0x12d)](_0x430b1b(0x131)+_0x34e212);const _0x54ce5b=readSourceFile(_0x34e212),_0x3619f1=convertToRuntimeConfig(_0x54ce5b);_0xa60a14[_0x430b1b(0x137)]&&(_0x3619f1[_0x430b1b(0x137)]=String(_0xa60a14['appcode']));_0xa60a14['env']&&(_0x3619f1[_0x430b1b(0x125)]=resolveImportEnv(_0xa60a14));if(!_0x3619f1[_0x430b1b(0x137)])throw CliErrors[_0x430b1b(0x12d)](_0x430b1b(0x12b),_0x430b1b(0x116));await writeImportConfig(_0x4c3176,_0x3619f1,_0xa60a14),console[_0x430b1b(0x10f)]('Imported\x20from\x20'+_0x34e212),console[_0x430b1b(0x10f)](_0x430b1b(0x10a)+_0x4c3176),console[_0x430b1b(0x10f)](_0x430b1b(0x10b)+_0x3619f1['appcode']);if(_0x3619f1[_0x430b1b(0x11c)])console[_0x430b1b(0x10f)](_0x430b1b(0x12f)+_0x3619f1[_0x430b1b(0x11c)]);}function a31_0x1e25(){const _0x5f7822=['16587WjDrbO','Write\x20to\x20global\x20(~/','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','object','validation','Override\x20imported\x20default\x20env','\x20\x20default:\x20','includes','Source\x20file\x20not\x20found:\x20','join','file','string','app','Invalid\x20env\x20\x22','appcode','parse','Skip\x20confirmation\x20when\x20overwriting','\x20\x20config:\x20\x20','\x20\x20appcode:\x20','global','523620Bcmhrn','message','log','yes','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','cwd','utf8','83297SDpTGy','3684EznkBt','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`.','boolean','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.',')\x20instead\x20of\x20project','8847760gYtDzG','389436advGbA','defaultApp','Failed\x20to\x20parse\x20source\x20file:\x20','532176knxfTN','newConfigFileName','\x22.\x20Allowed:\x20','3736yhSuWQ','entries','5DTfeqJ','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','env','apps','13216GSXemu','project'];a31_0x1e25=function(){return _0x5f7822;};return a31_0x1e25();}function convertToRuntimeConfig(_0x467e2e){const _0x4c96b2=a31_0x56d7e8;if(_0x467e2e[_0x4c96b2(0x126)]&&typeof _0x467e2e[_0x4c96b2(0x126)]===_0x4c96b2(0x12c))throw CliErrors[_0x4c96b2(0x12d)](_0x4c96b2(0x124),_0x4c96b2(0x118));const _0x3b3887={};for(const _0x3b933c of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x467e2e[_0x3b933c]!==undefined&&(_0x3b3887[_0x3b933c]=_0x467e2e[_0x3b933c]);}return!_0x3b3887['riskLevel']&&(_0x3b3887['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x3b3887;}async function writeImportConfig(_0xfb1161,_0x86c5f5,_0x371a1a){const _0x5d6923=a31_0x56d7e8;let _0x1fd0c4={};existsSync(_0xfb1161)&&!_0x371a1a[_0x5d6923(0x110)]&&(_0x1fd0c4=readConfigFile(_0xfb1161));for(const [_0xb18187,_0x43490d]of Object[_0x5d6923(0x122)](_0x86c5f5)){_0x43490d!==undefined&&(_0x1fd0c4[_0xb18187]=_0x43490d);}if(_0x1fd0c4['app'])delete _0x1fd0c4[_0x5d6923(0x135)];writeConfigFile(_0xfb1161,_0x1fd0c4);}function resolveFilePath(_0x343766){const _0x2bc858=a31_0x56d7e8;return isAbsolute(_0x343766)?_0x343766:resolve(process[_0x2bc858(0x112)](),_0x343766);}function readSourceFile(_0xbd4ae6){const _0x524e62=a31_0x56d7e8;try{const _0x25af26=readFileSync(_0xbd4ae6,{'encoding':_0x524e62(0x113)});return JSON[_0x524e62(0x138)](_0x25af26);}catch(_0x41bec7){throw CliErrors['validation'](_0x524e62(0x11d)+_0x41bec7[_0x524e62(0x10e)]);}}function resolveImportEnv(_0x29f7d0){const _0xe8768=a31_0x56d7e8,_0x3a59ae=_0x29f7d0[_0xe8768(0x125)];if(_0x3a59ae===undefined||_0x3a59ae==='')return DEFAULT_CONFIG_VALUES[_0xe8768(0x125)];if(!RUNTIME_ENV_VALUES[_0xe8768(0x130)](_0x3a59ae))throw CliErrors['validation'](_0xe8768(0x136)+_0x3a59ae+_0xe8768(0x120)+RUNTIME_ENV_VALUES[_0xe8768(0x132)](',\x20'));return _0x3a59ae;}
@@ -1 +1 @@
1
- const a32_0x190f3e=a32_0x3aff;(function(_0x19d881,_0x1af4f3){const _0x58b1f2=a32_0x3aff,_0x995a4c=_0x19d881();while(!![]){try{const _0x559155=parseInt(_0x58b1f2(0x133))/0x1*(-parseInt(_0x58b1f2(0x14b))/0x2)+parseInt(_0x58b1f2(0x11f))/0x3*(parseInt(_0x58b1f2(0x13c))/0x4)+parseInt(_0x58b1f2(0x131))/0x5*(parseInt(_0x58b1f2(0x14f))/0x6)+-parseInt(_0x58b1f2(0x149))/0x7+-parseInt(_0x58b1f2(0x142))/0x8*(parseInt(_0x58b1f2(0x153))/0x9)+parseInt(_0x58b1f2(0x144))/0xa*(parseInt(_0x58b1f2(0x138))/0xb)+-parseInt(_0x58b1f2(0x159))/0xc;if(_0x559155===_0x1af4f3)break;else _0x995a4c['push'](_0x995a4c['shift']());}catch(_0x50c78c){_0x995a4c['push'](_0x995a4c['shift']());}}}(a32_0x43e7,0x687d3));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':a32_0x190f3e(0x151),'type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x190f3e(0x130),'type':a32_0x190f3e(0x156),'required':!![],'description':a32_0x190f3e(0x155)},QUERY_FLAG={'name':a32_0x190f3e(0x132),'type':a32_0x190f3e(0x156),'required':!![],'description':a32_0x190f3e(0x152)},TOPK_FLAG={'name':a32_0x190f3e(0x147),'type':a32_0x190f3e(0x12a),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x2e35eb){const _0x5f484e=a32_0x190f3e;if(!_0x2e35eb)throw CliErrors[_0x5f484e(0x126)](_0x5f484e(0x12f));if(!existsSync(_0x2e35eb))throw CliErrors[_0x5f484e(0x126)]('File\x20not\x20found:\x20'+_0x2e35eb);if(!statSync(_0x2e35eb)['isFile']())throw CliErrors[_0x5f484e(0x126)](_0x5f484e(0x13a)+_0x2e35eb);return readFileSync(_0x2e35eb,_0x5f484e(0x122));}function summarizePersonalItem(_0x49b283){const _0x528d03=a32_0x190f3e;return{'id':_0x49b283['id'],'title':_0x49b283['title'],'version':_0x49b283[_0x528d03(0x15b)],'ragStatus':_0x49b283[_0x528d03(0x154)],'ragErrorMessage':_0x49b283[_0x528d03(0x134)],'updateTime':_0x49b283[_0x528d03(0x125)]};}function detailPersonalItem(_0x3f9494){const _0x4a2319=a32_0x190f3e;return{'id':_0x3f9494['id'],'appCode':_0x3f9494['appCode'],'scope':_0x3f9494['scope'],'userId':_0x3f9494['userId'],'title':_0x3f9494[_0x4a2319(0x151)],'content':_0x3f9494['content']??'','version':_0x3f9494[_0x4a2319(0x15b)],'ragStatus':_0x3f9494[_0x4a2319(0x154)],'ragErrorMessage':_0x3f9494[_0x4a2319(0x134)],'createTime':_0x3f9494['createTime'],'updateTime':_0x3f9494[_0x4a2319(0x125)]};}function a32_0x43e7(){const _0x5c1cb7=['File\x20path\x20is\x20required.','file','174855egFCWH','query','11tjiBLb','ragErrorMessage','search','length','num','8481308EACwWq','create','File\x20is\x20not\x20a\x20regular\x20file:\x20','verbose','4xAfyhK','根据本地文件创建个人知识库条目','/update','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','Created\x20KB\x20entry\x20','1668280tuMgkG','score','10EPOmCs','weightedScore','Personal\x20knowledge-base\x20entry\x20ID','topk','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','553sVdkXA','content','20626FrwiyK','flag','--topk\x20must\x20be\x20a\x20positive\x20number.','update','78aVdDeF','body','title','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','9mUxpaY','ragStatus','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','string','build','appCode','11801088TxCKaC','write','version','bool','isFinite','Override\x20the\x20existing\x20entry\x20title','/client/knowledge-base/personal/','1523451EIHRLA','metadata','根据本地文件更新个人知识库条目','utf8','trim','str','updateTime','validation','description','docId','/client/knowledge-base/personal/create','number','POST','read','scope','list'];a32_0x43e7=function(){return _0x5c1cb7;};return a32_0x43e7();}function a32_0x3aff(_0x5c19d3,_0x390727){_0x5c19d3=_0x5c19d3-0x11b;const _0x43e752=a32_0x43e7();let _0x3afffb=_0x43e752[_0x5c19d3];return _0x3afffb;}function summarizeSearchHit(_0x2414a0){const _0x228613=a32_0x190f3e;return{'scope':_0x2414a0[_0x228613(0x12d)],'title':_0x2414a0['title'],'docId':_0x2414a0[_0x228613(0x128)],'score':_0x2414a0[_0x228613(0x143)],'weightedScore':_0x2414a0[_0x228613(0x145)],'content':_0x2414a0[_0x228613(0x14a)],'metadata':_0x2414a0[_0x228613(0x120)]};}function readTopK(_0x4c45fb){const _0x3cdada=a32_0x190f3e,_0x13be34=_0x4c45fb[_0x3cdada(0x14c)]('topk');if(_0x13be34===undefined||_0x13be34===null||_0x13be34==='')return undefined;const _0xa0eef4=_0x4c45fb[_0x3cdada(0x137)](_0x3cdada(0x147));if(!Number[_0x3cdada(0x11c)](_0xa0eef4)||_0xa0eef4<0x1)throw CliErrors['validation'](_0x3cdada(0x14d));return _0xa0eef4;}const kbList={'service':'kb','command':a32_0x190f3e(0x12e),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x190f3e(0x12c),'flags':[VERBOSE_FLAG],async 'execute'(_0x14e6dc){const _0xf2e0a9=a32_0x190f3e,_0x126a1f=await listPersonalKnowledgeBaseItems(_0x14e6dc[_0xf2e0a9(0x158)]);if(_0x14e6dc[_0xf2e0a9(0x11b)](_0xf2e0a9(0x13b)))return{'ok':!![],'data':{'total':_0x126a1f[_0xf2e0a9(0x136)],'items':_0x126a1f}};return{'ok':!![],'data':{'total':_0x126a1f[_0xf2e0a9(0x136)],'items':_0x126a1f['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x190f3e(0x148),'risk':'read','flags':[{...ID_FLAG,'description':a32_0x190f3e(0x146)}],async 'execute'(_0x394329){const _0x47e6ca=a32_0x190f3e,_0x4599e3=await getPersonalKnowledgeBaseItem(_0x394329['num']('id'),_0x394329[_0x47e6ca(0x158)]);return{'ok':!![],'data':detailPersonalItem(_0x4599e3)};}},kbCreate={'service':'kb','command':a32_0x190f3e(0x139),'description':a32_0x190f3e(0x13d),'risk':a32_0x190f3e(0x15a),'confirmationDescription':a32_0x190f3e(0x140),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x1cfb3f){const _0x4628dd=a32_0x190f3e,_0x1266e5=_0x1cfb3f[_0x4628dd(0x124)]('title'),_0x1d5677=readKnowledgeFile(_0x1cfb3f[_0x4628dd(0x124)](_0x4628dd(0x130))),_0xaa36b9=await createPersonalKnowledgeBaseItem(_0x1cfb3f['appCode'],{'title':_0x1266e5,'content':_0x1d5677});return{'ok':!![],'data':summarizePersonalItem(_0xaa36b9),'message':_0x4628dd(0x141)+_0xaa36b9['id']+'\x20('+_0xaa36b9[_0x4628dd(0x151)]+')'};},async 'dryRun'(_0x351b29){const _0x51149c=a32_0x190f3e,_0x3848ea=_0x351b29[_0x51149c(0x124)](_0x51149c(0x151)),_0x8557a5=readKnowledgeFile(_0x351b29[_0x51149c(0x124)]('file'));return dryRun(_0x51149c(0x12b),_0x51149c(0x129))[_0x51149c(0x150)]({'appCode':_0x351b29[_0x51149c(0x158)],'title':_0x3848ea,'content':_0x8557a5})['description'](_0x51149c(0x13f)+_0x3848ea+'\x22')[_0x51149c(0x157)]();}},kbUpdate={'service':'kb','command':a32_0x190f3e(0x14e),'description':a32_0x190f3e(0x121),'risk':a32_0x190f3e(0x15a),'confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x190f3e(0x11d)},FILE_FLAG],async 'execute'(_0x5f08c0){const _0x1714ce=a32_0x190f3e,_0x57d058=_0x5f08c0['num']('id'),_0x10ea6d=readKnowledgeFile(_0x5f08c0[_0x1714ce(0x124)]('file')),_0x204936=_0x5f08c0[_0x1714ce(0x124)](_0x1714ce(0x151))||(await getPersonalKnowledgeBaseItem(_0x57d058,_0x5f08c0[_0x1714ce(0x158)]))['title'],_0x3161a7=await updatePersonalKnowledgeBaseItem(_0x57d058,_0x5f08c0['appCode'],{'title':_0x204936,'content':_0x10ea6d});return{'ok':!![],'data':summarizePersonalItem(_0x3161a7),'message':'Updated\x20KB\x20entry\x20'+_0x3161a7['id']+'\x20('+_0x3161a7[_0x1714ce(0x151)]+')'};},async 'dryRun'(_0x10c856){const _0x55a348=a32_0x190f3e,_0x11aca3=_0x10c856['num']('id'),_0x4de507=readKnowledgeFile(_0x10c856[_0x55a348(0x124)]('file')),_0x5f5421=_0x10c856[_0x55a348(0x124)]('title')||(await getPersonalKnowledgeBaseItem(_0x11aca3,_0x10c856['appCode']))[_0x55a348(0x151)];return dryRun('POST',_0x55a348(0x11e)+_0x11aca3+_0x55a348(0x13e))[_0x55a348(0x150)]({'appCode':_0x10c856[_0x55a348(0x158)],'title':_0x5f5421,'content':_0x4de507})[_0x55a348(0x127)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x11aca3)['build']();}},kbSearch={'service':'kb','command':a32_0x190f3e(0x135),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x9307d3){const _0x3832ea=a32_0x190f3e;if(!_0x9307d3[_0x3832ea(0x124)](_0x3832ea(0x132))[_0x3832ea(0x123)]())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x9307d3);},async 'execute'(_0x5e29b9){const _0x5c3cf7=a32_0x190f3e,_0x327a18=_0x5e29b9[_0x5c3cf7(0x124)]('query')[_0x5c3cf7(0x123)](),_0x5d8b4e=readTopK(_0x5e29b9),_0x401de6=await searchKnowledgeBase(_0x5e29b9['appCode'],{'query':_0x327a18,'topK':_0x5d8b4e});return{'ok':!![],'data':{'total':_0x401de6[_0x5c3cf7(0x136)],'hits':_0x401de6['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x38ab35=a32_0x297c;function a32_0x45d0(){const _0x2db000=['weightedScore','create','userId','num','validation','/client/knowledge-base/personal/create','title','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','body','map','15pynhZQ','Personal\x20knowledge-base\x20entry\x20ID','根据本地文件更新个人知识库条目','5486760daCIQK','30NurrMI','updateTime','File\x20path\x20is\x20required.','createTime','81EvKxXp','read','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','build','list','ragErrorMessage','flag','--topk\x20must\x20be\x20a\x20positive\x20number.','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','4174345yUdKLb','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','6853HaGBwV','/client/knowledge-base/personal/','metadata','length','version','topk','Personal\x20knowledge-base\x20entry\x20title','verbose','file','appCode','File\x20not\x20found:\x20','Updated\x20KB\x20entry\x20','Created\x20KB\x20entry\x20','isFile','6xrRwCc','1104770GbdKlr','content','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','1287752acbqOG','83892ASTgFt','Override\x20the\x20existing\x20entry\x20title','scope','score','bool','Search\x20query\x20is\x20required.','query','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','write','utf8','27212qDXTCA','str','description','POST','ragStatus','1966372MAZLWQ','trim','docId','根据本地文件创建个人知识库条目','把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','string'];a32_0x45d0=function(){return _0x2db000;};return a32_0x45d0();}(function(_0x40e3e9,_0x1f2e97){const _0x496268=a32_0x297c,_0x27fbe4=_0x40e3e9();while(!![]){try{const _0x55ac18=parseInt(_0x496268(0x108))/0x1+parseInt(_0x496268(0xd0))/0x2*(parseInt(_0x496268(0xea))/0x3)+parseInt(_0x496268(0xd5))/0x4*(parseInt(_0x496268(0xe6))/0x5)+-parseInt(_0x496268(0x107))/0x6*(-parseInt(_0x496268(0xf7))/0x7)+parseInt(_0x496268(0x10b))/0x8*(parseInt(_0x496268(0xee))/0x9)+parseInt(_0x496268(0xe9))/0xa+parseInt(_0x496268(0xf9))/0xb*(-parseInt(_0x496268(0x10c))/0xc);if(_0x55ac18===_0x1f2e97)break;else _0x27fbe4['push'](_0x27fbe4['shift']());}catch(_0x68f393){_0x27fbe4['push'](_0x27fbe4['shift']());}}}(a32_0x45d0,0xe8e5c));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':a32_0x38ab35(0xe1),'type':a32_0x38ab35(0xda),'required':!![],'description':a32_0x38ab35(0xff)},FILE_FLAG={'name':a32_0x38ab35(0x101),'type':a32_0x38ab35(0xda),'required':!![],'description':a32_0x38ab35(0xe3)},QUERY_FLAG={'name':a32_0x38ab35(0x112),'type':a32_0x38ab35(0xda),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x38ab35(0xfe),'type':'number','description':a32_0x38ab35(0xf8)};function readKnowledgeFile(_0x406424){const _0x5eae6f=a32_0x38ab35;if(!_0x406424)throw CliErrors[_0x5eae6f(0xdf)](_0x5eae6f(0xec));if(!existsSync(_0x406424))throw CliErrors[_0x5eae6f(0xdf)](_0x5eae6f(0x103)+_0x406424);if(!statSync(_0x406424)[_0x5eae6f(0x106)]())throw CliErrors[_0x5eae6f(0xdf)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x406424);return readFileSync(_0x406424,_0x5eae6f(0xcf));}function summarizePersonalItem(_0xf36ea0){const _0x191f66=a32_0x38ab35;return{'id':_0xf36ea0['id'],'title':_0xf36ea0[_0x191f66(0xe1)],'version':_0xf36ea0[_0x191f66(0xfd)],'ragStatus':_0xf36ea0[_0x191f66(0xd4)],'ragErrorMessage':_0xf36ea0[_0x191f66(0xf3)],'updateTime':_0xf36ea0[_0x191f66(0xeb)]};}function detailPersonalItem(_0x48365c){const _0x17d01b=a32_0x38ab35;return{'id':_0x48365c['id'],'appCode':_0x48365c[_0x17d01b(0x102)],'scope':_0x48365c[_0x17d01b(0x10e)],'userId':_0x48365c[_0x17d01b(0xdd)],'title':_0x48365c[_0x17d01b(0xe1)],'content':_0x48365c[_0x17d01b(0x109)]??'','version':_0x48365c[_0x17d01b(0xfd)],'ragStatus':_0x48365c[_0x17d01b(0xd4)],'ragErrorMessage':_0x48365c[_0x17d01b(0xf3)],'createTime':_0x48365c[_0x17d01b(0xed)],'updateTime':_0x48365c[_0x17d01b(0xeb)]};}function summarizeSearchHit(_0x347aa6){const _0x326f15=a32_0x38ab35;return{'scope':_0x347aa6['scope'],'title':_0x347aa6[_0x326f15(0xe1)],'docId':_0x347aa6[_0x326f15(0xd7)],'score':_0x347aa6[_0x326f15(0x10f)],'weightedScore':_0x347aa6[_0x326f15(0xdb)],'content':_0x347aa6['content'],'metadata':_0x347aa6[_0x326f15(0xfb)]};}function readTopK(_0x22bca2){const _0x2b8f3e=a32_0x38ab35,_0x363444=_0x22bca2[_0x2b8f3e(0xf4)](_0x2b8f3e(0xfe));if(_0x363444===undefined||_0x363444===null||_0x363444==='')return undefined;const _0x4cd60c=_0x22bca2[_0x2b8f3e(0xde)](_0x2b8f3e(0xfe));if(!Number['isFinite'](_0x4cd60c)||_0x4cd60c<0x1)throw CliErrors[_0x2b8f3e(0xdf)](_0x2b8f3e(0xf5));return _0x4cd60c;}const kbList={'service':'kb','command':a32_0x38ab35(0xf2),'description':a32_0x38ab35(0xf6),'risk':a32_0x38ab35(0xef),'flags':[VERBOSE_FLAG],async 'execute'(_0x42725c){const _0x23666f=a32_0x38ab35,_0x33df6e=await listPersonalKnowledgeBaseItems(_0x42725c[_0x23666f(0x102)]);if(_0x42725c[_0x23666f(0x110)](_0x23666f(0x100)))return{'ok':!![],'data':{'total':_0x33df6e[_0x23666f(0xfc)],'items':_0x33df6e}};return{'ok':!![],'data':{'total':_0x33df6e['length'],'items':_0x33df6e[_0x23666f(0xe5)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a32_0x38ab35(0x10a),'risk':a32_0x38ab35(0xef),'flags':[{...ID_FLAG,'description':a32_0x38ab35(0xe7)}],async 'execute'(_0x8a9d1e){const _0x4bce78=a32_0x38ab35,_0x2e1b5d=await getPersonalKnowledgeBaseItem(_0x8a9d1e[_0x4bce78(0xde)]('id'),_0x8a9d1e[_0x4bce78(0x102)]);return{'ok':!![],'data':detailPersonalItem(_0x2e1b5d)};}},kbCreate={'service':'kb','command':a32_0x38ab35(0xdc),'description':a32_0x38ab35(0xd8),'risk':a32_0x38ab35(0xce),'confirmationDescription':a32_0x38ab35(0xd9),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x56a8da){const _0x3ebf89=a32_0x38ab35,_0x79316f=_0x56a8da['str'](_0x3ebf89(0xe1)),_0x46d6fe=readKnowledgeFile(_0x56a8da[_0x3ebf89(0xd1)](_0x3ebf89(0x101))),_0x565518=await createPersonalKnowledgeBaseItem(_0x56a8da[_0x3ebf89(0x102)],{'title':_0x79316f,'content':_0x46d6fe});return{'ok':!![],'data':summarizePersonalItem(_0x565518),'message':_0x3ebf89(0x105)+_0x565518['id']+'\x20('+_0x565518['title']+')'};},async 'dryRun'(_0x5315a0){const _0x3dafa2=a32_0x38ab35,_0x5d59bd=_0x5315a0[_0x3dafa2(0xd1)](_0x3dafa2(0xe1)),_0x5c6cf5=readKnowledgeFile(_0x5315a0['str'](_0x3dafa2(0x101)));return dryRun(_0x3dafa2(0xd3),_0x3dafa2(0xe0))[_0x3dafa2(0xe4)]({'appCode':_0x5315a0[_0x3dafa2(0x102)],'title':_0x5d59bd,'content':_0x5c6cf5})[_0x3dafa2(0xd2)](_0x3dafa2(0xf0)+_0x5d59bd+'\x22')[_0x3dafa2(0xf1)]();}},kbUpdate={'service':'kb','command':'update','description':a32_0x38ab35(0xe8),'risk':a32_0x38ab35(0xce),'confirmationDescription':'用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','flags':[{...ID_FLAG,'description':a32_0x38ab35(0xe7)},{...TITLE_FLAG,'required':![],'description':a32_0x38ab35(0x10d)},FILE_FLAG],async 'execute'(_0x29772a){const _0x3fdccb=a32_0x38ab35,_0x48e758=_0x29772a[_0x3fdccb(0xde)]('id'),_0xf6ffc7=readKnowledgeFile(_0x29772a[_0x3fdccb(0xd1)](_0x3fdccb(0x101))),_0x49f25f=_0x29772a[_0x3fdccb(0xd1)]('title')||(await getPersonalKnowledgeBaseItem(_0x48e758,_0x29772a[_0x3fdccb(0x102)]))['title'],_0x5912cb=await updatePersonalKnowledgeBaseItem(_0x48e758,_0x29772a[_0x3fdccb(0x102)],{'title':_0x49f25f,'content':_0xf6ffc7});return{'ok':!![],'data':summarizePersonalItem(_0x5912cb),'message':_0x3fdccb(0x104)+_0x5912cb['id']+'\x20('+_0x5912cb[_0x3fdccb(0xe1)]+')'};},async 'dryRun'(_0x12e9c0){const _0x186cb9=a32_0x38ab35,_0x2ca8a0=_0x12e9c0[_0x186cb9(0xde)]('id'),_0x375581=readKnowledgeFile(_0x12e9c0[_0x186cb9(0xd1)]('file')),_0x340bab=_0x12e9c0[_0x186cb9(0xd1)](_0x186cb9(0xe1))||(await getPersonalKnowledgeBaseItem(_0x2ca8a0,_0x12e9c0[_0x186cb9(0x102)]))[_0x186cb9(0xe1)];return dryRun(_0x186cb9(0xd3),_0x186cb9(0xfa)+_0x2ca8a0+'/update')[_0x186cb9(0xe4)]({'appCode':_0x12e9c0[_0x186cb9(0x102)],'title':_0x340bab,'content':_0x375581})['description'](_0x186cb9(0xe2)+_0x2ca8a0)[_0x186cb9(0xf1)]();}},kbSearch={'service':'kb','command':'search','description':a32_0x38ab35(0xcd),'risk':a32_0x38ab35(0xef),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x21dc32){const _0xdbd286=a32_0x38ab35;if(!_0x21dc32[_0xdbd286(0xd1)]('query')[_0xdbd286(0xd6)]())throw CliErrors[_0xdbd286(0xdf)](_0xdbd286(0x111));readTopK(_0x21dc32);},async 'execute'(_0x1d78fb){const _0x36f5b6=a32_0x38ab35,_0x477c01=_0x1d78fb[_0x36f5b6(0xd1)](_0x36f5b6(0x112))[_0x36f5b6(0xd6)](),_0x57ec14=readTopK(_0x1d78fb),_0x3e966e=await searchKnowledgeBase(_0x1d78fb['appCode'],{'query':_0x477c01,'topK':_0x57ec14});return{'ok':!![],'data':{'total':_0x3e966e[_0x36f5b6(0xfc)],'hits':_0x3e966e[_0x36f5b6(0xe5)](summarizeSearchHit)}};}};function a32_0x297c(_0x35e543,_0x3695c5){_0x35e543=_0x35e543-0xcd;const _0x45d05b=a32_0x45d0();let _0x297c72=_0x45d05b[_0x35e543];return _0x297c72;}export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x3e5f23=a33_0x15ce;(function(_0x9cb905,_0x39a128){const _0x5cdfc4=a33_0x15ce,_0xee7f1e=_0x9cb905();while(!![]){try{const _0x1d48bd=-parseInt(_0x5cdfc4(0x1dc))/0x1+parseInt(_0x5cdfc4(0x1e2))/0x2*(parseInt(_0x5cdfc4(0x1e3))/0x3)+parseInt(_0x5cdfc4(0x1d9))/0x4*(parseInt(_0x5cdfc4(0x1f6))/0x5)+parseInt(_0x5cdfc4(0x1e9))/0x6+-parseInt(_0x5cdfc4(0x1f9))/0x7+-parseInt(_0x5cdfc4(0x1e5))/0x8*(parseInt(_0x5cdfc4(0x1f4))/0x9)+-parseInt(_0x5cdfc4(0x1de))/0xa*(parseInt(_0x5cdfc4(0x1df))/0xb);if(_0x1d48bd===_0x39a128)break;else _0xee7f1e['push'](_0xee7f1e['shift']());}catch(_0x5d2ca7){_0xee7f1e['push'](_0xee7f1e['shift']());}}}(a33_0x5a64,0x9517a));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x5a64(){const _0x46a63f=['4loHgem','stringify','message','677731JxtvJh','\x20\x20\x20Duration:\x20','670vmebIE','15202LruEyk','*\x20No\x20logs\x20found','\x20\x20\x20Time:\x20','217738JIApwQ','18tRjyAr','View\x20command\x20history\x20logs','22560JNaZut','\x20\x20\x20Details:\x20','read','keys','6961932PeaGuO','\x20logs:\x0a','level','success','show','log','length','forEach','duration','warn','details','1845vDRPgO','command','4123660KgIZBj','readLogs','logs','4754127xYpDGl','en-US','timestamp'];a33_0x5a64=function(){return _0x46a63f;};return a33_0x5a64();}function a33_0x15ce(_0xa82cce,_0xee58fc){_0xa82cce=_0xa82cce-0x1d8;const _0x5a6423=a33_0x5a64();let _0x15ce76=_0x5a6423[_0xa82cce];return _0x15ce76;}function printLogs(_0x52a0e5){const _0x35f5ba=a33_0x15ce;if(_0x52a0e5[_0x35f5ba(0x1ef)]===0x0){console[_0x35f5ba(0x1ee)](_0x35f5ba(0x1e0));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x35f5ba(0x1ea)),_0x52a0e5[_0x35f5ba(0x1f0)]((_0x282896,_0x260f3a)=>{const _0x141ff7=_0x35f5ba,_0x24be01=new Date(_0x282896[_0x141ff7(0x1d8)])['toLocaleString'](_0x141ff7(0x1fa)),_0x36aaf2=_0x282896['level']===_0x141ff7(0x1ec)?'√':_0x282896[_0x141ff7(0x1eb)]==='error'?'×':_0x282896[_0x141ff7(0x1eb)]===_0x141ff7(0x1f2)?'!':'i';console[_0x141ff7(0x1ee)](_0x260f3a+0x1+'.\x20'+_0x36aaf2+'\x20['+_0x282896[_0x141ff7(0x1f5)]+']\x20'+_0x282896[_0x141ff7(0x1db)]),console[_0x141ff7(0x1ee)](_0x141ff7(0x1e1)+_0x24be01),_0x282896[_0x141ff7(0x1f1)]&&console['log'](_0x141ff7(0x1dd)+_0x282896[_0x141ff7(0x1f1)]+'ms'),_0x282896[_0x141ff7(0x1f3)]&&Object[_0x141ff7(0x1e8)](_0x282896[_0x141ff7(0x1f3)])[_0x141ff7(0x1ef)]>0x0&&console[_0x141ff7(0x1ee)](_0x141ff7(0x1e6)+JSON[_0x141ff7(0x1da)](_0x282896[_0x141ff7(0x1f3)],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a33_0x3e5f23(0x1f8),'command':a33_0x3e5f23(0x1ed),'description':a33_0x3e5f23(0x1e4),'risk':a33_0x3e5f23(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2fad7b){const _0x1bc338=a33_0x3e5f23;return printLogs(logger[_0x1bc338(0x1f7)]()),{'ok':!![]};}}];
1
+ const a33_0x441095=a33_0x3452;function a33_0x3452(_0x5646ee,_0x1532c8){_0x5646ee=_0x5646ee-0x106;const _0x536b10=a33_0x536b();let _0x345268=_0x536b10[_0x5646ee];return _0x345268;}(function(_0x2c869b,_0x53dc36){const _0x287132=a33_0x3452,_0x35c8f2=_0x2c869b();while(!![]){try{const _0x41f7ed=-parseInt(_0x287132(0x11f))/0x1*(parseInt(_0x287132(0x112))/0x2)+-parseInt(_0x287132(0x10d))/0x3+-parseInt(_0x287132(0x106))/0x4+parseInt(_0x287132(0x119))/0x5*(-parseInt(_0x287132(0x11e))/0x6)+parseInt(_0x287132(0x115))/0x7*(parseInt(_0x287132(0x10f))/0x8)+-parseInt(_0x287132(0x108))/0x9*(-parseInt(_0x287132(0x10b))/0xa)+parseInt(_0x287132(0x109))/0xb;if(_0x41f7ed===_0x53dc36)break;else _0x35c8f2['push'](_0x35c8f2['shift']());}catch(_0x3cd03c){_0x35c8f2['push'](_0x35c8f2['shift']());}}}(a33_0x536b,0x7da56));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x536b(){const _0xbaf6d9=['\x20\x20\x20Time:\x20','message','22865Bnfqno','duration','log','\x20logs:\x0a','warn','1182Trsjli','1015207xHxfZn','toLocaleString','stringify','View\x20command\x20history\x20logs','error','details','238412rapJqB','length','1762911SGDpbr','29726686pDPIDG','success','10iNIAVB','readLogs','1638117cFkDku','read','1104568EHxpVy','show','timestamp','2yngyRz','\x20\x20\x20Details:\x20','\x20\x20\x20Duration:\x20','7rzWrcJ','level'];a33_0x536b=function(){return _0xbaf6d9;};return a33_0x536b();}function printLogs(_0x14bab3){const _0x2c98e7=a33_0x3452;if(_0x14bab3[_0x2c98e7(0x107)]===0x0){console[_0x2c98e7(0x11b)]('*\x20No\x20logs\x20found');return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0x2c98e7(0x11c)),_0x14bab3['forEach']((_0x2a5895,_0x3d4d19)=>{const _0xb4810f=_0x2c98e7,_0x34dbb7=new Date(_0x2a5895[_0xb4810f(0x111)])[_0xb4810f(0x120)]('en-US'),_0x33d683=_0x2a5895[_0xb4810f(0x116)]===_0xb4810f(0x10a)?'√':_0x2a5895['level']===_0xb4810f(0x123)?'×':_0x2a5895[_0xb4810f(0x116)]===_0xb4810f(0x11d)?'!':'i';console[_0xb4810f(0x11b)](_0x3d4d19+0x1+'.\x20'+_0x33d683+'\x20['+_0x2a5895['command']+']\x20'+_0x2a5895[_0xb4810f(0x118)]),console[_0xb4810f(0x11b)](_0xb4810f(0x117)+_0x34dbb7),_0x2a5895[_0xb4810f(0x11a)]&&console[_0xb4810f(0x11b)](_0xb4810f(0x114)+_0x2a5895['duration']+'ms'),_0x2a5895['details']&&Object['keys'](_0x2a5895[_0xb4810f(0x124)])[_0xb4810f(0x107)]>0x0&&console['log'](_0xb4810f(0x113)+JSON[_0xb4810f(0x121)](_0x2a5895['details'],null,0x2)),console[_0xb4810f(0x11b)]('');});}export const logsDefinitions=[{'service':'logs','command':a33_0x441095(0x110),'description':a33_0x441095(0x122),'risk':a33_0x441095(0x10e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x189b0c){const _0x4d8bc1=a33_0x441095;return printLogs(logger[_0x4d8bc1(0x10c)]()),{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a34_0x3460(_0x4d391a,_0x4c41e4){_0x4d391a=_0x4d391a-0x12e;const _0x1dfd1b=a34_0x1dfd();let _0x34606e=_0x1dfd1b[_0x4d391a];return _0x34606e;}const a34_0x353c60=a34_0x3460;function a34_0x1dfd(){const _0x1ac1db=['2AHDnWc','6558723oWNpCC','<filePath\x20returned\x20by\x20/client/uploadFile>','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','Unsupported\x20OCR\x20scene:\x20','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','\x20OCR\x20from\x20URL','/client/ocr','length','10iObNcM','body','image-file','POST','108315lyRCoS','imageUrl','read','invoice','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','9790968flQmKg','scene','114TwlpWk','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','/client/queryFileUrl','recognize','image-url','toLowerCase','join','str','string','File\x20URL\x20response\x20missing\x20fileUrl.','/client/uploadFile','4528992tleykL','build','idCard','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','idcard','fileUrl','form','68PAGKLv','IdCard','path','Table','filePath','trim','979981hiEsrK','Preview:\x20recognize\x20','28685GpOPzg','2305954CBZMbE','Invoice','fileName','General','appCode','filter','validation','Publicly\x20accessible\x20image\x20or\x20file\x20URL','\x20OCR','general'];a34_0x1dfd=function(){return _0x1ac1db;};return a34_0x1dfd();}(function(_0x4760e0,_0x287b70){const _0x1991a5=a34_0x3460,_0x2f8052=_0x4760e0();while(!![]){try{const _0x344c3f=-parseInt(_0x1991a5(0x13e))/0x1*(-parseInt(_0x1991a5(0x14b))/0x2)+parseInt(_0x1991a5(0x158))/0x3*(-parseInt(_0x1991a5(0x138))/0x4)+-parseInt(_0x1991a5(0x140))/0x5*(-parseInt(_0x1991a5(0x15f))/0x6)+-parseInt(_0x1991a5(0x141))/0x7+parseInt(_0x1991a5(0x131))/0x8+-parseInt(_0x1991a5(0x14c))/0x9*(-parseInt(_0x1991a5(0x154))/0xa)+-parseInt(_0x1991a5(0x15d))/0xb;if(_0x344c3f===_0x287b70)break;else _0x2f8052['push'](_0x2f8052['shift']());}catch(_0x1a1f3c){_0x2f8052['push'](_0x2f8052['shift']());}}}(a34_0x1dfd,0x866a0));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x353c60(0x15b),a34_0x353c60(0x14a),a34_0x353c60(0x137),a34_0x353c60(0x133)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x353c60(0x142),'general':a34_0x353c60(0x144),'form':a34_0x353c60(0x13b),'idCard':a34_0x353c60(0x139)},SCENE_FLAG={'name':a34_0x353c60(0x15e),'type':a34_0x353c60(0x12e),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x353c60(0x160)},IMAGE_FILE_FLAG={'name':'image-file','type':'string','description':a34_0x353c60(0x14e)},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x353c60(0x12e),'description':a34_0x353c60(0x148)};function normalizeScene(_0x113c7b){const _0x4cf64e=a34_0x353c60,_0x971719=_0x113c7b[_0x4cf64e(0x13d)]()[_0x4cf64e(0x164)]();if(_0x971719===_0x4cf64e(0x135))return _0x4cf64e(0x133);if(_0x971719===_0x4cf64e(0x15b)||_0x971719===_0x4cf64e(0x14a)||_0x971719===_0x4cf64e(0x137))return _0x971719;throw CliErrors['validation'](_0x4cf64e(0x14f)+_0x113c7b+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x4cf64e(0x165)](',\x20'));}function selectedInputs(_0x144b4d){const _0x5b7d67=a34_0x353c60,_0xbc16bb=_0x144b4d[_0x5b7d67(0x166)](_0x5b7d67(0x156))[_0x5b7d67(0x13d)](),_0x385d9c=_0x144b4d[_0x5b7d67(0x166)](_0x5b7d67(0x163))[_0x5b7d67(0x13d)]();return{'imageFile':_0xbc16bb,'imageUrl':_0x385d9c,'count':[_0xbc16bb,_0x385d9c][_0x5b7d67(0x146)](Boolean)[_0x5b7d67(0x153)]};}function validateInputSelection(_0x2a9483){const _0x2f32bd=a34_0x353c60,_0x4f2bb2=selectedInputs(_0x2a9483);if(_0x4f2bb2['count']!==0x1)throw CliErrors[_0x2f32bd(0x147)](_0x2f32bd(0x150));return _0x4f2bb2;}function withScene(_0x178f15,_0x1916d2,_0x24552e){const _0xb84c0d=a34_0x353c60;return{..._0x178f15,'scene':_0x1916d2,..._0x24552e?{'sourceFile':{'fileName':_0x24552e[_0xb84c0d(0x143)],'filePath':_0x24552e[_0xb84c0d(0x13c)]}}:{}};}const ocrRecognize={'service':'ocr','command':a34_0x353c60(0x162),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0x353c60(0x15a),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3f4aa3){const _0x59ab1a=a34_0x353c60,_0x1c1390=normalizeScene(_0x3f4aa3[_0x59ab1a(0x166)](_0x59ab1a(0x15e))),_0x14df27=SCENE_TO_LEGACY_TYPE[_0x1c1390],_0x5a5a04=validateInputSelection(_0x3f4aa3);if(_0x5a5a04[_0x59ab1a(0x159)])return dryRun(_0x59ab1a(0x157),_0x59ab1a(0x152))[_0x59ab1a(0x155)]({'appCode':_0x3f4aa3[_0x59ab1a(0x145)],'url':_0x5a5a04[_0x59ab1a(0x159)],'type':_0x14df27})['description'](_0x59ab1a(0x13f)+_0x1c1390+_0x59ab1a(0x151))['build']();const _0xb742fe=requireRuntimeUploadFile(_0x5a5a04['imageFile'],_0x59ab1a(0x156));return dryRun(_0x59ab1a(0x157),_0x59ab1a(0x130))[_0x59ab1a(0x155)]({'steps':[{'method':'POST','url':_0x59ab1a(0x130),'body':{'appCode':_0x3f4aa3[_0x59ab1a(0x145)],'multipart':{'file':_0xb742fe}}},{'method':_0x59ab1a(0x157),'url':_0x59ab1a(0x161),'body':{'filePath':_0x59ab1a(0x14d),'downloadFlag':![]}},{'method':_0x59ab1a(0x157),'url':_0x59ab1a(0x152),'body':{'appCode':_0x3f4aa3['appCode'],'url':_0x59ab1a(0x134),'type':_0x14df27}}]})['description'](_0x59ab1a(0x15c)+_0x1c1390+_0x59ab1a(0x149))[_0x59ab1a(0x132)]();},async 'execute'(_0x429526){const _0x2cc864=a34_0x353c60,_0x48589e=normalizeScene(_0x429526['str'](_0x2cc864(0x15e))),_0x536fa5=SCENE_TO_LEGACY_TYPE[_0x48589e],_0x3caae9=validateInputSelection(_0x429526);if(_0x3caae9['imageUrl']){const _0x4e68d5=await recognizeRuntimeOcr(_0x429526['appCode'],{'url':_0x3caae9[_0x2cc864(0x159)],'type':_0x536fa5});return{'ok':!![],'data':withScene(_0x4e68d5,_0x48589e)};}const _0x1d0b94=requireRuntimeUploadFile(_0x3caae9['imageFile'],_0x2cc864(0x156)),_0x475c29=await uploadRuntimeFile(_0x429526[_0x2cc864(0x145)],_0x1d0b94[_0x2cc864(0x13a)]);if(!_0x475c29['filePath'])throw CliErrors['apiError']('File\x20upload\x20response\x20missing\x20filePath.');const _0x26bfc5=await queryRuntimeFileUrl(_0x475c29[_0x2cc864(0x13c)],{'download':![]});if(!_0x26bfc5[_0x2cc864(0x136)])throw CliErrors['apiError'](_0x2cc864(0x12f));const _0x1d3225=await recognizeRuntimeOcr(_0x429526['appCode'],{'url':_0x26bfc5[_0x2cc864(0x136)],'type':_0x536fa5});return{'ok':!![],'data':withScene(_0x1d3225,_0x48589e,_0x475c29)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x2ff919=a34_0x1138;(function(_0xb380a0,_0xc9838b){const _0x43aaf5=a34_0x1138,_0x39bde2=_0xb380a0();while(!![]){try{const _0x103ab2=-parseInt(_0x43aaf5(0x8a))/0x1*(parseInt(_0x43aaf5(0x6c))/0x2)+-parseInt(_0x43aaf5(0x6d))/0x3+parseInt(_0x43aaf5(0x9d))/0x4+parseInt(_0x43aaf5(0x9a))/0x5+-parseInt(_0x43aaf5(0x80))/0x6*(-parseInt(_0x43aaf5(0x79))/0x7)+parseInt(_0x43aaf5(0x8e))/0x8*(parseInt(_0x43aaf5(0x76))/0x9)+parseInt(_0x43aaf5(0x78))/0xa*(parseInt(_0x43aaf5(0x96))/0xb);if(_0x103ab2===_0xc9838b)break;else _0x39bde2['push'](_0x39bde2['shift']());}catch(_0x30c713){_0x39bde2['push'](_0x39bde2['shift']());}}}(a34_0x2ea8,0x1ffc1));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x2ea8(){const _0x4562da=['Publicly\x20accessible\x20image\x20or\x20file\x20URL','General','length','271735Tkxvyl','filePath','scene','771564tpTfEE','Unsupported\x20OCR\x20scene:\x20','image-file','POST','validation','general','idcard','Table','2OPodbt','708576cyFcuJ','description','apiError','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','read','count','/client/uploadFile','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','trim','3258HaZowC','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','2290jPTUEU','10038oWGWFG','File\x20upload\x20response\x20missing\x20filePath.','ocr','\x20OCR','/client/ocr','recognize','string','84vXUBOu','.\x20Supported\x20scenes:\x20','imageFile','fileUrl','Preview:\x20recognize\x20','form','body','\x20OCR\x20from\x20URL','imageUrl','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','164434WhRWpa','idCard','fileName','Invoice','2648cavpRO','filter','<filePath\x20returned\x20by\x20/client/uploadFile>','build','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','appCode','str','image-url','6941CzJSzQ'];a34_0x2ea8=function(){return _0x4562da;};return a34_0x2ea8();}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=['invoice',a34_0x2ff919(0xa2),'form','idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x2ff919(0x8d),'general':a34_0x2ff919(0x98),'form':a34_0x2ff919(0x6b),'idCard':'IdCard'},SCENE_FLAG={'name':a34_0x2ff919(0x9c),'type':a34_0x2ff919(0x7f),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x2ff919(0x77)},IMAGE_FILE_FLAG={'name':a34_0x2ff919(0x9f),'type':a34_0x2ff919(0x7f),'description':a34_0x2ff919(0x92)},IMAGE_URL_FLAG={'name':'image-url','type':a34_0x2ff919(0x7f),'description':a34_0x2ff919(0x97)};function normalizeScene(_0x292444){const _0x10dffb=a34_0x2ff919,_0x15fb77=_0x292444[_0x10dffb(0x75)]()['toLowerCase']();if(_0x15fb77===_0x10dffb(0x6a))return _0x10dffb(0x8b);if(_0x15fb77==='invoice'||_0x15fb77===_0x10dffb(0xa2)||_0x15fb77===_0x10dffb(0x85))return _0x15fb77;throw CliErrors[_0x10dffb(0xa1)](_0x10dffb(0x9e)+_0x292444+_0x10dffb(0x81)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x658b80){const _0xfa1a4a=a34_0x2ff919,_0x591069=_0x658b80['str'](_0xfa1a4a(0x9f))[_0xfa1a4a(0x75)](),_0x466b84=_0x658b80[_0xfa1a4a(0x94)](_0xfa1a4a(0x95))[_0xfa1a4a(0x75)]();return{'imageFile':_0x591069,'imageUrl':_0x466b84,'count':[_0x591069,_0x466b84][_0xfa1a4a(0x8f)](Boolean)[_0xfa1a4a(0x99)]};}function validateInputSelection(_0x18e47f){const _0xed8a5b=a34_0x2ff919,_0x4b6091=selectedInputs(_0x18e47f);if(_0x4b6091[_0xed8a5b(0x72)]!==0x1)throw CliErrors[_0xed8a5b(0xa1)](_0xed8a5b(0x70));return _0x4b6091;}function a34_0x1138(_0x5a5193,_0x450137){_0x5a5193=_0x5a5193-0x6a;const _0x2ea876=a34_0x2ea8();let _0x1138d1=_0x2ea876[_0x5a5193];return _0x1138d1;}function withScene(_0x4e5a4e,_0x183fe1,_0xf61ce8){const _0x2f5893=a34_0x2ff919;return{..._0x4e5a4e,'scene':_0x183fe1,..._0xf61ce8?{'sourceFile':{'fileName':_0xf61ce8[_0x2f5893(0x8c)],'filePath':_0xf61ce8[_0x2f5893(0x9b)]}}:{}};}const ocrRecognize={'service':a34_0x2ff919(0x7b),'command':a34_0x2ff919(0x7e),'description':'使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','risk':a34_0x2ff919(0x71),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3210be){const _0x44cda6=a34_0x2ff919,_0x2b3e29=normalizeScene(_0x3210be['str'](_0x44cda6(0x9c))),_0x55ae8b=SCENE_TO_LEGACY_TYPE[_0x2b3e29],_0x979a4e=validateInputSelection(_0x3210be);if(_0x979a4e['imageUrl'])return dryRun(_0x44cda6(0xa0),_0x44cda6(0x7d))[_0x44cda6(0x86)]({'appCode':_0x3210be[_0x44cda6(0x93)],'url':_0x979a4e['imageUrl'],'type':_0x55ae8b})[_0x44cda6(0x6e)](_0x44cda6(0x84)+_0x2b3e29+_0x44cda6(0x87))[_0x44cda6(0x91)]();const _0x433b19=requireRuntimeUploadFile(_0x979a4e['imageFile'],_0x44cda6(0x9f));return dryRun(_0x44cda6(0xa0),_0x44cda6(0x73))['body']({'steps':[{'method':_0x44cda6(0xa0),'url':_0x44cda6(0x73),'body':{'appCode':_0x3210be[_0x44cda6(0x93)],'multipart':{'file':_0x433b19}}},{'method':'POST','url':'/client/queryFileUrl','body':{'filePath':_0x44cda6(0x90),'downloadFlag':![]}},{'method':_0x44cda6(0xa0),'url':'/client/ocr','body':{'appCode':_0x3210be[_0x44cda6(0x93)],'url':_0x44cda6(0x74),'type':_0x55ae8b}}]})[_0x44cda6(0x6e)](_0x44cda6(0x89)+_0x2b3e29+_0x44cda6(0x7c))[_0x44cda6(0x91)]();},async 'execute'(_0xd07a40){const _0x44bf84=a34_0x2ff919,_0x3421f3=normalizeScene(_0xd07a40[_0x44bf84(0x94)](_0x44bf84(0x9c))),_0x2fe6ca=SCENE_TO_LEGACY_TYPE[_0x3421f3],_0xe80e7b=validateInputSelection(_0xd07a40);if(_0xe80e7b[_0x44bf84(0x88)]){const _0x45aff6=await recognizeRuntimeOcr(_0xd07a40[_0x44bf84(0x93)],{'url':_0xe80e7b[_0x44bf84(0x88)],'type':_0x2fe6ca});return{'ok':!![],'data':withScene(_0x45aff6,_0x3421f3)};}const _0x157828=requireRuntimeUploadFile(_0xe80e7b[_0x44bf84(0x82)],_0x44bf84(0x9f)),_0x1b14a9=await uploadRuntimeFile(_0xd07a40[_0x44bf84(0x93)],_0x157828['path']);if(!_0x1b14a9[_0x44bf84(0x9b)])throw CliErrors[_0x44bf84(0x6f)](_0x44bf84(0x7a));const _0x4f113d=await queryRuntimeFileUrl(_0x1b14a9[_0x44bf84(0x9b)],{'download':![]});if(!_0x4f113d[_0x44bf84(0x83)])throw CliErrors[_0x44bf84(0x6f)]('File\x20URL\x20response\x20missing\x20fileUrl.');const _0x5e9f66=await recognizeRuntimeOcr(_0xd07a40[_0x44bf84(0x93)],{'url':_0x4f113d['fileUrl'],'type':_0x2fe6ca});return{'ok':!![],'data':withScene(_0x5e9f66,_0x3421f3,_0x1b14a9)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x961b3d=a35_0x2e79;(function(_0x3e361f,_0x162419){const _0x2e7b50=a35_0x2e79,_0x583a06=_0x3e361f();while(!![]){try{const _0x5d4617=parseInt(_0x2e7b50(0xd1))/0x1*(parseInt(_0x2e7b50(0xe6))/0x2)+-parseInt(_0x2e7b50(0xf6))/0x3*(-parseInt(_0x2e7b50(0xfc))/0x4)+-parseInt(_0x2e7b50(0xe1))/0x5+parseInt(_0x2e7b50(0xce))/0x6*(parseInt(_0x2e7b50(0xc4))/0x7)+-parseInt(_0x2e7b50(0xcb))/0x8*(parseInt(_0x2e7b50(0xeb))/0x9)+-parseInt(_0x2e7b50(0xbf))/0xa*(-parseInt(_0x2e7b50(0xcf))/0xb)+parseInt(_0x2e7b50(0xc6))/0xc*(-parseInt(_0x2e7b50(0xbd))/0xd);if(_0x5d4617===_0x162419)break;else _0x583a06['push'](_0x583a06['shift']());}catch(_0x27a9cf){_0x583a06['push'](_0x583a06['shift']());}}}(a35_0x200e,0xb6b87));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';function a35_0x200e(){const _0x59401f=['Executed\x20personal\x20BFF\x20','detail','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','Preview:\x20update\x20personal\x20BFF\x20','4902695cFMRPD','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','22308wxmOTs','functionName','--params\x20must\x20be\x20a\x20JSON\x20object.','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','根据\x20ID\x20更新个人\x20BFF','344UsWfjM','str','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','6Zhxkqs','11oFQRHM','version','1NSFwXq','write','/client/runtime-bff/personal/create','params','Show\x20one\x20personal\x20BFF\x20by\x20id','description','keys','sourceSessionId','read','File\x20path\x20is\x20required.','updateTime','Personal\x20BFF\x20description','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','validation','isFile','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','2018690ITcUvS','config','num','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','name','1225100QodZkS','body','/update','file','scriptContent','232092LsJtUZ','length','trim','File\x20not\x20found:\x20','createTime','flag','bool','Preview:\x20create\x20personal\x20BFF\x20','scriptType','build','gmtCreate','3iXrZkM','/client/runtime-bff/personal/','appCode','POST','source-session-id','Personal\x20BFF\x20script\x20ID','4742804SUAgum','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','gmtModified','Personal\x20BFF\x20script\x20file\x20is\x20blank.','utf8','personal-bff','list','File\x20is\x20not\x20a\x20regular\x20file:\x20','string','根据本地脚本文件创建个人\x20BFF','test','6448RFvrep','update','6844730fURcKt'];a35_0x200e=function(){return _0x59401f;};return a35_0x200e();}const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x961b3d(0xe9),'type':a35_0x961b3d(0xba),'description':a35_0x961b3d(0xc2)},FUNCTION_NAME_FLAG={'name':a35_0x961b3d(0xe5),'type':a35_0x961b3d(0xba),'required':!![],'description':a35_0x961b3d(0xfd)},DESCRIPTION_FLAG={'name':a35_0x961b3d(0xd6),'type':a35_0x961b3d(0xba),'description':a35_0x961b3d(0xdc)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':a35_0x961b3d(0xba),'description':'Optional\x20source\x20RuntimeAgent\x20session\x20id'};function normalizeFunctionName(_0x54eb48){const _0x249fc9=a35_0x961b3d,_0x507963=String(_0x54eb48||'')[_0x249fc9(0xed)]();if(!_0x507963||!FUNCTION_NAME_PATTERN[_0x249fc9(0xbc)](_0x507963))throw CliErrors['validation'](_0x249fc9(0xcd));return _0x507963;}function readScriptFile(_0x4d56ec){const _0x16474b=a35_0x961b3d;if(!_0x4d56ec)throw CliErrors[_0x16474b(0xde)](_0x16474b(0xda));if(!existsSync(_0x4d56ec))throw CliErrors[_0x16474b(0xde)](_0x16474b(0xee)+_0x4d56ec);if(!statSync(_0x4d56ec)[_0x16474b(0xdf)]())throw CliErrors[_0x16474b(0xde)](_0x16474b(0x103)+_0x4d56ec);const _0x4c6299=readFileSync(_0x4d56ec,_0x16474b(0x100));if(!_0x4c6299[_0x16474b(0xed)]())throw CliErrors[_0x16474b(0xde)](_0x16474b(0xff));return _0x4c6299;}function optionalTrimmed(_0x2b85c5){const _0x6c32d0=String(_0x2b85c5||'')['trim']();return _0x6c32d0||undefined;}function summarizeBff(_0x493a47){const _0x1321a1=a35_0x961b3d;return{'id':_0x493a47['id'],'appCode':_0x493a47[_0x1321a1(0xf8)],'functionName':_0x493a47[_0x1321a1(0xc7)],'description':_0x493a47['description'],'scriptType':_0x493a47['scriptType'],'version':_0x493a47[_0x1321a1(0xd0)],'gmtModified':_0x493a47[_0x1321a1(0xfe)],'updateTime':_0x493a47['updateTime']};}function a35_0x2e79(_0x18c9f2,_0x3a0846){_0x18c9f2=_0x18c9f2-0xba;const _0x200e08=a35_0x200e();let _0x2e79d3=_0x200e08[_0x18c9f2];return _0x2e79d3;}function detailBff(_0x4fb0cd){const _0x2a0314=a35_0x961b3d;return{'id':_0x4fb0cd['id'],'appCode':_0x4fb0cd[_0x2a0314(0xf8)],'functionName':_0x4fb0cd[_0x2a0314(0xc7)],'description':_0x4fb0cd[_0x2a0314(0xd6)],'scriptType':_0x4fb0cd[_0x2a0314(0xf3)],'scriptContent':_0x4fb0cd[_0x2a0314(0xea)]??'','config':_0x4fb0cd[_0x2a0314(0xe2)],'version':_0x4fb0cd[_0x2a0314(0xd0)],'createUserId':_0x4fb0cd['createUserId'],'gmtCreate':_0x4fb0cd[_0x2a0314(0xf5)],'gmtModified':_0x4fb0cd[_0x2a0314(0xfe)],'createTime':_0x4fb0cd[_0x2a0314(0xef)],'updateTime':_0x4fb0cd[_0x2a0314(0xdb)]};}function buildCreateInput(_0x49ff53){const _0x336753=a35_0x961b3d;return{'functionName':normalizeFunctionName(_0x49ff53[_0x336753(0xcc)](_0x336753(0xe5))),...optionalTrimmed(_0x49ff53[_0x336753(0xcc)](_0x336753(0xd6)))?{'description':optionalTrimmed(_0x49ff53[_0x336753(0xcc)](_0x336753(0xd6)))}:{},'scriptContent':readScriptFile(_0x49ff53[_0x336753(0xcc)](_0x336753(0xe9))),...optionalTrimmed(_0x49ff53[_0x336753(0xcc)](_0x336753(0xfa)))?{'sourceSessionId':optionalTrimmed(_0x49ff53[_0x336753(0xcc)](_0x336753(0xfa)))}:{}};}function buildUpdateInput(_0x5b0ba1){const _0xdb986b=a35_0x961b3d,_0x5e8773={};optionalTrimmed(_0x5b0ba1[_0xdb986b(0xcc)]('name'))&&(_0x5e8773[_0xdb986b(0xc7)]=normalizeFunctionName(_0x5b0ba1[_0xdb986b(0xcc)]('name')));_0x5b0ba1[_0xdb986b(0xf0)](_0xdb986b(0xd6))!==undefined&&(_0x5e8773[_0xdb986b(0xd6)]=_0x5b0ba1[_0xdb986b(0xcc)](_0xdb986b(0xd6)));optionalTrimmed(_0x5b0ba1[_0xdb986b(0xcc)](_0xdb986b(0xe9)))&&(_0x5e8773[_0xdb986b(0xea)]=readScriptFile(_0x5b0ba1[_0xdb986b(0xcc)](_0xdb986b(0xe9))));_0x5b0ba1['flag'](_0xdb986b(0xfa))!==undefined&&(_0x5e8773[_0xdb986b(0xd8)]=_0x5b0ba1['str'](_0xdb986b(0xfa)));if(Object[_0xdb986b(0xd7)](_0x5e8773)['length']===0x0)throw CliErrors[_0xdb986b(0xde)](_0xdb986b(0xe0));return _0x5e8773;}function parseExecParams(_0x5064d6){const _0x2e5508=a35_0x961b3d,_0x5041ba=parseJsonParams(_0x5064d6)??{};if(Array['isArray'](_0x5041ba))throw CliErrors[_0x2e5508(0xde)](_0x2e5508(0xc8));return _0x5041ba;}const personalBffList={'service':a35_0x961b3d(0x101),'command':a35_0x961b3d(0x102),'description':a35_0x961b3d(0xc5),'risk':a35_0x961b3d(0xd9),'flags':[VERBOSE_FLAG],async 'execute'(_0x4986c2){const _0x248782=a35_0x961b3d,_0x2cb45e=await listPersonalBffs(_0x4986c2[_0x248782(0xf8)]);return{'ok':!![],'data':{'total':_0x2cb45e[_0x248782(0xec)],'items':_0x4986c2[_0x248782(0xf1)]('verbose')?_0x2cb45e:_0x2cb45e['map'](summarizeBff)}};}},personalBffDetail={'service':a35_0x961b3d(0x101),'command':a35_0x961b3d(0xc1),'description':a35_0x961b3d(0xd5),'risk':'read','flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'}],async 'execute'(_0x1c2dc5){const _0x82dd65=a35_0x961b3d,_0x4f1066=await getPersonalBff(_0x1c2dc5[_0x82dd65(0xe3)]('id'),_0x1c2dc5['appCode']);return{'ok':!![],'data':detailBff(_0x4f1066)};}},personalBffCreate={'service':a35_0x961b3d(0x101),'command':'create','description':a35_0x961b3d(0xbb),'risk':a35_0x961b3d(0xd2),'confirmationDescription':'把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x48555b){const _0x7002a6=a35_0x961b3d,_0x57c809=buildCreateInput(_0x48555b),_0x5497ab=await createPersonalBff(_0x48555b[_0x7002a6(0xf8)],_0x57c809);return{'ok':!![],'data':detailBff(_0x5497ab),'message':'Created\x20personal\x20BFF\x20'+_0x5497ab['id']+(_0x5497ab[_0x7002a6(0xc7)]?'\x20('+_0x5497ab[_0x7002a6(0xc7)]+')':'')};},async 'dryRun'(_0x647b75){const _0x55dd1e=a35_0x961b3d,_0x42d71b=buildCreateInput(_0x647b75);return dryRun(_0x55dd1e(0xf9),_0x55dd1e(0xd3))[_0x55dd1e(0xe7)]({'appCode':_0x647b75[_0x55dd1e(0xf8)],..._0x42d71b})[_0x55dd1e(0xd6)](_0x55dd1e(0xf2)+_0x42d71b['functionName'])[_0x55dd1e(0xf4)]();}},personalBffUpdate={'service':'personal-bff','command':a35_0x961b3d(0xbe),'description':a35_0x961b3d(0xca),'risk':a35_0x961b3d(0xd2),'confirmationDescription':a35_0x961b3d(0xe4),'flags':[{...ID_FLAG,'description':a35_0x961b3d(0xfb)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x52113d){const _0x1e4c63=a35_0x961b3d,_0x2251ae=_0x52113d['num']('id'),_0x366f75=buildUpdateInput(_0x52113d),_0x12dcc7=await updatePersonalBff(_0x2251ae,_0x52113d['appCode'],_0x366f75);return{'ok':!![],'data':detailBff(_0x12dcc7),'message':'Updated\x20personal\x20BFF\x20'+_0x12dcc7['id']+(_0x12dcc7[_0x1e4c63(0xc7)]?'\x20('+_0x12dcc7['functionName']+')':'')};},async 'dryRun'(_0xfe20a5){const _0xf440ae=a35_0x961b3d,_0x25a518=_0xfe20a5[_0xf440ae(0xe3)]('id'),_0x379cb1=buildUpdateInput(_0xfe20a5);return dryRun(_0xf440ae(0xf9),_0xf440ae(0xf7)+_0x25a518+_0xf440ae(0xe8))[_0xf440ae(0xe7)]({'appCode':_0xfe20a5['appCode'],..._0x379cb1})[_0xf440ae(0xd6)](_0xf440ae(0xc3)+_0x25a518)[_0xf440ae(0xf4)]();}},personalBffExec={'service':a35_0x961b3d(0x101),'command':'exec','description':a35_0x961b3d(0xc9),'risk':a35_0x961b3d(0xd2),'confirmationDescription':a35_0x961b3d(0xdd),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution'}],async 'validate'(_0x5e522c){const _0x3c9331=a35_0x961b3d;parseExecParams(_0x5e522c[_0x3c9331(0xcc)](_0x3c9331(0xd4)));},async 'execute'(_0x5c2dbb){const _0x1f244e=a35_0x961b3d,_0x5b4d51=_0x5c2dbb[_0x1f244e(0xe3)]('id'),_0x309537=parseExecParams(_0x5c2dbb[_0x1f244e(0xcc)](_0x1f244e(0xd4))),_0xa949e4=await executePersonalBff(_0x5b4d51,_0x5c2dbb[_0x1f244e(0xf8)],_0x309537);return{'ok':!![],'data':{'result':_0xa949e4},'message':_0x1f244e(0xc0)+_0x5b4d51};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x5f4bb2=a35_0x1d34;(function(_0x5571a7,_0x3bdd62){const _0x2f55b3=a35_0x1d34,_0xc1f284=_0x5571a7();while(!![]){try{const _0x32b2e4=-parseInt(_0x2f55b3(0x173))/0x1+-parseInt(_0x2f55b3(0x169))/0x2+-parseInt(_0x2f55b3(0x17b))/0x3+-parseInt(_0x2f55b3(0x16b))/0x4*(-parseInt(_0x2f55b3(0x167))/0x5)+parseInt(_0x2f55b3(0x18d))/0x6+-parseInt(_0x2f55b3(0x17d))/0x7+parseInt(_0x2f55b3(0x191))/0x8;if(_0x32b2e4===_0x3bdd62)break;else _0xc1f284['push'](_0xc1f284['shift']());}catch(_0x4046aa){_0xc1f284['push'](_0xc1f284['shift']());}}}(a35_0x2dec,0x41fa4));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a35_0x1d34(_0x507cbd,_0x1513d9){_0x507cbd=_0x507cbd-0x15d;const _0x2dec9a=a35_0x2dec();let _0x1d34d8=_0x2dec9a[_0x507cbd];return _0x1d34d8;}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_0x5f4bb2(0x185),'type':a35_0x5f4bb2(0x168),'description':a35_0x5f4bb2(0x199)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x5f4bb2(0x168),'required':!![],'description':a35_0x5f4bb2(0x16d)},DESCRIPTION_FLAG={'name':a35_0x5f4bb2(0x195),'type':a35_0x5f4bb2(0x168),'description':a35_0x5f4bb2(0x17e)},SOURCE_SESSION_FLAG={'name':a35_0x5f4bb2(0x175),'type':'string','description':a35_0x5f4bb2(0x180)};function a35_0x2dec(){const _0x2d97fc=['length','body','validation','config','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','Preview:\x20update\x20personal\x20BFF\x20','/client/runtime-bff/personal/create','map','build','5QfEoFz','string','911540ropjxt','createTime','987732GCAmTm','File\x20path\x20is\x20required.','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','functionName','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','params','POST','trim','148604avmRyw','Created\x20personal\x20BFF\x20','source-session-id','Personal\x20BFF\x20script\x20file\x20is\x20blank.','appCode','verbose','isFile','updateTime','455232bukCuc','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','3699682AAnIHj','Personal\x20BFF\x20description','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Optional\x20source\x20RuntimeAgent\x20session\x20id','sourceSessionId','create','detail','isArray','file','test','flag','write','list','str','num','keys','1129524NMBDeW','exec','根据本地脚本文件创建个人\x20BFF','update','8957608ozNLQL','--params\x20must\x20be\x20a\x20JSON\x20object.','gmtModified','Updated\x20personal\x20BFF\x20','description','scriptType','personal-bff','createUserId','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','scriptContent','File\x20not\x20found:\x20','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','utf8','bool','Personal\x20BFF\x20script\x20ID','version','根据\x20ID\x20更新个人\x20BFF','name'];a35_0x2dec=function(){return _0x2d97fc;};return a35_0x2dec();}function normalizeFunctionName(_0x36c9ec){const _0x120a1a=a35_0x5f4bb2,_0x244e93=String(_0x36c9ec||'')[_0x120a1a(0x172)]();if(!_0x244e93||!FUNCTION_NAME_PATTERN[_0x120a1a(0x186)](_0x244e93))throw CliErrors[_0x120a1a(0x160)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x244e93;}function readScriptFile(_0x2aed19){const _0x524de7=a35_0x5f4bb2;if(!_0x2aed19)throw CliErrors[_0x524de7(0x160)](_0x524de7(0x16c));if(!existsSync(_0x2aed19))throw CliErrors[_0x524de7(0x160)](_0x524de7(0x19b)+_0x2aed19);if(!statSync(_0x2aed19)[_0x524de7(0x179)]())throw CliErrors[_0x524de7(0x160)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x2aed19);const _0x13d574=readFileSync(_0x2aed19,_0x524de7(0x19d));if(!_0x13d574[_0x524de7(0x172)]())throw CliErrors[_0x524de7(0x160)](_0x524de7(0x176));return _0x13d574;}function optionalTrimmed(_0x5d6a32){const _0x2db657=String(_0x5d6a32||'')['trim']();return _0x2db657||undefined;}function summarizeBff(_0x65b549){const _0x38f859=a35_0x5f4bb2;return{'id':_0x65b549['id'],'appCode':_0x65b549[_0x38f859(0x177)],'functionName':_0x65b549['functionName'],'description':_0x65b549[_0x38f859(0x195)],'scriptType':_0x65b549[_0x38f859(0x196)],'version':_0x65b549[_0x38f859(0x1a0)],'gmtModified':_0x65b549[_0x38f859(0x193)],'updateTime':_0x65b549[_0x38f859(0x17a)]};}function detailBff(_0x2252af){const _0x4b82b6=a35_0x5f4bb2;return{'id':_0x2252af['id'],'appCode':_0x2252af['appCode'],'functionName':_0x2252af[_0x4b82b6(0x16e)],'description':_0x2252af[_0x4b82b6(0x195)],'scriptType':_0x2252af['scriptType'],'scriptContent':_0x2252af[_0x4b82b6(0x19a)]??'','config':_0x2252af[_0x4b82b6(0x161)],'version':_0x2252af[_0x4b82b6(0x1a0)],'createUserId':_0x2252af[_0x4b82b6(0x198)],'gmtCreate':_0x2252af['gmtCreate'],'gmtModified':_0x2252af[_0x4b82b6(0x193)],'createTime':_0x2252af[_0x4b82b6(0x16a)],'updateTime':_0x2252af['updateTime']};}function buildCreateInput(_0x5a8905){const _0x4aec53=a35_0x5f4bb2;return{'functionName':normalizeFunctionName(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x15d))),...optionalTrimmed(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x195)))?{'description':optionalTrimmed(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x195)))}:{},'scriptContent':readScriptFile(_0x5a8905[_0x4aec53(0x18a)](_0x4aec53(0x185))),...optionalTrimmed(_0x5a8905['str'](_0x4aec53(0x175)))?{'sourceSessionId':optionalTrimmed(_0x5a8905[_0x4aec53(0x18a)]('source-session-id'))}:{}};}function buildUpdateInput(_0x5afd4c){const _0x16a3cb=a35_0x5f4bb2,_0x4881d0={};optionalTrimmed(_0x5afd4c[_0x16a3cb(0x18a)]('name'))&&(_0x4881d0[_0x16a3cb(0x16e)]=normalizeFunctionName(_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x15d))));_0x5afd4c[_0x16a3cb(0x187)](_0x16a3cb(0x195))!==undefined&&(_0x4881d0[_0x16a3cb(0x195)]=_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x195)));optionalTrimmed(_0x5afd4c['str']('file'))&&(_0x4881d0['scriptContent']=readScriptFile(_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x185))));_0x5afd4c[_0x16a3cb(0x187)](_0x16a3cb(0x175))!==undefined&&(_0x4881d0[_0x16a3cb(0x181)]=_0x5afd4c[_0x16a3cb(0x18a)](_0x16a3cb(0x175)));if(Object[_0x16a3cb(0x18c)](_0x4881d0)[_0x16a3cb(0x15e)]===0x0)throw CliErrors['validation'](_0x16a3cb(0x19c));return _0x4881d0;}function parseExecParams(_0x34a27e){const _0xd77327=a35_0x5f4bb2,_0x351634=parseJsonParams(_0x34a27e)??{};if(Array[_0xd77327(0x184)](_0x351634))throw CliErrors['validation'](_0xd77327(0x192));return _0x351634;}const personalBffList={'service':'personal-bff','command':a35_0x5f4bb2(0x189),'description':a35_0x5f4bb2(0x162),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x5dcfb9){const _0x2d52fe=a35_0x5f4bb2,_0x459080=await listPersonalBffs(_0x5dcfb9[_0x2d52fe(0x177)]);return{'ok':!![],'data':{'total':_0x459080['length'],'items':_0x5dcfb9[_0x2d52fe(0x19e)](_0x2d52fe(0x178))?_0x459080:_0x459080[_0x2d52fe(0x165)](summarizeBff)}};}},personalBffDetail={'service':'personal-bff','command':a35_0x5f4bb2(0x183),'description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a35_0x5f4bb2(0x19f)}],async 'execute'(_0x1837e3){const _0x50e235=a35_0x5f4bb2,_0x11d2ba=await getPersonalBff(_0x1837e3[_0x50e235(0x18b)]('id'),_0x1837e3[_0x50e235(0x177)]);return{'ok':!![],'data':detailBff(_0x11d2ba)};}},personalBffCreate={'service':a35_0x5f4bb2(0x197),'command':a35_0x5f4bb2(0x182),'description':a35_0x5f4bb2(0x18f),'risk':a35_0x5f4bb2(0x188),'confirmationDescription':a35_0x5f4bb2(0x17c),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x17d4b0){const _0x24be02=a35_0x5f4bb2,_0x3a7769=buildCreateInput(_0x17d4b0),_0x338075=await createPersonalBff(_0x17d4b0[_0x24be02(0x177)],_0x3a7769);return{'ok':!![],'data':detailBff(_0x338075),'message':_0x24be02(0x174)+_0x338075['id']+(_0x338075['functionName']?'\x20('+_0x338075['functionName']+')':'')};},async 'dryRun'(_0x2b31f0){const _0x57d61c=a35_0x5f4bb2,_0x12dede=buildCreateInput(_0x2b31f0);return dryRun(_0x57d61c(0x171),_0x57d61c(0x164))[_0x57d61c(0x15f)]({'appCode':_0x2b31f0[_0x57d61c(0x177)],..._0x12dede})['description']('Preview:\x20create\x20personal\x20BFF\x20'+_0x12dede['functionName'])[_0x57d61c(0x166)]();}},personalBffUpdate={'service':a35_0x5f4bb2(0x197),'command':a35_0x5f4bb2(0x190),'description':a35_0x5f4bb2(0x1a1),'risk':a35_0x5f4bb2(0x188),'confirmationDescription':'更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':a35_0x5f4bb2(0x19f)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x1e8b63){const _0x4a2b90=a35_0x5f4bb2,_0x3f4f4e=_0x1e8b63[_0x4a2b90(0x18b)]('id'),_0x53fa15=buildUpdateInput(_0x1e8b63),_0x2f8d4f=await updatePersonalBff(_0x3f4f4e,_0x1e8b63['appCode'],_0x53fa15);return{'ok':!![],'data':detailBff(_0x2f8d4f),'message':_0x4a2b90(0x194)+_0x2f8d4f['id']+(_0x2f8d4f[_0x4a2b90(0x16e)]?'\x20('+_0x2f8d4f[_0x4a2b90(0x16e)]+')':'')};},async 'dryRun'(_0x2b04e4){const _0xb56bc5=a35_0x5f4bb2,_0x310220=_0x2b04e4['num']('id'),_0x3b6484=buildUpdateInput(_0x2b04e4);return dryRun('POST','/client/runtime-bff/personal/'+_0x310220+'/update')[_0xb56bc5(0x15f)]({'appCode':_0x2b04e4[_0xb56bc5(0x177)],..._0x3b6484})[_0xb56bc5(0x195)](_0xb56bc5(0x163)+_0x310220)['build']();}},personalBffExec={'service':a35_0x5f4bb2(0x197),'command':a35_0x5f4bb2(0x18e),'description':'根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','risk':'write','confirmationDescription':a35_0x5f4bb2(0x16f),'flags':[{...ID_FLAG,'description':a35_0x5f4bb2(0x19f)},{...PARAMS_FLAG,'description':a35_0x5f4bb2(0x17f)}],async 'validate'(_0x5812ad){const _0xf3b3e8=a35_0x5f4bb2;parseExecParams(_0x5812ad['str'](_0xf3b3e8(0x170)));},async 'execute'(_0x351ed3){const _0x152d8d=a35_0x5f4bb2,_0x34e6b2=_0x351ed3[_0x152d8d(0x18b)]('id'),_0x320ff4=parseExecParams(_0x351ed3['str'](_0x152d8d(0x170))),_0x4e4a82=await executePersonalBff(_0x34e6b2,_0x351ed3[_0x152d8d(0x177)],_0x320ff4);return{'ok':!![],'data':{'result':_0x4e4a82},'message':'Executed\x20personal\x20BFF\x20'+_0x34e6b2};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x991cfa=a36_0x3a55;(function(_0x4c9817,_0xb5e517){const _0x324216=a36_0x3a55,_0x10808e=_0x4c9817();while(!![]){try{const _0x44ef29=parseInt(_0x324216(0x1dc))/0x1+parseInt(_0x324216(0x1ce))/0x2+parseInt(_0x324216(0x1c3))/0x3*(-parseInt(_0x324216(0x1c4))/0x4)+parseInt(_0x324216(0x1c2))/0x5*(parseInt(_0x324216(0x1d2))/0x6)+-parseInt(_0x324216(0x1c9))/0x7*(-parseInt(_0x324216(0x1da))/0x8)+-parseInt(_0x324216(0x1d6))/0x9*(-parseInt(_0x324216(0x1b2))/0xa)+-parseInt(_0x324216(0x1dd))/0xb;if(_0x44ef29===_0xb5e517)break;else _0x10808e['push'](_0x10808e['shift']());}catch(_0x71f503){_0x10808e['push'](_0x10808e['shift']());}}}(a36_0x347c,0xafeb6));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_0x347c(){const _0x3bcc41=['Authentication','description','8VQvXDV','list','1176327HEczcO','26888741yNgESw','get','Skills','set','clear','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','app','command','1052630ZWTtLA','app\x20use','run','defaultCommand','Service\x20Tree','init','Runtime\x20App\x20Config','Configuration','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','app\x20init','Personal\x20BFF','Datasets','write','File','Self\x20Update','CLI\x20Built-in\x20Skill','48535CwmAKW','1239QnrfcK','12164uXCCAG','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','Schema','Knowledge\x20Base','push','2709483MEccba','service','Artifacts','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','2556642cFGwvu','isSingleCommand','Diagnostics','Instant\x20API','846YxtoTe','read','risk','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','18PylnqT','install'];a36_0x347c=function(){return _0x3bcc41;};return a36_0x347c();}import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a36_0x3a55(_0x45a9a6,_0x5ab4b9){_0x45a9a6=_0x45a9a6-0x1b1;const _0x347c79=a36_0x347c();let _0x3a55a7=_0x347c79[_0x45a9a6];return _0x3a55a7;}function registerDefinitions(_0x2d9c36){const _0x8e7699=a36_0x3a55;for(const _0x184f19 of _0x2d9c36){definitions['set'](_0x184f19[_0x8e7699(0x1ca)]+':'+_0x184f19[_0x8e7699(0x1b1)],_0x184f19);let _0x2f81e8=serviceGroups[_0x8e7699(0x1de)](_0x184f19[_0x8e7699(0x1ca)]);!_0x2f81e8&&(_0x2f81e8=[],serviceGroups[_0x8e7699(0x1e0)](_0x184f19[_0x8e7699(0x1ca)],_0x2f81e8)),_0x2f81e8[_0x8e7699(0x1c8)](_0x184f19);}}function registerService(_0x5038db,_0x377419,_0xd97dcb){const _0x4e1936=a36_0x3a55;registerDefinitions(_0x377419);const _0x218dfe=_0x1b5559=>_0x1b5559===_0x4e1936(0x1d3)?'':_0x1b5559===_0x4e1936(0x1be)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x10bcbb={'service':_0x377419[0x0][_0x4e1936(0x1ca)],'label':_0x5038db,'commands':_0x377419['map'](_0x12a866=>({'command':_0x12a866['command'],'description':_0x12a866[_0x4e1936(0x1d9)],'tag':_0x218dfe(_0x12a866[_0x4e1936(0x1d4)])})),'defaultCommand':_0xd97dcb?.[_0x4e1936(0x1b5)]??(_0xd97dcb?.['isSingleCommand']?_0x377419[0x0]['command']:undefined),'isSingleCommand':_0xd97dcb?.[_0x4e1936(0x1cf)]};serviceRegistry[_0x4e1936(0x1c8)](_0x10bcbb),serviceByName[_0x4e1936(0x1e0)](_0x10bcbb[_0x4e1936(0x1ca)],_0x10bcbb);}registerService(a36_0x991cfa(0x1d8),authDefinitions,{'defaultCommand':'login'}),registerService('App\x20Management',appDefinitions,{'defaultCommand':'list'}),registerService('Workspace',workspaceDefinitions),registerService(a36_0x991cfa(0x1b8),appConfigDefinitions),registerService(a36_0x991cfa(0x1b9),configDefinitions,{'defaultCommand':'list'}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x991cfa(0x1bd),datasetDefinitions),registerService(a36_0x991cfa(0x1d1),dataDefinitions),registerService('SQL\x20Queries',sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a36_0x991cfa(0x1bc),personalBffDefinitions),registerService(a36_0x991cfa(0x1cb),artifactDefinitions),registerService(a36_0x991cfa(0x1bf),fileDefinitions),registerService('OCR',ocrDefinitions),registerService(a36_0x991cfa(0x1c7),kbDefinitions),registerService('Agent\x20Schedules',scheduleDefinitions,{'defaultCommand':a36_0x991cfa(0x1db)}),registerService(a36_0x991cfa(0x1b6),serviceDefinitions,{'defaultCommand':'list'}),registerService(a36_0x991cfa(0x1df),skillDefinitions,{'defaultCommand':a36_0x991cfa(0x1d7)}),registerService(a36_0x991cfa(0x1c1),cliSkillDefinitions,{'defaultCommand':a36_0x991cfa(0x1d7)}),registerService(a36_0x991cfa(0x1c0),[updateDefinition],{'defaultCommand':a36_0x991cfa(0x1b4),'isSingleCommand':!![]}),registerService(a36_0x991cfa(0x1d0),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x991cfa(0x1c6),[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0xf72085,_0x3688dc){const _0x28b7a3=a36_0x991cfa;return definitions[_0x28b7a3(0x1de)](_0xf72085+':'+_0x3688dc);}export function resolveRemovedCommand(_0xe19d14,_0x5314f6){const _0x577d1c=a36_0x991cfa;if(_0xe19d14==='app'&&_0x5314f6===_0x577d1c(0x1b7))return{'command':_0x577d1c(0x1bb),'message':_0x577d1c(0x1ba),'hint':_0x577d1c(0x1c5)};if(_0xe19d14===_0x577d1c(0x1e3)&&_0x5314f6==='use')return{'command':_0x577d1c(0x1b3),'message':_0x577d1c(0x1cc),'hint':_0x577d1c(0x1d5)};if(_0xe19d14==='logs'&&_0x5314f6===_0x577d1c(0x1e1))return{'command':'logs\x20clear','message':_0x577d1c(0x1e2),'hint':_0x577d1c(0x1cd)};return undefined;}export function isKnownService(_0x45d7b5){return serviceByName['has'](_0x45d7b5);}export function getServiceEntry(_0x11c891){const _0x50afa=a36_0x991cfa;return serviceByName[_0x50afa(0x1de)](_0x11c891);}export function getAllDefinitions(){return Array['from'](definitions['values']());}
1
+ const a36_0x1637a4=a36_0x4284;(function(_0x2a2592,_0x39dcba){const _0x5f34e1=a36_0x4284,_0x4586bb=_0x2a2592();while(!![]){try{const _0x27a92b=parseInt(_0x5f34e1(0x1c2))/0x1+parseInt(_0x5f34e1(0x1b5))/0x2*(parseInt(_0x5f34e1(0x1c1))/0x3)+-parseInt(_0x5f34e1(0x198))/0x4*(parseInt(_0x5f34e1(0x1c5))/0x5)+parseInt(_0x5f34e1(0x1c9))/0x6+parseInt(_0x5f34e1(0x195))/0x7*(-parseInt(_0x5f34e1(0x199))/0x8)+-parseInt(_0x5f34e1(0x1c7))/0x9+parseInt(_0x5f34e1(0x1a0))/0xa*(parseInt(_0x5f34e1(0x196))/0xb);if(_0x27a92b===_0x39dcba)break;else _0x4586bb['push'](_0x4586bb['shift']());}catch(_0x50cc07){_0x4586bb['push'](_0x4586bb['shift']());}}}(a36_0xdc3f,0xe3838));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';function a36_0xdc3f(){const _0x5187d2=['\x20\x20[high-risk-write]','CLI\x20Built-in\x20Skill','`lovrabet\x20logs\x20clear`\x20has\x20been\x20removed.','values','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','SQL\x20Queries','has','logs','114107vQUnMq','208131OfFUYB','\x20\x20[write]','196ybpAkZ','416zClRlN','Instant\x20API','service','description','File','Schema','app','600KIsVTx','list','app\x20use','Configuration','install','Personal\x20BFF','Diagnostics','login','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','show','Use\x20`lovrabet\x20logs\x20show`\x20to\x20view\x20command\x20history.','from','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Datasets','command','Artifacts','App\x20Management','Knowledge\x20Base','run','Logs','2086PBEbAE','app\x20init','map','read','Authentication','write','Self\x20Update','Workspace','Agent\x20Schedules','get','logs\x20clear','OCR','1227ZWpeCt','870729PvYNGy','defaultCommand','isSingleCommand','120525vvhDHU','Skills','3198321cCviYk','set','5300916dSyLsy','risk','init'];a36_0xdc3f=function(){return _0x5187d2;};return a36_0xdc3f();}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';function a36_0x4284(_0x530460,_0x27a223){_0x530460=_0x530460-0x195;const _0xdc3fc3=a36_0xdc3f();let _0x428445=_0xdc3fc3[_0x530460];return _0x428445;}import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0xcc3c5c){const _0x275c93=a36_0x4284;for(const _0x2c6268 of _0xcc3c5c){definitions[_0x275c93(0x1c8)](_0x2c6268['service']+':'+_0x2c6268[_0x275c93(0x1af)],_0x2c6268);let _0x260dd7=serviceGroups[_0x275c93(0x1be)](_0x2c6268[_0x275c93(0x19b)]);!_0x260dd7&&(_0x260dd7=[],serviceGroups['set'](_0x2c6268[_0x275c93(0x19b)],_0x260dd7)),_0x260dd7['push'](_0x2c6268);}}function registerService(_0x407b5d,_0x54e7a2,_0x3e4ca7){const _0x211ace=a36_0x4284;registerDefinitions(_0x54e7a2);const _0x16ff9c=_0x5d8318=>_0x5d8318===_0x211ace(0x1b8)?'':_0x5d8318===_0x211ace(0x1ba)?_0x211ace(0x197):_0x211ace(0x1cc),_0x5e9cea={'service':_0x54e7a2[0x0][_0x211ace(0x19b)],'label':_0x407b5d,'commands':_0x54e7a2[_0x211ace(0x1b7)](_0x28ee5e=>({'command':_0x28ee5e[_0x211ace(0x1af)],'description':_0x28ee5e[_0x211ace(0x19c)],'tag':_0x16ff9c(_0x28ee5e[_0x211ace(0x1ca)])})),'defaultCommand':_0x3e4ca7?.[_0x211ace(0x1c3)]??(_0x3e4ca7?.[_0x211ace(0x1c4)]?_0x54e7a2[0x0][_0x211ace(0x1af)]:undefined),'isSingleCommand':_0x3e4ca7?.['isSingleCommand']};serviceRegistry['push'](_0x5e9cea),serviceByName[_0x211ace(0x1c8)](_0x5e9cea[_0x211ace(0x19b)],_0x5e9cea);}registerService(a36_0x1637a4(0x1b9),authDefinitions,{'defaultCommand':a36_0x1637a4(0x1a7)}),registerService(a36_0x1637a4(0x1b1),appDefinitions,{'defaultCommand':a36_0x1637a4(0x1a1)}),registerService(a36_0x1637a4(0x1bc),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService(a36_0x1637a4(0x1a3),configDefinitions,{'defaultCommand':'list'}),registerService('API\x20Documentation',apiDocDefinitions),registerService(a36_0x1637a4(0x1ae),datasetDefinitions),registerService(a36_0x1637a4(0x19a),dataDefinitions),registerService(a36_0x1637a4(0x1d1),sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a36_0x1637a4(0x1a5),personalBffDefinitions),registerService(a36_0x1637a4(0x1b0),artifactDefinitions),registerService(a36_0x1637a4(0x19d),fileDefinitions),registerService(a36_0x1637a4(0x1c0),ocrDefinitions),registerService(a36_0x1637a4(0x1b2),kbDefinitions),registerService(a36_0x1637a4(0x1bd),scheduleDefinitions,{'defaultCommand':a36_0x1637a4(0x1a1)}),registerService('Service\x20Tree',serviceDefinitions,{'defaultCommand':'list'}),registerService(a36_0x1637a4(0x1c6),skillDefinitions,{'defaultCommand':a36_0x1637a4(0x1a4)}),registerService(a36_0x1637a4(0x1cd),cliSkillDefinitions,{'defaultCommand':a36_0x1637a4(0x1a4)}),registerService(a36_0x1637a4(0x1bb),[updateDefinition],{'defaultCommand':a36_0x1637a4(0x1b3),'isSingleCommand':!![]}),registerService(a36_0x1637a4(0x1a6),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x1637a4(0x19e),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x1637a4(0x1b4),logsDefinitions,{'defaultCommand':a36_0x1637a4(0x1aa)});export function findDefinition(_0x14b1e8,_0x467c85){const _0xd6a130=a36_0x1637a4;return definitions[_0xd6a130(0x1be)](_0x14b1e8+':'+_0x467c85);}export function resolveRemovedCommand(_0x2ac92c,_0x2300b1){const _0x33ebac=a36_0x1637a4;if(_0x2ac92c===_0x33ebac(0x19f)&&_0x2300b1===_0x33ebac(0x1cb))return{'command':_0x33ebac(0x1b6),'message':_0x33ebac(0x1d0),'hint':_0x33ebac(0x1a8)};if(_0x2ac92c===_0x33ebac(0x19f)&&_0x2300b1==='use')return{'command':_0x33ebac(0x1a2),'message':_0x33ebac(0x1a9),'hint':_0x33ebac(0x1ad)};if(_0x2ac92c===_0x33ebac(0x1d3)&&_0x2300b1==='clear')return{'command':_0x33ebac(0x1bf),'message':_0x33ebac(0x1ce),'hint':_0x33ebac(0x1ab)};return undefined;}export function isKnownService(_0x397d32){const _0x3c073b=a36_0x1637a4;return serviceByName[_0x3c073b(0x1d2)](_0x397d32);}export function getServiceEntry(_0x572081){const _0xf36145=a36_0x1637a4;return serviceByName[_0xf36145(0x1be)](_0x572081);}export function getAllDefinitions(){const _0xb02779=a36_0x1637a4;return Array[_0xb02779(0x1ac)](definitions[_0xb02779(0x1cf)]());}
@@ -1 +1 @@
1
- const a37_0x3b8cb0=a37_0xa958;(function(_0xbccc19,_0x39dc1e){const _0x1dde94=a37_0xa958,_0x4e9195=_0xbccc19();while(!![]){try{const _0x1baf50=parseInt(_0x1dde94(0x132))/0x1*(parseInt(_0x1dde94(0xf3))/0x2)+-parseInt(_0x1dde94(0x138))/0x3*(-parseInt(_0x1dde94(0xfc))/0x4)+-parseInt(_0x1dde94(0xff))/0x5*(-parseInt(_0x1dde94(0x129))/0x6)+parseInt(_0x1dde94(0xf7))/0x7*(-parseInt(_0x1dde94(0xf5))/0x8)+parseInt(_0x1dde94(0x10e))/0x9+-parseInt(_0x1dde94(0x100))/0xa+-parseInt(_0x1dde94(0x10d))/0xb;if(_0x1baf50===_0x39dc1e)break;else _0x4e9195['push'](_0x4e9195['shift']());}catch(_0x35e3ab){_0x4e9195['push'](_0x4e9195['shift']());}}}(a37_0x4836,0xbf202));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SCHEDULE_ID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,KIND_FLAG={'name':'kind','type':a37_0x3b8cb0(0xf1),'required':!![],'enum':[a37_0x3b8cb0(0x126),a37_0x3b8cb0(0x11c)],'description':a37_0x3b8cb0(0x10b)},CRON_FLAG={'name':'cron','type':a37_0x3b8cb0(0xf1),'description':'Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules'},SCHEDULED_AT_FLAG={'name':a37_0x3b8cb0(0x12d),'type':a37_0x3b8cb0(0xf1),'description':a37_0x3b8cb0(0x12b)},TITLE_FLAG={'name':a37_0x3b8cb0(0x122),'type':'string','required':!![],'description':a37_0x3b8cb0(0x11f)},PROMPT_FLAG={'name':a37_0x3b8cb0(0x121),'type':'string','required':!![],'description':a37_0x3b8cb0(0xf9)},CHANNEL_FLAG={'name':a37_0x3b8cb0(0x124),'type':a37_0x3b8cb0(0xf1),'enum':[a37_0x3b8cb0(0x11b),a37_0x3b8cb0(0x135)],'default':'premium','description':a37_0x3b8cb0(0x102)},SCHEDULE_ID_FLAG={'name':a37_0x3b8cb0(0x106),'type':a37_0x3b8cb0(0xf1),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x3b8cb0(0x113)}},LIMIT_FLAG={'name':a37_0x3b8cb0(0x107),'type':a37_0x3b8cb0(0x11a),'default':0x14,'description':a37_0x3b8cb0(0x104)},CURSOR_FLAG={'name':a37_0x3b8cb0(0x127),'type':'string','description':a37_0x3b8cb0(0x108)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x24921c){const _0x318758=a37_0x3b8cb0,_0x5a844c=_0x24921c[_0x318758(0x10a)](_0x318758(0x12a)),_0x510d6d=_0x24921c['str'](_0x318758(0x122))[_0x318758(0x110)](),_0x24abbc=_0x24921c['str']('prompt')[_0x318758(0x110)](),_0x39fca4=_0x24921c['str'](_0x318758(0x124)),_0x3cf8a2=_0x24921c[_0x318758(0x10a)](_0x318758(0xf4)),_0x4f7714=_0x24921c['str'](_0x318758(0x12d));if(!_0x510d6d)throw CliErrors[_0x318758(0xf2)](_0x318758(0xf6));if(!_0x24abbc)throw CliErrors[_0x318758(0xf2)]('--prompt\x20must\x20not\x20be\x20blank.');if(_0x5a844c===_0x318758(0x126)){if(!_0x3cf8a2||_0x4f7714)throw CliErrors[_0x318758(0xf2)](_0x318758(0xfa));return{'kind':_0x5a844c,'timezone':_0x318758(0xf8),'cron':_0x3cf8a2,'title':_0x510d6d,'prompt':_0x24abbc,'channel':_0x39fca4};}if(_0x5a844c===_0x318758(0x11c)){if(!_0x4f7714||_0x3cf8a2)throw CliErrors[_0x318758(0xf2)]('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0x5a844c,'timezone':_0x318758(0xf8),'scheduledAt':_0x4f7714,'title':_0x510d6d,'prompt':_0x24abbc,'channel':_0x39fca4};}throw CliErrors[_0x318758(0xf2)]('--kind\x20must\x20be\x20CRON\x20or\x20ONCE.');}function a37_0xa958(_0x3cbdd2,_0x59761c){_0x3cbdd2=_0x3cbdd2-0xee;const _0x4836ff=a37_0x4836();let _0xa95814=_0x4836ff[_0x3cbdd2];return _0xa95814;}function scheduleCollectionPath(_0x1584c7){const _0xa99a35=a37_0x3b8cb0;return'/api/harness/apps/'+encodeURIComponent(_0x1584c7)+_0xa99a35(0xfe);}function scheduleItemPath(_0x50b186,_0x213d8d){return scheduleCollectionPath(_0x50b186)+'/'+encodeURIComponent(_0x213d8d);}function a37_0x4836(){const _0x3c2116=['schedule','/schedules','5087265bPCDVA','8250130ijzSKt','Queued\x20Task\x20','Task\x20channel:\x20auto\x20or\x20premium','description','Page\x20size\x20from\x201\x20to\x20100','Deleted\x20schedule\x20','schedule-id','limit','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','\x20from\x20schedule\x20','str','Schedule\x20kind:\x20CRON\x20or\x20ONCE','high-risk-write','5912269XdJiCD','13158090CbyshF','创建周期性或单次执行的\x20Agent\x20定时任务','trim','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','scheduleId','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','Created\x20','/run','validate','POST','isSafeInteger','number','auto','ONCE','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','build','Schedule\x20title','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','prompt','title','body','channel','\x20immediately','CRON','cursor','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','6JCOkIS','kind','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','scheduled-at','length','Schedule\x20input\x20is\x20valid','delete','appCode','1WXQMoR','run','num','premium','list','Preview:\x20delete\x20schedule\x20','909uAyVMa','Preview:\x20create\x20an\x20Agent\x20schedule','read','detail','DELETE','string','validation','198754tbiTXb','cron','2101456UlrLYl','--title\x20must\x20not\x20be\x20blank.','35vhGtaL','UTC','Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','11616MYBbCz'];a37_0x4836=function(){return _0x3c2116;};return a37_0x4836();}const scheduleValidate={'service':a37_0x3b8cb0(0xfd),'command':a37_0x3b8cb0(0x117),'description':a37_0x3b8cb0(0xfb),'risk':a37_0x3b8cb0(0xee),'flags':INPUT_FLAGS,async 'validate'(_0x13fc2c){readScheduleInput(_0x13fc2c);},async 'execute'(_0x4fff40){const _0x1f64ea=a37_0x3b8cb0,_0xac50d6=readScheduleInput(_0x4fff40),_0x29ed98=await validateRuntimeSchedule(_0x4fff40[_0x1f64ea(0x131)],_0xac50d6);return{'ok':!![],'data':_0x29ed98,'message':_0x1f64ea(0x12f)};}},scheduleCreate={'service':'schedule','command':'create','description':a37_0x3b8cb0(0x10f),'risk':'high-risk-write','confirmationDescription':a37_0x3b8cb0(0x111),'flags':INPUT_FLAGS,async 'validate'(_0x232ba5){readScheduleInput(_0x232ba5);},async 'execute'(_0x5011ef){const _0x3427ac=a37_0x3b8cb0,_0xe9498b=readScheduleInput(_0x5011ef),_0x1a947f=await validateRuntimeSchedule(_0x5011ef['appCode'],_0xe9498b),_0x38ed61=await createRuntimeSchedule(_0x5011ef[_0x3427ac(0x131)],_0x1a947f);return{'ok':!![],'data':_0x38ed61,'message':_0x3427ac(0x115)+_0x38ed61[_0x3427ac(0x12a)]+'\x20schedule\x20'+_0x38ed61[_0x3427ac(0x112)]};},async 'dryRun'(_0x44d1da){const _0xfa55dc=a37_0x3b8cb0,_0x46492e=readScheduleInput(_0x44d1da);return dryRun(_0xfa55dc(0x118),scheduleCollectionPath(_0x44d1da[_0xfa55dc(0x131)]))[_0xfa55dc(0x123)](_0x46492e)['description'](_0xfa55dc(0x139))[_0xfa55dc(0x11e)]();}},scheduleList={'service':a37_0x3b8cb0(0xfd),'command':a37_0x3b8cb0(0x136),'description':a37_0x3b8cb0(0x12c),'risk':a37_0x3b8cb0(0xee),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x1d3704){const _0x55b9e6=a37_0x3b8cb0,_0x12ae58=_0x1d3704[_0x55b9e6(0x134)]('limit');if(!Number[_0x55b9e6(0x119)](_0x12ae58)||_0x12ae58<0x1||_0x12ae58>0x64)throw CliErrors[_0x55b9e6(0xf2)](_0x55b9e6(0x120));const _0x2f6838=_0x1d3704[_0x55b9e6(0x10a)]('cursor');if(_0x2f6838&&(_0x2f6838[_0x55b9e6(0x12e)]>0x400||_0x2f6838['trim']()!==_0x2f6838))throw CliErrors[_0x55b9e6(0xf2)](_0x55b9e6(0x11d));},async 'execute'(_0x2b70c4){const _0x109070=a37_0x3b8cb0,_0x2465a7=_0x2b70c4[_0x109070(0x10a)](_0x109070(0x127)),_0x40c903=await listRuntimeSchedules(_0x2b70c4[_0x109070(0x131)],{'kind':_0x2b70c4[_0x109070(0x10a)](_0x109070(0x12a)),'limit':_0x2b70c4[_0x109070(0x134)](_0x109070(0x107)),..._0x2465a7?{'cursor':_0x2465a7}:{}});return{'ok':!![],'data':_0x40c903};}},scheduleDetail={'service':a37_0x3b8cb0(0xfd),'command':a37_0x3b8cb0(0xef),'description':'Show\x20one\x20schedule\x20by\x20schedule\x20ID','risk':a37_0x3b8cb0(0xee),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0xcb62ab){const _0x3c1095=a37_0x3b8cb0,_0xb5d465=await getRuntimeSchedule(_0xcb62ab[_0x3c1095(0x131)],_0xcb62ab[_0x3c1095(0x10a)](_0x3c1095(0x106)));return{'ok':!![],'data':_0xb5d465};}},scheduleRun={'service':a37_0x3b8cb0(0xfd),'command':a37_0x3b8cb0(0x133),'description':'立即运行一次定时任务并创建\x20Task','risk':a37_0x3b8cb0(0x10c),'confirmationDescription':a37_0x3b8cb0(0x128),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x58fe71){const _0xd80b61=a37_0x3b8cb0,_0x5e9b90=_0x58fe71['str'](_0xd80b61(0x106)),_0x199877=await runRuntimeSchedule(_0x58fe71[_0xd80b61(0x131)],_0x5e9b90);return{'ok':!![],'data':_0x199877,'message':_0xd80b61(0x101)+_0x199877['taskId']+_0xd80b61(0x109)+_0x5e9b90};},async 'dryRun'(_0x12b934){const _0x765d85=a37_0x3b8cb0,_0x371572=_0x12b934[_0x765d85(0x10a)]('schedule-id');return dryRun(_0x765d85(0x118),scheduleItemPath(_0x12b934[_0x765d85(0x131)],_0x371572)+_0x765d85(0x116))[_0x765d85(0x103)]('Preview:\x20run\x20schedule\x20'+_0x371572+_0x765d85(0x125))[_0x765d85(0x11e)]();}},scheduleDelete={'service':a37_0x3b8cb0(0xfd),'command':a37_0x3b8cb0(0x130),'description':'删除定时任务并停止其后续触发','risk':'high-risk-write','confirmationDescription':a37_0x3b8cb0(0x114),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1436ea){const _0x1b648a=a37_0x3b8cb0,_0x5ce18c=_0x1436ea[_0x1b648a(0x10a)](_0x1b648a(0x106)),_0x113e6c=await deleteRuntimeSchedule(_0x1436ea['appCode'],_0x5ce18c);return{'ok':!![],'data':_0x113e6c,'message':_0x1b648a(0x105)+_0x5ce18c};},async 'dryRun'(_0x1bca3f){const _0x32aef5=a37_0x3b8cb0,_0x1c9b30=_0x1bca3f[_0x32aef5(0x10a)](_0x32aef5(0x106));return dryRun(_0x32aef5(0xf0),scheduleItemPath(_0x1bca3f[_0x32aef5(0x131)],_0x1c9b30))['description'](_0x32aef5(0x137)+_0x1c9b30)[_0x32aef5(0x11e)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x2f7bfd=a37_0x5a13;(function(_0x31b594,_0x100c1a){const _0x546d17=a37_0x5a13,_0x2ce994=_0x31b594();while(!![]){try{const _0x24d8e6=-parseInt(_0x546d17(0xdd))/0x1*(-parseInt(_0x546d17(0xd9))/0x2)+-parseInt(_0x546d17(0xd3))/0x3*(-parseInt(_0x546d17(0xb0))/0x4)+parseInt(_0x546d17(0xca))/0x5+parseInt(_0x546d17(0xa5))/0x6+-parseInt(_0x546d17(0xb5))/0x7*(parseInt(_0x546d17(0xdf))/0x8)+parseInt(_0x546d17(0xaf))/0x9+-parseInt(_0x546d17(0xa6))/0xa;if(_0x24d8e6===_0x100c1a)break;else _0x2ce994['push'](_0x2ce994['shift']());}catch(_0x2eea62){_0x2ce994['push'](_0x2ce994['shift']());}}}(a37_0x36c9,0x5b8cd));import{createRuntimeSchedule,deleteRuntimeSchedule,getRuntimeSchedule,listRuntimeSchedules,runRuntimeSchedule,validateRuntimeSchedule}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a37_0x36c9(){const _0x1467ee=['/run','run','title','str','Schedule\x20kind:\x20CRON\x20or\x20ONCE','ONCE','2693045ZenZWE','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','premium','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','num','ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.','validation','length','UTC','74823fcIZai','Preview:\x20delete\x20schedule\x20','cursor','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','/schedules','cron','106MyBkci','--prompt\x20must\x20not\x20be\x20blank.','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','\x20from\x20schedule\x20','7339LafVfN','string','8dxhbZw','trim','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','read','Show\x20one\x20schedule\x20by\x20schedule\x20ID','删除定时任务并停止其后续触发','validate','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','\x20immediately','Page\x20size\x20from\x201\x20to\x20100','Deleted\x20schedule\x20','schedule','appCode','channel','Preview:\x20create\x20an\x20Agent\x20schedule','3035142egWtPT','8733950GdwOAt','\x20schedule\x20','--title\x20must\x20not\x20be\x20blank.','description','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','number','limit','POST','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','3896910rPDWlD','8dfiFRh','Preview:\x20run\x20schedule\x20','auto','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','4675447EXSyIF','Schedule\x20input\x20is\x20valid','kind','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','Task\x20channel:\x20auto\x20or\x20premium','prompt','立即运行一次定时任务并创建\x20Task','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','build','schedule-id','delete','high-risk-write','创建周期性或单次执行的\x20Agent\x20定时任务','Schedule\x20UUID','scheduled-at'];a37_0x36c9=function(){return _0x1467ee;};return a37_0x36c9();}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_0x2f7bfd(0xb7),'type':a37_0x2f7bfd(0xde),'required':!![],'enum':['CRON','ONCE'],'description':a37_0x2f7bfd(0xc8)},CRON_FLAG={'name':a37_0x2f7bfd(0xd8),'type':a37_0x2f7bfd(0xde),'description':a37_0x2f7bfd(0xb3)},SCHEDULED_AT_FLAG={'name':a37_0x2f7bfd(0xc3),'type':a37_0x2f7bfd(0xde),'description':a37_0x2f7bfd(0xe1)},TITLE_FLAG={'name':'title','type':'string','required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':'prompt','type':a37_0x2f7bfd(0xde),'required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':'channel','type':a37_0x2f7bfd(0xde),'enum':[a37_0x2f7bfd(0xb2),'premium'],'default':a37_0x2f7bfd(0xcc),'description':a37_0x2f7bfd(0xb9)},SCHEDULE_ID_FLAG={'name':a37_0x2f7bfd(0xbe),'type':a37_0x2f7bfd(0xde),'required':!![],'description':a37_0x2f7bfd(0xc2),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x2f7bfd(0xdb)}},LIMIT_FLAG={'name':'limit','type':a37_0x2f7bfd(0xab),'default':0x14,'description':a37_0x2f7bfd(0x9f)},CURSOR_FLAG={'name':a37_0x2f7bfd(0xd5),'type':a37_0x2f7bfd(0xde),'description':a37_0x2f7bfd(0xcb)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x52dda5){const _0x1abf83=a37_0x2f7bfd,_0xa3c8da=_0x52dda5['str'](_0x1abf83(0xb7)),_0x273753=_0x52dda5[_0x1abf83(0xc7)](_0x1abf83(0xc6))[_0x1abf83(0xe0)](),_0x28dd76=_0x52dda5[_0x1abf83(0xc7)](_0x1abf83(0xba))[_0x1abf83(0xe0)](),_0x23b220=_0x52dda5[_0x1abf83(0xc7)](_0x1abf83(0xa3)),_0x316dbe=_0x52dda5['str'](_0x1abf83(0xd8)),_0x490682=_0x52dda5['str']('scheduled-at');if(!_0x273753)throw CliErrors[_0x1abf83(0xd0)](_0x1abf83(0xa8));if(!_0x28dd76)throw CliErrors[_0x1abf83(0xd0)](_0x1abf83(0xda));if(_0xa3c8da==='CRON'){if(!_0x316dbe||_0x490682)throw CliErrors[_0x1abf83(0xd0)](_0x1abf83(0xaa));return{'kind':_0xa3c8da,'timezone':_0x1abf83(0xd2),'cron':_0x316dbe,'title':_0x273753,'prompt':_0x28dd76,'channel':_0x23b220};}if(_0xa3c8da===_0x1abf83(0xc9)){if(!_0x490682||_0x316dbe)throw CliErrors['validation'](_0x1abf83(0xcf));return{'kind':_0xa3c8da,'timezone':_0x1abf83(0xd2),'scheduledAt':_0x490682,'title':_0x273753,'prompt':_0x28dd76,'channel':_0x23b220};}throw CliErrors['validation'](_0x1abf83(0xb4));}function scheduleCollectionPath(_0xeca31e){const _0x342b1a=a37_0x2f7bfd;return'/api/harness/apps/'+encodeURIComponent(_0xeca31e)+_0x342b1a(0xd7);}function scheduleItemPath(_0x306238,_0xa561d4){return scheduleCollectionPath(_0x306238)+'/'+encodeURIComponent(_0xa561d4);}function a37_0x5a13(_0x21d2e1,_0x5ba9dd){_0x21d2e1=_0x21d2e1-0x9e;const _0x36c981=a37_0x36c9();let _0x5a13c5=_0x36c981[_0x21d2e1];return _0x5a13c5;}const scheduleValidate={'service':a37_0x2f7bfd(0xa1),'command':a37_0x2f7bfd(0xe5),'description':a37_0x2f7bfd(0xe6),'risk':a37_0x2f7bfd(0xe2),'flags':INPUT_FLAGS,async 'validate'(_0x11f271){readScheduleInput(_0x11f271);},async 'execute'(_0x34af8d){const _0x160980=a37_0x2f7bfd,_0x4127a8=readScheduleInput(_0x34af8d),_0x1f8c78=await validateRuntimeSchedule(_0x34af8d[_0x160980(0xa2)],_0x4127a8);return{'ok':!![],'data':_0x1f8c78,'message':_0x160980(0xb6)};}},scheduleCreate={'service':a37_0x2f7bfd(0xa1),'command':'create','description':a37_0x2f7bfd(0xc1),'risk':a37_0x2f7bfd(0xc0),'confirmationDescription':a37_0x2f7bfd(0xcd),'flags':INPUT_FLAGS,async 'validate'(_0x347cbd){readScheduleInput(_0x347cbd);},async 'execute'(_0x2c0238){const _0x4ec2ce=a37_0x2f7bfd,_0x272c13=readScheduleInput(_0x2c0238),_0x2ead61=await validateRuntimeSchedule(_0x2c0238[_0x4ec2ce(0xa2)],_0x272c13),_0x4d5846=await createRuntimeSchedule(_0x2c0238[_0x4ec2ce(0xa2)],_0x2ead61);return{'ok':!![],'data':_0x4d5846,'message':'Created\x20'+_0x4d5846[_0x4ec2ce(0xb7)]+_0x4ec2ce(0xa7)+_0x4d5846['scheduleId']};},async 'dryRun'(_0x54b565){const _0x25573c=a37_0x2f7bfd,_0x4cf6ad=readScheduleInput(_0x54b565);return dryRun(_0x25573c(0xad),scheduleCollectionPath(_0x54b565[_0x25573c(0xa2)]))['body'](_0x4cf6ad)[_0x25573c(0xa9)](_0x25573c(0xa4))[_0x25573c(0xbd)]();}},scheduleList={'service':a37_0x2f7bfd(0xa1),'command':'list','description':a37_0x2f7bfd(0xd6),'risk':a37_0x2f7bfd(0xe2),'flags':[KIND_FLAG,LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x3233e5){const _0x518b6d=a37_0x2f7bfd,_0xe28a98=_0x3233e5[_0x518b6d(0xce)](_0x518b6d(0xac));if(!Number['isSafeInteger'](_0xe28a98)||_0xe28a98<0x1||_0xe28a98>0x64)throw CliErrors[_0x518b6d(0xd0)](_0x518b6d(0xb8));const _0xef7360=_0x3233e5[_0x518b6d(0xc7)](_0x518b6d(0xd5));if(_0xef7360&&(_0xef7360[_0x518b6d(0xd1)]>0x400||_0xef7360[_0x518b6d(0xe0)]()!==_0xef7360))throw CliErrors[_0x518b6d(0xd0)](_0x518b6d(0xae));},async 'execute'(_0x219c9a){const _0x35f49b=a37_0x2f7bfd,_0x381c29=_0x219c9a[_0x35f49b(0xc7)](_0x35f49b(0xd5)),_0x371d4d=await listRuntimeSchedules(_0x219c9a[_0x35f49b(0xa2)],{'kind':_0x219c9a[_0x35f49b(0xc7)](_0x35f49b(0xb7)),'limit':_0x219c9a['num'](_0x35f49b(0xac)),..._0x381c29?{'cursor':_0x381c29}:{}});return{'ok':!![],'data':_0x371d4d};}},scheduleDetail={'service':'schedule','command':'detail','description':a37_0x2f7bfd(0xe3),'risk':a37_0x2f7bfd(0xe2),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x4bacc8){const _0x294f48=a37_0x2f7bfd,_0x39237a=await getRuntimeSchedule(_0x4bacc8['appCode'],_0x4bacc8[_0x294f48(0xc7)](_0x294f48(0xbe)));return{'ok':!![],'data':_0x39237a};}},scheduleRun={'service':a37_0x2f7bfd(0xa1),'command':a37_0x2f7bfd(0xc5),'description':a37_0x2f7bfd(0xbb),'risk':a37_0x2f7bfd(0xc0),'confirmationDescription':a37_0x2f7bfd(0xbc),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x562d27){const _0x3d2681=a37_0x2f7bfd,_0x5a5a2c=_0x562d27[_0x3d2681(0xc7)](_0x3d2681(0xbe)),_0x35ad08=await runRuntimeSchedule(_0x562d27[_0x3d2681(0xa2)],_0x5a5a2c);return{'ok':!![],'data':_0x35ad08,'message':'Queued\x20Task\x20'+_0x35ad08['taskId']+_0x3d2681(0xdc)+_0x5a5a2c};},async 'dryRun'(_0x34fdc1){const _0x36d8dd=a37_0x2f7bfd,_0x44a7a4=_0x34fdc1[_0x36d8dd(0xc7)](_0x36d8dd(0xbe));return dryRun(_0x36d8dd(0xad),scheduleItemPath(_0x34fdc1[_0x36d8dd(0xa2)],_0x44a7a4)+_0x36d8dd(0xc4))[_0x36d8dd(0xa9)](_0x36d8dd(0xb1)+_0x44a7a4+_0x36d8dd(0x9e))[_0x36d8dd(0xbd)]();}},scheduleDelete={'service':a37_0x2f7bfd(0xa1),'command':a37_0x2f7bfd(0xbf),'description':a37_0x2f7bfd(0xe4),'risk':'high-risk-write','confirmationDescription':'将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x26411f){const _0x12e224=a37_0x2f7bfd,_0x41f0b0=_0x26411f[_0x12e224(0xc7)](_0x12e224(0xbe)),_0x27f2bd=await deleteRuntimeSchedule(_0x26411f['appCode'],_0x41f0b0);return{'ok':!![],'data':_0x27f2bd,'message':_0x12e224(0xa0)+_0x41f0b0};},async 'dryRun'(_0x55a503){const _0x35cd50=a37_0x2f7bfd,_0x33788f=_0x55a503[_0x35cd50(0xc7)](_0x35cd50(0xbe));return dryRun('DELETE',scheduleItemPath(_0x55a503[_0x35cd50(0xa2)],_0x33788f))[_0x35cd50(0xa9)](_0x35cd50(0xd4)+_0x33788f)[_0x35cd50(0xbd)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x8a0cd3=a38_0x2045;(function(_0x3c0a1c,_0x19ebdc){const _0x3b4b4a=a38_0x2045,_0x303b6e=_0x3c0a1c();while(!![]){try{const _0x522ab9=-parseInt(_0x3b4b4a(0xb2))/0x1+parseInt(_0x3b4b4a(0xae))/0x2+-parseInt(_0x3b4b4a(0xa9))/0x3*(parseInt(_0x3b4b4a(0xb4))/0x4)+parseInt(_0x3b4b4a(0xb5))/0x5*(-parseInt(_0x3b4b4a(0xb3))/0x6)+parseInt(_0x3b4b4a(0xaa))/0x7+parseInt(_0x3b4b4a(0xac))/0x8+-parseInt(_0x3b4b4a(0xab))/0x9*(parseInt(_0x3b4b4a(0xb0))/0xa);if(_0x522ab9===_0x19ebdc)break;else _0x303b6e['push'](_0x303b6e['shift']());}catch(_0x27da46){_0x303b6e['push'](_0x303b6e['shift']());}}}(a38_0x2449,0xb3826));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x101861){const _0x52185c=await buildSchemaPayload();return{'ok':!![],'data':_0x52185c};}export const schemaDefinition={'service':a38_0x8a0cd3(0xa8),'command':a38_0x8a0cd3(0xaf),'description':a38_0x8a0cd3(0xad),'risk':a38_0x8a0cd3(0xb1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};function a38_0x2045(_0x3cd9b9,_0x3fc836){_0x3cd9b9=_0x3cd9b9-0xa8;const _0x24491f=a38_0x2449();let _0x204542=_0x24491f[_0x3cd9b9];return _0x204542;}function a38_0x2449(){const _0x283de6=['116kzDZBG','16870Tmonqf','schema','118302LutmpF','9374246ILdWiE','36qHFAFo','11616408dLwLvY','Export\x20machine-readable\x20command\x20schema\x20(JSON)','2175678hZTijc','export','2272990ioeijZ','read','173288BkNqVt','1632RXJZFi'];a38_0x2449=function(){return _0x283de6;};return a38_0x2449();}
1
+ function a38_0x239c(){const _0x1902a5=['492YmSsmD','read','6124019ojNjME','10YQckfr','329166nUFdEV','export','14799744DwvGTm','126330CnBftX','439LuZUfh','Export\x20machine-readable\x20command\x20schema\x20(JSON)','160VZhSYg','5406590DffqeK','2492EGMOmh','5JXnoSR','20214PmmTdP'];a38_0x239c=function(){return _0x1902a5;};return a38_0x239c();}const a38_0x2b36ee=a38_0x55b9;function a38_0x55b9(_0x112c23,_0x3a140c){_0x112c23=_0x112c23-0x133;const _0x239c9e=a38_0x239c();let _0x55b952=_0x239c9e[_0x112c23];return _0x55b952;}(function(_0x426ff1,_0x3e1a17){const _0x94423e=a38_0x55b9,_0x2073fa=_0x426ff1();while(!![]){try{const _0x29fc26=-parseInt(_0x94423e(0x13f))/0x1*(-parseInt(_0x94423e(0x134))/0x2)+parseInt(_0x94423e(0x136))/0x3*(parseInt(_0x94423e(0x137))/0x4)+-parseInt(_0x94423e(0x135))/0x5*(-parseInt(_0x94423e(0x13e))/0x6)+-parseInt(_0x94423e(0x133))/0x7+-parseInt(_0x94423e(0x141))/0x8*(-parseInt(_0x94423e(0x13b))/0x9)+parseInt(_0x94423e(0x13a))/0xa*(parseInt(_0x94423e(0x139))/0xb)+-parseInt(_0x94423e(0x13d))/0xc;if(_0x29fc26===_0x3e1a17)break;else _0x2073fa['push'](_0x2073fa['shift']());}catch(_0x439898){_0x2073fa['push'](_0x2073fa['shift']());}}}(a38_0x239c,0xa5db6));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x31010c){const _0x43139b=await buildSchemaPayload();return{'ok':!![],'data':_0x43139b};}export const schemaDefinition={'service':'schema','command':a38_0x2b36ee(0x13c),'description':a38_0x2b36ee(0x140),'risk':a38_0x2b36ee(0x138),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};