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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) 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.d.ts +14 -0
  76. package/lib/constant/product.js +1 -1
  77. package/lib/constant/risk.js +1 -1
  78. package/lib/constant/url.js +1 -1
  79. package/lib/context.js +1 -1
  80. package/lib/core/api-client.js +1 -1
  81. package/lib/core/db-resolver.js +1 -1
  82. package/lib/core/sdk-client.js +1 -1
  83. package/lib/errors.js +1 -1
  84. package/lib/framework/build-all-flags.js +1 -1
  85. package/lib/framework/dryrun.js +1 -1
  86. package/lib/framework/flags.js +1 -1
  87. package/lib/framework/help.js +1 -1
  88. package/lib/framework/index.js +1 -1
  89. package/lib/framework/output.js +1 -1
  90. package/lib/framework/preparse.js +1 -1
  91. package/lib/framework/rate-limit.js +1 -1
  92. package/lib/framework/raw-flags.js +1 -1
  93. package/lib/framework/response.js +1 -1
  94. package/lib/framework/runner-confirmation.js +1 -1
  95. package/lib/framework/runner-error.js +1 -1
  96. package/lib/framework/runner.js +1 -1
  97. package/lib/framework/schema-export.js +1 -1
  98. package/lib/framework/service-order.js +1 -1
  99. package/lib/framework/types.js +1 -1
  100. package/lib/generated/build-info.d.ts +4 -4
  101. package/lib/generated/build-info.js +1 -1
  102. package/lib/help.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/npx-skills-add.d.ts +30 -0
  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.d.ts +48 -0
  126. package/lib/skills/skill-presence.js +1 -0
  127. package/lib/utils/apply-jq-filter.js +1 -1
  128. package/lib/utils/logger.js +1 -1
  129. package/lib/utils/lossless-json.js +1 -1
  130. package/lib/utils/params.js +1 -1
  131. package/lib/utils/platform.js +1 -1
  132. package/lib/utils/update-notice.js +1 -1
  133. package/lib/utils/version.js +1 -1
  134. package/lib/utils/write-cli-side-channel.js +1 -1
  135. package/package.json +1 -1
@@ -1 +1 @@
1
- const a28_0xb9c266=a28_0x1a0f;(function(_0xf05479,_0x2316a4){const _0x213507=a28_0x1a0f,_0xfb6156=_0xf05479();while(!![]){try{const _0x15a3bd=parseInt(_0x213507(0xad))/0x1*(parseInt(_0x213507(0xbb))/0x2)+-parseInt(_0x213507(0xbc))/0x3+-parseInt(_0x213507(0xb0))/0x4+-parseInt(_0x213507(0xac))/0x5*(parseInt(_0x213507(0xbe))/0x6)+-parseInt(_0x213507(0xb5))/0x7*(parseInt(_0x213507(0xb3))/0x8)+parseInt(_0x213507(0xbd))/0x9*(parseInt(_0x213507(0xb6))/0xa)+parseInt(_0x213507(0xb9))/0xb*(parseInt(_0x213507(0xc0))/0xc);if(_0x15a3bd===_0x2316a4)break;else _0xfb6156['push'](_0xfb6156['shift']());}catch(_0x3a8085){_0xfb6156['push'](_0xfb6156['shift']());}}}(a28_0x1591,0x5e995));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x1591(){const _0x5dc7e2=['408DwbWLU','sdk-doc','4555164CMlxWZ','code','52265dNSAJd','1658dJPJBm','str','trim','1870080ZZlVdY','read','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','16vYozAa','dataset','16716FZJUQK','207670RWiYXC','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','appCode','33GzzuOr','string','808WBDPQW','776439nZtCuw','9VhbCmL'];a28_0x1591=function(){return _0x5dc7e2;};return a28_0x1591();}const DEFAULT_MARKDOWN=a28_0xb9c266(0xb7);function a28_0x1a0f(_0x3d2918,_0x24aacc){_0x3d2918=_0x3d2918-0xab;const _0x15911b=a28_0x1591();let _0x1a0f3d=_0x15911b[_0x3d2918];return _0x1a0f3d;}export function formatDatasetSdkMarkdown(_0x30566b){const _0x34a57f=a28_0xb9c266,_0x1672a9=typeof _0x30566b===_0x34a57f(0xba)?_0x30566b[_0x34a57f(0xaf)]():'';return _0x1672a9||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0xb9c266(0xb4),'command':a28_0xb9c266(0xbf),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a28_0xb9c266(0xb1),'flags':[{...CODE_FLAG,'description':a28_0xb9c266(0xb2)}],async 'execute'(_0xc68445){const _0x386265=a28_0xb9c266,_0x533c47=_0xc68445[_0x386265(0xae)](_0x386265(0xab)),_0x529c68=await getDatasetSdkUsageDoc(_0x533c47,_0xc68445[_0x386265(0xb8)]);return{'ok':!![],'data':{'code':_0x533c47,'appCode':_0xc68445['appCode'],'markdown':formatDatasetSdkMarkdown(_0x529c68)}};}};
1
+ const a28_0x2e7d68=a28_0x57a2;(function(_0x4326de,_0x5923fa){const _0x179c05=a28_0x57a2,_0x3bbae6=_0x4326de();while(!![]){try{const _0x7fdadb=-parseInt(_0x179c05(0x18f))/0x1+-parseInt(_0x179c05(0x183))/0x2+-parseInt(_0x179c05(0x184))/0x3+-parseInt(_0x179c05(0x17f))/0x4*(-parseInt(_0x179c05(0x189))/0x5)+-parseInt(_0x179c05(0x186))/0x6*(parseInt(_0x179c05(0x188))/0x7)+parseInt(_0x179c05(0x182))/0x8*(-parseInt(_0x179c05(0x187))/0x9)+parseInt(_0x179c05(0x18b))/0xa;if(_0x7fdadb===_0x5923fa)break;else _0x3bbae6['push'](_0x3bbae6['shift']());}catch(_0x2ebff8){_0x3bbae6['push'](_0x3bbae6['shift']());}}}(a28_0x4142,0x979c4));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x57a2(_0x4b93b4,_0x540bcf){_0x4b93b4=_0x4b93b4-0x17f;const _0x414242=a28_0x4142();let _0x57a27d=_0x414242[_0x4b93b4];return _0x57a27d;}function a28_0x4142(){const _0x40ca91=['29961930WcfDWz','read','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','sdk-doc','1059543bkQuOc','4gYspoK','code','str','8xhjpBf','685250raiDCz','2260875MvMkrf','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','30PwhrQY','1471527XNohHs','772737XXsLCZ','2480270bzexlp','trim'];a28_0x4142=function(){return _0x40ca91;};return a28_0x4142();}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x2aa91a){const _0x2b039f=a28_0x57a2,_0x86140f=typeof _0x2aa91a==='string'?_0x2aa91a[_0x2b039f(0x18a)]():'';return _0x86140f||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':a28_0x2e7d68(0x18e),'description':a28_0x2e7d68(0x18d),'risk':a28_0x2e7d68(0x18c),'flags':[{...CODE_FLAG,'description':a28_0x2e7d68(0x185)}],async 'execute'(_0x2591ae){const _0x1c0346=a28_0x2e7d68,_0x5b628c=_0x2591ae[_0x1c0346(0x181)](_0x1c0346(0x180)),_0x1c5d22=await getDatasetSdkUsageDoc(_0x5b628c,_0x2591ae['appCode']);return{'ok':!![],'data':{'code':_0x5b628c,'appCode':_0x2591ae['appCode'],'markdown':formatDatasetSdkMarkdown(_0x1c5d22)}};}};
@@ -1 +1 @@
1
- function a29_0x541f(_0x22686e,_0x5f2099){_0x22686e=_0x22686e-0x78;const _0x1e2b50=a29_0x1e2b();let _0x541f24=_0x1e2b50[_0x22686e];return _0x541f24;}const a29_0x9e2646=a29_0x541f;(function(_0x10a0a9,_0x46db5d){const _0x4c35de=a29_0x541f,_0xae02bb=_0x10a0a9();while(!![]){try{const _0x375120=-parseInt(_0x4c35de(0x7d))/0x1+-parseInt(_0x4c35de(0x93))/0x2*(parseInt(_0x4c35de(0x97))/0x3)+-parseInt(_0x4c35de(0xa3))/0x4+-parseInt(_0x4c35de(0x8f))/0x5*(parseInt(_0x4c35de(0x83))/0x6)+-parseInt(_0x4c35de(0x89))/0x7+-parseInt(_0x4c35de(0xc7))/0x8*(-parseInt(_0x4c35de(0x78))/0x9)+-parseInt(_0x4c35de(0xc8))/0xa*(-parseInt(_0x4c35de(0xa8))/0xb);if(_0x375120===_0x46db5d)break;else _0xae02bb['push'](_0xae02bb['shift']());}catch(_0x4774df){_0xae02bb['push'](_0xae02bb['shift']());}}}(a29_0x1e2b,0x66043));import a29_0x5f25d8 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0xdea1cf){const _0x143588=a29_0x541f,_0x642e2b=getCliVersion(),_0x4800d5=buildConfigFromFlags({});await initGlobalEnvironment(_0x4800d5),console[_0x143588(0x9e)](),console[_0x143588(0x9e)](a29_0x5f25d8[_0x143588(0xb2)](CLI_BIN_NAME+_0x143588(0xa4))),console[_0x143588(0x9e)](a29_0x5f25d8[_0x143588(0x94)]('─'['repeat'](0x32))),console['log'](_0x143588(0xa7)+_0x642e2b),console[_0x143588(0x9e)](_0x143588(0x9a)+process[_0x143588(0x85)]),console['log'](_0x143588(0x88)+process[_0x143588(0xad)]+'\x20'+process['arch']),console[_0x143588(0x9e)](),console[_0x143588(0x9e)](a29_0x5f25d8['bold'](_0x143588(0xb4))),console[_0x143588(0x9e)](a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x92)[_0x143588(0xb0)](0x1e)));const _0x47652c=getGlobalConfigPath(),_0x2ca4f4=getProjectConfigPath();console[_0x143588(0x9e)](_0x143588(0xb8)+(_0x47652c||a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x87)))),console['log'](_0x143588(0x84)+(_0x2ca4f4||a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x87)))),console[_0x143588(0x9e)](),console['log'](a29_0x5f25d8[_0x143588(0xb2)](_0x143588(0x95))),console[_0x143588(0x9e)](a29_0x5f25d8[_0x143588(0x94)]('\x20\x20─'['repeat'](0x1e)));const _0xd6c35a=(_0x3c9a68,_0x529df1)=>{const _0x446666=_0x143588;if(!_0x529df1){console['log']('\x20\x20'+_0x3c9a68[_0x446666(0x9c)](0x11)+'\x20'+a29_0x5f25d8[_0x446666(0x94)]('(no\x20file)'));return;}const _0x1b2626=inspectCliConfigJsonFile(_0x529df1);if(_0x1b2626[_0x446666(0xb3)]==='ok')console[_0x446666(0x9e)]('\x20\x20'+_0x3c9a68['padEnd'](0x11)+'\x20'+a29_0x5f25d8[_0x446666(0x9d)](_0x446666(0xb7)));else{if(_0x1b2626['status']===_0x446666(0xbe))console[_0x446666(0x9e)]('\x20\x20'+_0x3c9a68['padEnd'](0x11)+'\x20'+a29_0x5f25d8[_0x446666(0x81)](_0x446666(0xc5)));else _0x1b2626[_0x446666(0xb3)]===_0x446666(0xac)?console[_0x446666(0x9e)]('\x20\x20'+_0x3c9a68[_0x446666(0x9c)](0x11)+'\x20'+a29_0x5f25d8['gray']('(missing)')):(console[_0x446666(0x9e)]('\x20\x20'+_0x3c9a68[_0x446666(0x9c)](0x11)+'\x20'+a29_0x5f25d8[_0x446666(0xa0)]('✗\x20Invalid\x20JSON')),console[_0x446666(0x9e)]('\x20\x20'+''[_0x446666(0x9c)](0x11)+'\x20'+a29_0x5f25d8[_0x446666(0xa0)](_0x1b2626['message'])));}};_0xd6c35a('Global',_0x47652c),_0xd6c35a('Project',_0x2ca4f4),console[_0x143588(0x9e)](),console['log'](a29_0x5f25d8[_0x143588(0xb2)](_0x143588(0xa5))),console[_0x143588(0x9e)](a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x92)[_0x143588(0xb0)](0x1e))),console[_0x143588(0x9e)](_0x143588(0xa6)+(_0x4800d5[_0x143588(0xba)]||a29_0x5f25d8[_0x143588(0xa0)](_0x143588(0xb9)))),console['log'](_0x143588(0xab)+_0x4800d5['env']);const _0x178267=isLegacyCompatConfigKey(_0x143588(0x8e))?a29_0x5f25d8[_0x143588(0x94)](_0x4800d5[_0x143588(0x8e)]+'\x20(legacy/compat\x20only)'):_0x4800d5[_0x143588(0x8e)];console['log'](_0x143588(0xc1)+_0x178267),console[_0x143588(0x9e)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x4800d5[_0x143588(0xb6)]||a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x96)))),console['log'](_0x143588(0xc6)+(_0x4800d5[_0x143588(0xc4)]||a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x96)))),console['log'](_0x143588(0xc9)+(_0x4800d5[_0x143588(0x7a)]||a29_0x5f25d8['gray'](_0x143588(0x7f)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x143588(0x9e)](_0x143588(0x9b)+(_0x4800d5[_0x143588(0xbb)]??a29_0x5f25d8[_0x143588(0x94)](_0x143588(0xa9)))),console[_0x143588(0x9e)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x4800d5[_0x143588(0x9f)]),console[_0x143588(0x9e)](_0x143588(0x86)+_0x4800d5[_0x143588(0x99)]),console[_0x143588(0x9e)](_0x143588(0xb5)+AUTH_MODE[_0x143588(0x7b)]),console['log']('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x4800d5[_0x143588(0xc0)]?a29_0x5f25d8[_0x143588(0x9d)](_0x143588(0xb1)+_0x4800d5[_0x143588(0xc0)][_0x143588(0x80)]+')'):a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x96)))),console[_0x143588(0x9e)](),console[_0x143588(0x9e)](a29_0x5f25d8['bold'](_0x143588(0xbf))),console[_0x143588(0x9e)](a29_0x5f25d8['gray'](_0x143588(0x92)[_0x143588(0xb0)](0x1e))),console[_0x143588(0x9e)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x143588(0x9e)](_0x143588(0xa2)+getUserDomain()),console[_0x143588(0x9e)](_0x143588(0x91)+getRuntimeDomain()),console[_0x143588(0x9e)](),console['log'](a29_0x5f25d8[_0x143588(0xb2)]('\x20\x20Service\x20Tree')),console[_0x143588(0x9e)](a29_0x5f25d8[_0x143588(0x94)](_0x143588(0x92)[_0x143588(0xb0)](0x1e)));const _0x191653=inspectServiceRegistry();console[_0x143588(0x9e)](_0x143588(0x7c)+_0x191653[_0x143588(0xae)]),console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x191653)),console[_0x143588(0x9e)](_0x143588(0xc3)+_0x191653[_0x143588(0x79)]),console['log'](_0x143588(0xbc)+_0x191653[_0x143588(0x8a)]);for(const _0x4d414e of _0x191653['services']){console[_0x143588(0x9e)]('\x20\x20'+(_0x4d414e[_0x143588(0xc2)]+':')['padEnd'](0x11)+'\x20'+(_0x4d414e['name']||a29_0x5f25d8[_0x143588(0x94)](_0x143588(0xaa)))+'\x20('+_0x4d414e['commandCount']+'\x20commands)'),console['log']('\x20\x20'+''[_0x143588(0x9c)](0x11)+_0x143588(0x98)+_0x4d414e['source']['path']);}return console['log'](),console[_0x143588(0x9e)](a29_0x5f25d8[_0x143588(0xb2)]('\x20\x20Auth')),console[_0x143588(0x9e)](a29_0x5f25d8['gray'](_0x143588(0x92)[_0x143588(0xb0)](0x1e))),console[_0x143588(0x9e)](_0x143588(0x8c)+a29_0x5f25d8['green'](AUTH_MODE[_0x143588(0x7b)]+_0x143588(0x8b))),console[_0x143588(0x9e)](_0x143588(0x90)+a29_0x5f25d8['gray'](_0x143588(0xaf))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1152f5){const _0x58e38e=a29_0x541f;if(_0x1152f5[_0x58e38e(0xb3)]==='ok')return a29_0x5f25d8[_0x58e38e(0x9d)]('✓\x20Loaded');if(_0x1152f5['status']===_0x58e38e(0xac))return a29_0x5f25d8[_0x58e38e(0x94)](_0x58e38e(0x87));if(_0x1152f5[_0x58e38e(0xb3)]===_0x58e38e(0xbe))return a29_0x5f25d8[_0x58e38e(0x81)](_0x58e38e(0xbd));return a29_0x5f25d8[_0x58e38e(0xa0)]('✗\x20Invalid'+(_0x1152f5[_0x58e38e(0x7e)]?':\x20'+_0x1152f5['message']:''));}function a29_0x1e2b(){const _0x1e1736=['ClientAk','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','39430GmEDHu','message','(default:\x20','length','yellow','Diagnose\x20CLI\x20configuration\x20and\x20environment','474972fZJMvm','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','version','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','617008BUbxfu','commandCount','\x20(accessKey)','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','check','locale','5KOReGA','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20─','102kqZxza','gray','\x20\x20Config\x20JSON','(none)','25923mStdMF','\x20Imported\x20from:\x20','verbose','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','padEnd','green','log','riskLevel','red','doctor','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','1730572ZIykzJ','\x20doctor','\x20\x20Merged\x20Config','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','77xBVvOc','(default)','(unnamed)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','platform','registryPath','(removed\x20—\x20cookie\x20auth\x20disabled)','repeat','(set,\x20length=','bold','status','\x20\x20Config\x20Files','\x20\x20auth\x20(effective):\x20','defaultApp','✓\x20Valid\x20JSON','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','appCode','pageSize','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','empty','\x20\x20API\x20Endpoints','accessKey','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','serviceCode','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','47776BroMKs','1073470jVFdzc','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1125lXygRK','serviceCount','format'];a29_0x1e2b=function(){return _0x1e1736;};return a29_0x1e2b();}export const doctorDefinition={'service':a29_0x9e2646(0xa1),'command':a29_0x9e2646(0x8d),'description':a29_0x9e2646(0x82),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x30feed=a29_0x44ef;(function(_0x549c24,_0x2a1d49){const _0x471c5c=a29_0x44ef,_0x4f4991=_0x549c24();while(!![]){try{const _0x1ec119=parseInt(_0x471c5c(0x13a))/0x1+-parseInt(_0x471c5c(0x10d))/0x2*(parseInt(_0x471c5c(0x10c))/0x3)+-parseInt(_0x471c5c(0x134))/0x4+-parseInt(_0x471c5c(0x103))/0x5+-parseInt(_0x471c5c(0x11b))/0x6+-parseInt(_0x471c5c(0xff))/0x7*(parseInt(_0x471c5c(0xf9))/0x8)+parseInt(_0x471c5c(0x10f))/0x9;if(_0x1ec119===_0x2a1d49)break;else _0x4f4991['push'](_0x4f4991['shift']());}catch(_0x16c1c6){_0x4f4991['push'](_0x4f4991['shift']());}}}(a29_0x30a4,0xb5784));import a29_0x496cfc 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';function a29_0x44ef(_0x4060bf,_0x123c06){_0x4060bf=_0x4060bf-0xf9;const _0x30a4c5=a29_0x30a4();let _0x44ef7c=_0x30a4c5[_0x4060bf];return _0x44ef7c;}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x1198bf){const _0x5b7d54=a29_0x44ef,_0x2007db=getCliVersion(),_0x529c41=buildConfigFromFlags({});await initGlobalEnvironment(_0x529c41),console[_0x5b7d54(0x12d)](),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0x11f)](CLI_BIN_NAME+_0x5b7d54(0x123))),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0xfa)]('─'['repeat'](0x32))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x139)+_0x2007db),console[_0x5b7d54(0x12d)](_0x5b7d54(0x140)+process[_0x5b7d54(0x124)]),console[_0x5b7d54(0x12d)](_0x5b7d54(0x12c)+process[_0x5b7d54(0x130)]+'\x20'+process[_0x5b7d54(0xfd)]),console[_0x5b7d54(0x12d)](),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0x11f)]('\x20\x20Config\x20Files')),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x13f)[_0x5b7d54(0x11d)](0x1e)));const _0x4b2e48=getGlobalConfigPath(),_0xf02ede=getProjectConfigPath();console[_0x5b7d54(0x12d)](_0x5b7d54(0x13c)+(_0x4b2e48||a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x110)))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x131)+(_0xf02ede||a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x110)))),console[_0x5b7d54(0x12d)](),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0x11f)](_0x5b7d54(0x11c))),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x13f)[_0x5b7d54(0x11d)](0x1e)));const _0x5b3e61=(_0x2b48bf,_0x47a6)=>{const _0x185a54=_0x5b7d54;if(!_0x47a6){console[_0x185a54(0x12d)]('\x20\x20'+_0x2b48bf[_0x185a54(0x136)](0x11)+'\x20'+a29_0x496cfc[_0x185a54(0xfa)](_0x185a54(0x13e)));return;}const _0x1f2492=inspectCliConfigJsonFile(_0x47a6);if(_0x1f2492[_0x185a54(0x11e)]==='ok')console[_0x185a54(0x12d)]('\x20\x20'+_0x2b48bf[_0x185a54(0x136)](0x11)+'\x20'+a29_0x496cfc[_0x185a54(0x14b)](_0x185a54(0x108)));else{if(_0x1f2492[_0x185a54(0x11e)]===_0x185a54(0x117))console[_0x185a54(0x12d)]('\x20\x20'+_0x2b48bf[_0x185a54(0x136)](0x11)+'\x20'+a29_0x496cfc[_0x185a54(0x142)](_0x185a54(0x10e)));else _0x1f2492[_0x185a54(0x11e)]==='missing'?console[_0x185a54(0x12d)]('\x20\x20'+_0x2b48bf[_0x185a54(0x136)](0x11)+'\x20'+a29_0x496cfc[_0x185a54(0xfa)](_0x185a54(0x13b))):(console['log']('\x20\x20'+_0x2b48bf[_0x185a54(0x136)](0x11)+'\x20'+a29_0x496cfc[_0x185a54(0x148)]('✗\x20Invalid\x20JSON')),console[_0x185a54(0x12d)]('\x20\x20'+''[_0x185a54(0x136)](0x11)+'\x20'+a29_0x496cfc[_0x185a54(0x148)](_0x1f2492[_0x185a54(0x14e)])));}};_0x5b3e61('Global',_0x4b2e48),_0x5b3e61(_0x5b7d54(0x106),_0xf02ede),console[_0x5b7d54(0x12d)](),console['log'](a29_0x496cfc['bold']('\x20\x20Merged\x20Config')),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x13f)['repeat'](0x1e))),console['log'](_0x5b7d54(0x138)+(_0x529c41[_0x5b7d54(0x119)]||a29_0x496cfc[_0x5b7d54(0x148)](_0x5b7d54(0x13d)))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x107)+_0x529c41[_0x5b7d54(0x12e)]);const _0x373225=isLegacyCompatConfigKey(_0x5b7d54(0x141))?a29_0x496cfc['gray'](_0x529c41[_0x5b7d54(0x141)]+'\x20(legacy/compat\x20only)'):_0x529c41[_0x5b7d54(0x141)];console[_0x5b7d54(0x12d)](_0x5b7d54(0x147)+_0x373225),console[_0x5b7d54(0x12d)](_0x5b7d54(0x120)+(_0x529c41[_0x5b7d54(0x137)]||a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x104)))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x14d)+(_0x529c41[_0x5b7d54(0x127)]||a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x104)))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x10a)+(_0x529c41[_0x5b7d54(0x111)]||a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x126)+DEFAULT_CONFIG_VALUES[_0x5b7d54(0x111)]+')'))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x118)+(_0x529c41[_0x5b7d54(0x101)]??a29_0x496cfc['gray']('(default)'))),console[_0x5b7d54(0x12d)](_0x5b7d54(0xfc)+_0x529c41['riskLevel']),console[_0x5b7d54(0x12d)](_0x5b7d54(0x100)+_0x529c41['verbose']),console[_0x5b7d54(0x12d)](_0x5b7d54(0x12a)+AUTH_MODE[_0x5b7d54(0x14c)]),console[_0x5b7d54(0x12d)](_0x5b7d54(0x105)+(_0x529c41[_0x5b7d54(0x132)]?a29_0x496cfc['green']('(set,\x20length='+_0x529c41['accessKey'][_0x5b7d54(0x114)]+')'):a29_0x496cfc['gray'](_0x5b7d54(0x104)))),console[_0x5b7d54(0x12d)](),console[_0x5b7d54(0x12d)](a29_0x496cfc['bold'](_0x5b7d54(0xfe))),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x13f)[_0x5b7d54(0x11d)](0x1e))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x112)+getApiDomain()),console[_0x5b7d54(0x12d)](_0x5b7d54(0x145)+getUserDomain()),console[_0x5b7d54(0x12d)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x5b7d54(0x12d)](),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0x11f)](_0x5b7d54(0x113))),console['log'](a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x13f)[_0x5b7d54(0x11d)](0x1e)));const _0x90fdd8=inspectServiceRegistry();console['log'](_0x5b7d54(0x143)+_0x90fdd8['registryPath']),console[_0x5b7d54(0x12d)](_0x5b7d54(0x133)+formatServiceRegistryStatus(_0x90fdd8)),console['log'](_0x5b7d54(0x146)+_0x90fdd8[_0x5b7d54(0x125)]),console[_0x5b7d54(0x12d)](_0x5b7d54(0x10b)+_0x90fdd8[_0x5b7d54(0x135)]);for(const _0x10400e of _0x90fdd8[_0x5b7d54(0x109)]){console[_0x5b7d54(0x12d)]('\x20\x20'+(_0x10400e['serviceCode']+':')[_0x5b7d54(0x136)](0x11)+'\x20'+(_0x10400e[_0x5b7d54(0x121)]||a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x128)))+'\x20('+_0x10400e[_0x5b7d54(0x135)]+_0x5b7d54(0xfb)),console['log']('\x20\x20'+''['padEnd'](0x11)+_0x5b7d54(0x102)+_0x10400e[_0x5b7d54(0x122)][_0x5b7d54(0x129)]);}return console[_0x5b7d54(0x12d)](),console[_0x5b7d54(0x12d)](a29_0x496cfc['bold']('\x20\x20Auth')),console[_0x5b7d54(0x12d)](a29_0x496cfc[_0x5b7d54(0xfa)]('\x20\x20─'[_0x5b7d54(0x11d)](0x1e))),console[_0x5b7d54(0x12d)](_0x5b7d54(0x12b)+a29_0x496cfc[_0x5b7d54(0x14b)](AUTH_MODE[_0x5b7d54(0x14c)]+_0x5b7d54(0x12f))),console['log']('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x496cfc[_0x5b7d54(0xfa)](_0x5b7d54(0x14f))),console[_0x5b7d54(0x12d)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x140c49){const _0x405883=a29_0x44ef;if(_0x140c49['status']==='ok')return a29_0x496cfc[_0x405883(0x14b)](_0x405883(0x115));if(_0x140c49[_0x405883(0x11e)]===_0x405883(0x14a))return a29_0x496cfc[_0x405883(0xfa)]('(not\x20found)');if(_0x140c49['status']==='empty')return a29_0x496cfc['yellow'](_0x405883(0x144));return a29_0x496cfc[_0x405883(0x148)](_0x405883(0x149)+(_0x140c49['message']?':\x20'+_0x140c49['message']:''));}function a29_0x30a4(){const _0x438ca8=['\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','services','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','37623fcYthy','56JscgrB','⚠\x20Empty\x20(treated\x20as\x20{})','25515162SCaqlx','(not\x20found)','format','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','length','✓\x20Loaded','check','empty','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','doctor','4715004lXGwCN','\x20\x20Config\x20JSON','repeat','status','bold','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','name','source','\x20doctor','version','serviceCount','(default:\x20','currentApp','(unnamed)','path','\x20\x20auth\x20(effective):\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','log','env','\x20(accessKey)','platform','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','561676rfuMFt','commandCount','padEnd','defaultApp','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','1368120jovDVV','(missing)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20set)','(no\x20file)','\x20\x20─','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','yellow','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','red','✗\x20Invalid','missing','green','ClientAk','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','message','(removed\x20—\x20cookie\x20auth\x20disabled)','15192mFQocf','gray','\x20commands)','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','arch','\x20\x20API\x20Endpoints','4382yNSHjy','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','pageSize','\x20Imported\x20from:\x20','4968315mTENiq','(none)','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','Project'];a29_0x30a4=function(){return _0x438ca8;};return a29_0x30a4();}export const doctorDefinition={'service':a29_0x30feed(0x11a),'command':a29_0x30feed(0x116),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x3b1747=a30_0x5976;function a30_0x5976(_0xa72cd7,_0x15909f){_0xa72cd7=_0xa72cd7-0x7d;const _0x44de63=a30_0x44de();let _0x597626=_0x44de63[_0xa72cd7];return _0x597626;}(function(_0x59b5ae,_0x1b1b16){const _0x3e5f2e=a30_0x5976,_0x5e08e6=_0x59b5ae();while(!![]){try{const _0x418676=parseInt(_0x3e5f2e(0x9b))/0x1*(parseInt(_0x3e5f2e(0xa0))/0x2)+-parseInt(_0x3e5f2e(0x85))/0x3+-parseInt(_0x3e5f2e(0x90))/0x4+-parseInt(_0x3e5f2e(0x8f))/0x5+-parseInt(_0x3e5f2e(0x8a))/0x6+-parseInt(_0x3e5f2e(0x8d))/0x7+-parseInt(_0x3e5f2e(0x82))/0x8*(-parseInt(_0x3e5f2e(0x7d))/0x9);if(_0x418676===_0x1b1b16)break;else _0x5e08e6['push'](_0x5e08e6['shift']());}catch(_0x200b2b){_0x5e08e6['push'](_0x5e08e6['shift']());}}}(a30_0x44de,0x97685));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_0x3b1747(0x99),'type':'string','required':!![],'description':a30_0x3b1747(0x94)},FILEPATH_FLAG={'name':a30_0x3b1747(0x93),'type':a30_0x3b1747(0x83),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x3b1747(0xa1),'type':a30_0x3b1747(0x9a),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':'long-term','type':'boolean','description':'Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML'};function requireFilePath(_0x86a31d){const _0xe0bf09=a30_0x3b1747,_0x378d11=_0x86a31d[_0xe0bf09(0x9f)]();if(!_0x378d11)throw CliErrors[_0xe0bf09(0x81)](_0xe0bf09(0x80));return _0x378d11;}const fileUpload={'service':a30_0x3b1747(0x99),'command':'upload','description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':'read','flags':[FILE_FLAG],async 'dryRun'(_0x3e3713){const _0x3e6eed=a30_0x3b1747,_0x298d9f=requireRuntimeUploadFile(_0x3e3713[_0x3e6eed(0x98)](_0x3e6eed(0x99)),_0x3e6eed(0x89));return dryRun(_0x3e6eed(0x91),_0x3e6eed(0x96))[_0x3e6eed(0x8b)]({'appCode':_0x3e3713['appCode'],'multipart':{'file':_0x298d9f}})[_0x3e6eed(0x9e)](_0x3e6eed(0x92)+_0x298d9f[_0x3e6eed(0x95)]+_0x3e6eed(0x9c)+_0x3e3713[_0x3e6eed(0x9d)])[_0x3e6eed(0x86)]();},async 'execute'(_0x44f21c){const _0x4301c2=a30_0x3b1747,_0x514649=requireRuntimeUploadFile(_0x44f21c[_0x4301c2(0x98)]('file'),'File'),_0x25399d=await uploadRuntimeFile(_0x44f21c[_0x4301c2(0x9d)],_0x514649['path']);return{'ok':!![],'data':_0x25399d,'message':_0x25399d[_0x4301c2(0x8e)]?_0x4301c2(0x97)+_0x25399d['filePath']+_0x4301c2(0x8c):_0x4301c2(0x88)};}},fileQueryUrl={'service':a30_0x3b1747(0x99),'command':a30_0x3b1747(0x84),'description':a30_0x3b1747(0x87),'risk':a30_0x3b1747(0x7e),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x18d7f9){const _0xe3f3c1=a30_0x3b1747,_0x63e8ec=requireFilePath(_0x18d7f9[_0xe3f3c1(0x98)](_0xe3f3c1(0x93))),_0xa7dbd6=await queryRuntimeFileUrl(_0x63e8ec,{'download':_0x18d7f9[_0xe3f3c1(0x7f)](_0xe3f3c1(0xa1)),'longTerm':_0x18d7f9[_0xe3f3c1(0x7f)]('long-term')});return{'ok':!![],'data':_0xa7dbd6};}};function a30_0x44de(){const _0x3b7c8e=['\x20to\x20runtime\x20app\x20','appCode','description','trim','4390PcmnZg','download','27891TAoRvF','read','bool','filePath\x20is\x20required.','validation','10232YjvktL','string','query-url','843144JloqoE','build','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','File','6205470NNdAwT','body','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','7725431fzBpZD','filePath','2448490nbKeCb','2696348GCdCwm','POST','Preview:\x20upload\x20','filepath','Path\x20to\x20the\x20local\x20file\x20to\x20upload','path','/client/uploadFile','Uploaded\x20file:\x20','str','file','boolean','109opdzlD'];a30_0x44de=function(){return _0x3b7c8e;};return a30_0x44de();}export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ function a30_0x39d6(_0x48f860,_0x4b2966){_0x48f860=_0x48f860-0xc9;const _0x393644=a30_0x3936();let _0x39d646=_0x393644[_0x48f860];return _0x39d646;}const a30_0x4992df=a30_0x39d6;(function(_0x26d1b6,_0x5f32d4){const _0x56ad28=a30_0x39d6,_0x4d77c7=_0x26d1b6();while(!![]){try{const _0x1b0f65=parseInt(_0x56ad28(0xe4))/0x1+parseInt(_0x56ad28(0xde))/0x2+parseInt(_0x56ad28(0xd5))/0x3*(-parseInt(_0x56ad28(0xe1))/0x4)+-parseInt(_0x56ad28(0xdf))/0x5*(parseInt(_0x56ad28(0xc9))/0x6)+parseInt(_0x56ad28(0xe0))/0x7+parseInt(_0x56ad28(0xcc))/0x8*(parseInt(_0x56ad28(0xef))/0x9)+-parseInt(_0x56ad28(0xed))/0xa;if(_0x1b0f65===_0x5f32d4)break;else _0x4d77c7['push'](_0x4d77c7['shift']());}catch(_0x58b899){_0x4d77c7['push'](_0x4d77c7['shift']());}}}(a30_0x3936,0xf120a));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x3936(){const _0xd6790d=['Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','20348360VSeAqD','body','1125jEYHly','File','path','file','606xlVARz','filepath','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','118416pWIIyM','str','upload','download','trim','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','Uploaded\x20file:\x20','\x20to\x20runtime\x20app\x20','long-term','647916vPHNSs','build','validation','POST','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','read','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','bool','597210FVfhhl','36435fHcCNi','12560583rTIYBa','32hXdXVw','filePath','filePath\x20is\x20required.','1543033SdlhpB','/client/uploadFile','Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data','Preview:\x20upload\x20','query-url','appCode','boolean','string'];a30_0x3936=function(){return _0xd6790d;};return a30_0x3936();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x4992df(0xf2),'type':a30_0x4992df(0xeb),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a30_0x4992df(0xca),'type':a30_0x4992df(0xeb),'required':!![],'description':a30_0x4992df(0xe6)},DOWNLOAD_FLAG={'name':a30_0x4992df(0xcf),'type':a30_0x4992df(0xea),'description':a30_0x4992df(0xec)},LONG_TERM_FLAG={'name':a30_0x4992df(0xd4),'type':a30_0x4992df(0xea),'description':a30_0x4992df(0xd1)};function requireFilePath(_0x107ac1){const _0x573896=a30_0x4992df,_0x454aab=_0x107ac1[_0x573896(0xd0)]();if(!_0x454aab)throw CliErrors[_0x573896(0xd7)](_0x573896(0xe3));return _0x454aab;}const fileUpload={'service':'file','command':a30_0x4992df(0xce),'description':a30_0x4992df(0xdb),'risk':a30_0x4992df(0xda),'flags':[FILE_FLAG],async 'dryRun'(_0x42de15){const _0x4577a8=a30_0x4992df,_0xc99d8e=requireRuntimeUploadFile(_0x42de15[_0x4577a8(0xcd)](_0x4577a8(0xf2)),_0x4577a8(0xf0));return dryRun(_0x4577a8(0xd8),_0x4577a8(0xe5))[_0x4577a8(0xee)]({'appCode':_0x42de15['appCode'],'multipart':{'file':_0xc99d8e}})['description'](_0x4577a8(0xe7)+_0xc99d8e[_0x4577a8(0xf1)]+_0x4577a8(0xd3)+_0x42de15[_0x4577a8(0xe9)])[_0x4577a8(0xd6)]();},async 'execute'(_0x2986ed){const _0x20b67c=a30_0x4992df,_0x244fa7=requireRuntimeUploadFile(_0x2986ed['str'](_0x20b67c(0xf2)),'File'),_0x3beaf3=await uploadRuntimeFile(_0x2986ed[_0x20b67c(0xe9)],_0x244fa7[_0x20b67c(0xf1)]);return{'ok':!![],'data':_0x3beaf3,'message':_0x3beaf3[_0x20b67c(0xe2)]?_0x20b67c(0xd2)+_0x3beaf3[_0x20b67c(0xe2)]+_0x20b67c(0xdc):_0x20b67c(0xcb)};}},fileQueryUrl={'service':'file','command':a30_0x4992df(0xe8),'description':a30_0x4992df(0xd9),'risk':a30_0x4992df(0xda),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x483923){const _0x5d9ee2=a30_0x4992df,_0x3086fe=requireFilePath(_0x483923[_0x5d9ee2(0xcd)](_0x5d9ee2(0xca))),_0x213895=await queryRuntimeFileUrl(_0x3086fe,{'download':_0x483923[_0x5d9ee2(0xdd)](_0x5d9ee2(0xcf)),'longTerm':_0x483923['bool'](_0x5d9ee2(0xd4))});return{'ok':!![],'data':_0x213895};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x11f26a=a31_0x3800;(function(_0xdc09ed,_0x1b687c){const _0x4d7d85=a31_0x3800,_0x1a600d=_0xdc09ed();while(!![]){try{const _0x3cdaec=parseInt(_0x4d7d85(0x83))/0x1*(parseInt(_0x4d7d85(0xad))/0x2)+-parseInt(_0x4d7d85(0xa0))/0x3*(parseInt(_0x4d7d85(0x82))/0x4)+parseInt(_0x4d7d85(0xa8))/0x5*(parseInt(_0x4d7d85(0x9f))/0x6)+-parseInt(_0x4d7d85(0x8f))/0x7*(parseInt(_0x4d7d85(0x91))/0x8)+parseInt(_0x4d7d85(0x9d))/0x9*(parseInt(_0x4d7d85(0x9b))/0xa)+-parseInt(_0x4d7d85(0x86))/0xb+parseInt(_0x4d7d85(0x97))/0xc*(parseInt(_0x4d7d85(0x90))/0xd);if(_0x3cdaec===_0x1b687c)break;else _0x1a600d['push'](_0x1a600d['shift']());}catch(_0x593486){_0x1a600d['push'](_0x1a600d['shift']());}}}(a31_0x1924,0xe7101));import{existsSync,readFileSync}from'node:fs';function a31_0x3800(_0x16ab08,_0x1440fe){_0x16ab08=_0x16ab08-0x7e;const _0x19248d=a31_0x1924();let _0x380073=_0x19248d[_0x16ab08];return _0x380073;}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';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':a31_0x11f26a(0x80),'type':a31_0x11f26a(0x7f),'description':a31_0x11f26a(0x81),'required':!![]},{'name':a31_0x11f26a(0x96),'type':a31_0x11f26a(0x7f),'description':a31_0x11f26a(0x8c)},{'name':a31_0x11f26a(0x8b),'type':a31_0x11f26a(0x7f),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a31_0x11f26a(0x92)+PRODUCT_CONFIG['newConfigFileName']+a31_0x11f26a(0x93),'default':![]},{'name':a31_0x11f26a(0xab),'type':a31_0x11f26a(0x98),'description':a31_0x11f26a(0x85),'default':![]}];function a31_0x1924(){const _0x16b532=['12Hkvskz','boolean','parse','cwd','5090WHdEkM','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`.','9414NjFzRW','apps','12GvDmcP','21kpOqrW','log','Failed\x20to\x20parse\x20source\x20file:\x20','validation','Source\x20file\x20not\x20found:\x20','\x20\x20appcode:\x20','\x20\x20default:\x20','Imported\x20from\x20','907585XSPIrf','\x22.\x20Allowed:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','yes','includes','14788qWWKoT','defaultApp','string','file','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','1061524vROIHK','13HWeCwf','global','Skip\x20confirmation\x20when\x20overwriting','12784783BcoNLc','app','project','message','entries','env','Override\x20imported\x20default\x20appcode','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','\x20\x20config:\x20\x20','7266448rzkOWk','52167011oIHQLG','8GErSnN','Write\x20to\x20global\x20(~/',')\x20instead\x20of\x20project','riskLevel','object','appcode'];a31_0x1924=function(){return _0x16b532;};return a31_0x1924();}export async function runAppImport(_0x1f72ee){const _0x3d33fc=a31_0x11f26a,_0x154f7c=_0x1f72ee[_0x3d33fc(0x84)]?'global':_0x3d33fc(0x88),_0x50cec9=resolveWriteConfigPath(_0x154f7c);await runFromImport(_0x1f72ee,_0x50cec9);}async function runFromImport(_0x25c85f,_0x4f4299){const _0x241f5a=a31_0x11f26a,_0x5c3282=resolveFilePath(_0x25c85f[_0x241f5a(0x80)]);if(!existsSync(_0x5c3282))throw CliErrors[_0x241f5a(0xa3)](_0x241f5a(0xa4)+_0x5c3282);const _0x40a662=readSourceFile(_0x5c3282),_0x1072d9=convertToRuntimeConfig(_0x40a662);_0x25c85f[_0x241f5a(0x96)]&&(_0x1072d9[_0x241f5a(0x96)]=String(_0x25c85f[_0x241f5a(0x96)]));_0x25c85f['env']&&(_0x1072d9[_0x241f5a(0x8b)]=resolveImportEnv(_0x25c85f));if(!_0x1072d9[_0x241f5a(0x96)])throw CliErrors[_0x241f5a(0xa3)](_0x241f5a(0x8d),_0x241f5a(0x9c));await writeImportConfig(_0x4f4299,_0x1072d9,_0x25c85f),console[_0x241f5a(0xa1)](_0x241f5a(0xa7)+_0x5c3282),console[_0x241f5a(0xa1)](_0x241f5a(0x8e)+_0x4f4299),console['log'](_0x241f5a(0xa5)+_0x1072d9[_0x241f5a(0x96)]);if(_0x1072d9[_0x241f5a(0x7e)])console[_0x241f5a(0xa1)](_0x241f5a(0xa6)+_0x1072d9[_0x241f5a(0x7e)]);}function convertToRuntimeConfig(_0x1a3b28){const _0x3e641b=a31_0x11f26a;if(_0x1a3b28[_0x3e641b(0x9e)]&&typeof _0x1a3b28[_0x3e641b(0x9e)]===_0x3e641b(0x95))throw CliErrors[_0x3e641b(0xa3)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x3e641b(0xaa));const _0x9a756f={};for(const _0x35c40c of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1a3b28[_0x35c40c]!==undefined&&(_0x9a756f[_0x35c40c]=_0x1a3b28[_0x35c40c]);}return!_0x9a756f[_0x3e641b(0x94)]&&(_0x9a756f[_0x3e641b(0x94)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x9a756f;}async function writeImportConfig(_0x15925b,_0x216979,_0x207b91){const _0x6c0623=a31_0x11f26a;let _0x369be0={};existsSync(_0x15925b)&&!_0x207b91[_0x6c0623(0xab)]&&(_0x369be0=readConfigFile(_0x15925b));for(const [_0x421199,_0x4540ad]of Object[_0x6c0623(0x8a)](_0x216979)){_0x4540ad!==undefined&&(_0x369be0[_0x421199]=_0x4540ad);}if(_0x369be0[_0x6c0623(0x87)])delete _0x369be0[_0x6c0623(0x87)];writeConfigFile(_0x15925b,_0x369be0);}function resolveFilePath(_0x47299b){const _0x8525e1=a31_0x11f26a;return isAbsolute(_0x47299b)?_0x47299b:resolve(process[_0x8525e1(0x9a)](),_0x47299b);}function readSourceFile(_0x24d834){const _0x4b9311=a31_0x11f26a;try{const _0x2e80ab=readFileSync(_0x24d834,{'encoding':'utf8'});return JSON[_0x4b9311(0x99)](_0x2e80ab);}catch(_0x3634d3){throw CliErrors[_0x4b9311(0xa3)](_0x4b9311(0xa2)+_0x3634d3[_0x4b9311(0x89)]);}}function resolveImportEnv(_0x223634){const _0x53672e=a31_0x11f26a,_0x313170=_0x223634[_0x53672e(0x8b)];if(_0x313170===undefined||_0x313170==='')return DEFAULT_CONFIG_VALUES[_0x53672e(0x8b)];if(!RUNTIME_ENV_VALUES[_0x53672e(0xac)](_0x313170))throw CliErrors[_0x53672e(0xa3)]('Invalid\x20env\x20\x22'+_0x313170+_0x53672e(0xa9)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x313170;}
1
+ const a31_0x16c8f5=a31_0x1f74;(function(_0x356cd0,_0x2cc250){const _0x1ad0e1=a31_0x1f74,_0xd0b253=_0x356cd0();while(!![]){try{const _0x51dbb7=-parseInt(_0x1ad0e1(0xf6))/0x1+parseInt(_0x1ad0e1(0x112))/0x2*(-parseInt(_0x1ad0e1(0x11c))/0x3)+-parseInt(_0x1ad0e1(0x100))/0x4*(parseInt(_0x1ad0e1(0x116))/0x5)+parseInt(_0x1ad0e1(0x10e))/0x6*(-parseInt(_0x1ad0e1(0x109))/0x7)+-parseInt(_0x1ad0e1(0x113))/0x8+-parseInt(_0x1ad0e1(0x115))/0x9+parseInt(_0x1ad0e1(0xfe))/0xa;if(_0x51dbb7===_0x2cc250)break;else _0xd0b253['push'](_0xd0b253['shift']());}catch(_0x702f26){_0xd0b253['push'](_0xd0b253['shift']());}}}(a31_0xeb69,0xd38b4));import{existsSync,readFileSync}from'node:fs';function a31_0x1f74(_0x3c9f26,_0x1f43f3){_0x3c9f26=_0x3c9f26-0xf5;const _0xeb69f=a31_0xeb69();let _0x1f74d4=_0xeb69f[_0x3c9f26];return _0x1f74d4;}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';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':a31_0x16c8f5(0x119),'type':'string','description':a31_0x16c8f5(0x111),'required':!![]},{'name':'appcode','type':a31_0x16c8f5(0xfa),'description':a31_0x16c8f5(0x117)},{'name':a31_0x16c8f5(0x10f),'type':a31_0x16c8f5(0xfa),'description':a31_0x16c8f5(0x10b),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x16c8f5(0x110),'type':a31_0x16c8f5(0xf9),'description':a31_0x16c8f5(0x11e)+PRODUCT_CONFIG['newConfigFileName']+a31_0x16c8f5(0xfc),'default':![]},{'name':a31_0x16c8f5(0xf8),'type':a31_0x16c8f5(0xf9),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runAppImport(_0x24ee4f){const _0x5de54a=a31_0x16c8f5,_0x127535=_0x24ee4f[_0x5de54a(0x110)]?_0x5de54a(0x110):_0x5de54a(0x10a),_0x182778=resolveWriteConfigPath(_0x127535);await runFromImport(_0x24ee4f,_0x182778);}async function runFromImport(_0x332926,_0x409c14){const _0x33f543=a31_0x16c8f5,_0x215af6=resolveFilePath(_0x332926['file']);if(!existsSync(_0x215af6))throw CliErrors[_0x33f543(0xf5)](_0x33f543(0x103)+_0x215af6);const _0x516c04=readSourceFile(_0x215af6),_0x48ec7b=convertToRuntimeConfig(_0x516c04);_0x332926[_0x33f543(0x101)]&&(_0x48ec7b[_0x33f543(0x101)]=String(_0x332926[_0x33f543(0x101)]));_0x332926[_0x33f543(0x10f)]&&(_0x48ec7b[_0x33f543(0x10f)]=resolveImportEnv(_0x332926));if(!_0x48ec7b['appcode'])throw CliErrors[_0x33f543(0xf5)](_0x33f543(0xfb),_0x33f543(0x11a));await writeImportConfig(_0x409c14,_0x48ec7b,_0x332926),console[_0x33f543(0x11f)](_0x33f543(0x10c)+_0x215af6),console['log'](_0x33f543(0x11b)+_0x409c14),console[_0x33f543(0x11f)]('\x20\x20appcode:\x20'+_0x48ec7b[_0x33f543(0x101)]);if(_0x48ec7b[_0x33f543(0xff)])console[_0x33f543(0x11f)](_0x33f543(0x105)+_0x48ec7b[_0x33f543(0xff)]);}function convertToRuntimeConfig(_0xc9d0b4){const _0x58057b=a31_0x16c8f5;if(_0xc9d0b4[_0x58057b(0x122)]&&typeof _0xc9d0b4['apps']===_0x58057b(0x120))throw CliErrors['validation']('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x58057b(0x102));const _0x2ac4d0={};for(const _0x3e30a4 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xc9d0b4[_0x3e30a4]!==undefined&&(_0x2ac4d0[_0x3e30a4]=_0xc9d0b4[_0x3e30a4]);}return!_0x2ac4d0[_0x58057b(0x121)]&&(_0x2ac4d0[_0x58057b(0x121)]=DEFAULT_CONFIG_VALUES[_0x58057b(0x121)]),_0x2ac4d0;}async function writeImportConfig(_0x189ea1,_0xad1c6b,_0x34b308){const _0x5145e9=a31_0x16c8f5;let _0x37dc57={};existsSync(_0x189ea1)&&!_0x34b308[_0x5145e9(0xf8)]&&(_0x37dc57=readConfigFile(_0x189ea1));for(const [_0x3c2411,_0x107d91]of Object[_0x5145e9(0x114)](_0xad1c6b)){_0x107d91!==undefined&&(_0x37dc57[_0x3c2411]=_0x107d91);}if(_0x37dc57[_0x5145e9(0x11d)])delete _0x37dc57[_0x5145e9(0x11d)];writeConfigFile(_0x189ea1,_0x37dc57);}function resolveFilePath(_0x5d272a){const _0x850b61=a31_0x16c8f5;return isAbsolute(_0x5d272a)?_0x5d272a:resolve(process[_0x850b61(0x106)](),_0x5d272a);}function readSourceFile(_0x10b98b){const _0x40f66d=a31_0x16c8f5;try{const _0x239322=readFileSync(_0x10b98b,{'encoding':_0x40f66d(0xf7)});return JSON[_0x40f66d(0x107)](_0x239322);}catch(_0x373711){throw CliErrors['validation'](_0x40f66d(0xfd)+_0x373711[_0x40f66d(0x108)]);}}function a31_0xeb69(){const _0x4a1cbd=['1172836uPpTdm','4751784OanLyv','entries','8929062ZZVntN','385420VxHtMZ','Override\x20imported\x20default\x20appcode','\x22.\x20Allowed:\x20','file','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`.','\x20\x20config:\x20\x20','6gykkmt','app','Write\x20to\x20global\x20(~/','log','object','riskLevel','apps','validation','1067679jTrTrS','utf8','yes','boolean','string','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',')\x20instead\x20of\x20project','Failed\x20to\x20parse\x20source\x20file:\x20','52360200zlnPMF','defaultApp','20kyGraP','appcode','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Source\x20file\x20not\x20found:\x20','includes','\x20\x20default:\x20','cwd','parse','message','70PwxQaP','project','Override\x20imported\x20default\x20env','Imported\x20from\x20','Invalid\x20env\x20\x22','94506ZPHCUE','env','global','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path'];a31_0xeb69=function(){return _0x4a1cbd;};return a31_0xeb69();}function resolveImportEnv(_0x47e1ba){const _0x3ea17e=a31_0x16c8f5,_0x27f39e=_0x47e1ba['env'];if(_0x27f39e===undefined||_0x27f39e==='')return DEFAULT_CONFIG_VALUES[_0x3ea17e(0x10f)];if(!RUNTIME_ENV_VALUES[_0x3ea17e(0x104)](_0x27f39e))throw CliErrors[_0x3ea17e(0xf5)](_0x3ea17e(0x10d)+_0x27f39e+_0x3ea17e(0x118)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x27f39e;}
@@ -1 +1 @@
1
- const a32_0x2d4647=a32_0x5421;(function(_0x45cf81,_0x4c08cb){const _0x5b831f=a32_0x5421,_0x2230e2=_0x45cf81();while(!![]){try{const _0x2619c5=parseInt(_0x5b831f(0xf7))/0x1+-parseInt(_0x5b831f(0xf9))/0x2+-parseInt(_0x5b831f(0xd9))/0x3*(-parseInt(_0x5b831f(0xda))/0x4)+parseInt(_0x5b831f(0xd6))/0x5*(-parseInt(_0x5b831f(0xbd))/0x6)+-parseInt(_0x5b831f(0xe2))/0x7*(-parseInt(_0x5b831f(0xc4))/0x8)+parseInt(_0x5b831f(0xfc))/0x9+-parseInt(_0x5b831f(0xe8))/0xa;if(_0x2619c5===_0x4c08cb)break;else _0x2230e2['push'](_0x2230e2['shift']());}catch(_0x567979){_0x2230e2['push'](_0x2230e2['shift']());}}}(a32_0xcfe4,0xa377b));function a32_0xcfe4(){const _0x1f7bc9=['把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','/client/knowledge-base/personal/','isFinite','update','Personal\x20knowledge-base\x20entry\x20ID','updateTime','query','detail','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','metadata','433217MMSKYz','file','1236388pwXrth','build','ragErrorMessage','9152748wcIXeU','content','12OiCuaH','/update','appCode','File\x20path\x20is\x20required.','search','score','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','8AMKcgf','Updated\x20KB\x20entry\x20','根据本地文件更新个人知识库条目','trim','POST','title','number','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','docId','validation','topk','verbose','body','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','list','userId','File\x20is\x20not\x20a\x20regular\x20file:\x20','396920xwRcFL','create','num','1461fummSD','1820xototA','createTime','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','Search\x20query\x20is\x20required.','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','/client/knowledge-base/personal/create','length','scope','3833627nXAbcR','Personal\x20knowledge-base\x20entry\x20title','bool','string','weightedScore','read','7729100nyNnvG','description','File\x20not\x20found:\x20','根据本地文件创建个人知识库条目','str'];a32_0xcfe4=function(){return _0x1f7bc9;};return a32_0xcfe4();}import{existsSync,readFileSync,statSync}from'node:fs';function a32_0x5421(_0xed0c7d,_0x3abd1c){_0xed0c7d=_0xed0c7d-0xbd;const _0xcfe4c9=a32_0xcfe4();let _0x5421a3=_0xcfe4c9[_0xed0c7d];return _0x5421a3;}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_0x2d4647(0xc9),'type':a32_0x2d4647(0xe5),'required':!![],'description':a32_0x2d4647(0xe3)},FILE_FLAG={'name':a32_0x2d4647(0xf8),'type':'string','required':!![],'description':a32_0x2d4647(0xdc)},QUERY_FLAG={'name':a32_0x2d4647(0xf3),'type':a32_0x2d4647(0xe5),'required':!![],'description':a32_0x2d4647(0xde)},TOPK_FLAG={'name':'topk','type':a32_0x2d4647(0xca),'description':a32_0x2d4647(0xd2)};function readKnowledgeFile(_0x18f231){const _0x38cb8c=a32_0x2d4647;if(!_0x18f231)throw CliErrors['validation'](_0x38cb8c(0xc0));if(!existsSync(_0x18f231))throw CliErrors['validation'](_0x38cb8c(0xea)+_0x18f231);if(!statSync(_0x18f231)['isFile']())throw CliErrors[_0x38cb8c(0xcd)](_0x38cb8c(0xd5)+_0x18f231);return readFileSync(_0x18f231,'utf8');}function summarizePersonalItem(_0x3d058a){const _0x5c7f7b=a32_0x2d4647;return{'id':_0x3d058a['id'],'title':_0x3d058a[_0x5c7f7b(0xc9)],'version':_0x3d058a['version'],'ragStatus':_0x3d058a['ragStatus'],'ragErrorMessage':_0x3d058a[_0x5c7f7b(0xfb)],'updateTime':_0x3d058a['updateTime']};}function detailPersonalItem(_0x120558){const _0x480243=a32_0x2d4647;return{'id':_0x120558['id'],'appCode':_0x120558[_0x480243(0xbf)],'scope':_0x120558['scope'],'userId':_0x120558[_0x480243(0xd4)],'title':_0x120558[_0x480243(0xc9)],'content':_0x120558[_0x480243(0xfd)]??'','version':_0x120558['version'],'ragStatus':_0x120558['ragStatus'],'ragErrorMessage':_0x120558[_0x480243(0xfb)],'createTime':_0x120558[_0x480243(0xdb)],'updateTime':_0x120558[_0x480243(0xf2)]};}function summarizeSearchHit(_0x2d9424){const _0x55c4af=a32_0x2d4647;return{'scope':_0x2d9424[_0x55c4af(0xe1)],'title':_0x2d9424['title'],'docId':_0x2d9424[_0x55c4af(0xcc)],'score':_0x2d9424[_0x55c4af(0xc2)],'weightedScore':_0x2d9424[_0x55c4af(0xe6)],'content':_0x2d9424[_0x55c4af(0xfd)],'metadata':_0x2d9424[_0x55c4af(0xf6)]};}function readTopK(_0x71827c){const _0x58d779=a32_0x2d4647,_0x1bfb63=_0x71827c['flag'](_0x58d779(0xce));if(_0x1bfb63===undefined||_0x1bfb63===null||_0x1bfb63==='')return undefined;const _0x83eeae=_0x71827c[_0x58d779(0xd8)](_0x58d779(0xce));if(!Number[_0x58d779(0xef)](_0x83eeae)||_0x83eeae<0x1)throw CliErrors[_0x58d779(0xcd)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x83eeae;}const kbList={'service':'kb','command':a32_0x2d4647(0xd3),'description':a32_0x2d4647(0xc3),'risk':a32_0x2d4647(0xe7),'flags':[VERBOSE_FLAG],async 'execute'(_0x2f9f11){const _0x2eab53=a32_0x2d4647,_0x3f242a=await listPersonalKnowledgeBaseItems(_0x2f9f11[_0x2eab53(0xbf)]);if(_0x2f9f11[_0x2eab53(0xe4)](_0x2eab53(0xcf)))return{'ok':!![],'data':{'total':_0x3f242a['length'],'items':_0x3f242a}};return{'ok':!![],'data':{'total':_0x3f242a[_0x2eab53(0xe0)],'items':_0x3f242a['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x2d4647(0xf4),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a32_0x2d4647(0xf1)}],async 'execute'(_0xfd4f99){const _0x719be=a32_0x2d4647,_0x5ca12e=await getPersonalKnowledgeBaseItem(_0xfd4f99[_0x719be(0xd8)]('id'),_0xfd4f99[_0x719be(0xbf)]);return{'ok':!![],'data':detailPersonalItem(_0x5ca12e)};}},kbCreate={'service':'kb','command':a32_0x2d4647(0xd7),'description':a32_0x2d4647(0xeb),'risk':'write','confirmationDescription':a32_0x2d4647(0xed),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x4e5249){const _0x28245b=a32_0x2d4647,_0x5ad6e3=_0x4e5249[_0x28245b(0xec)](_0x28245b(0xc9)),_0x2a8c7a=readKnowledgeFile(_0x4e5249['str'](_0x28245b(0xf8))),_0x962f7d=await createPersonalKnowledgeBaseItem(_0x4e5249[_0x28245b(0xbf)],{'title':_0x5ad6e3,'content':_0x2a8c7a});return{'ok':!![],'data':summarizePersonalItem(_0x962f7d),'message':'Created\x20KB\x20entry\x20'+_0x962f7d['id']+'\x20('+_0x962f7d['title']+')'};},async 'dryRun'(_0x4364e8){const _0x3d7ddf=a32_0x2d4647,_0x272dd3=_0x4364e8[_0x3d7ddf(0xec)](_0x3d7ddf(0xc9)),_0x1309ca=readKnowledgeFile(_0x4364e8[_0x3d7ddf(0xec)](_0x3d7ddf(0xf8)));return dryRun(_0x3d7ddf(0xc8),_0x3d7ddf(0xdf))[_0x3d7ddf(0xd0)]({'appCode':_0x4364e8[_0x3d7ddf(0xbf)],'title':_0x272dd3,'content':_0x1309ca})[_0x3d7ddf(0xe9)]('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0x272dd3+'\x22')[_0x3d7ddf(0xfa)]();}},kbUpdate={'service':'kb','command':a32_0x2d4647(0xf0),'description':a32_0x2d4647(0xc6),'risk':'write','confirmationDescription':a32_0x2d4647(0xd1),'flags':[{...ID_FLAG,'description':a32_0x2d4647(0xf1)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x172160){const _0x3dfbaf=a32_0x2d4647,_0x3e4676=_0x172160['num']('id'),_0x3fcb48=readKnowledgeFile(_0x172160[_0x3dfbaf(0xec)](_0x3dfbaf(0xf8))),_0x1b8a9c=_0x172160[_0x3dfbaf(0xec)](_0x3dfbaf(0xc9))||(await getPersonalKnowledgeBaseItem(_0x3e4676,_0x172160[_0x3dfbaf(0xbf)]))['title'],_0x255237=await updatePersonalKnowledgeBaseItem(_0x3e4676,_0x172160[_0x3dfbaf(0xbf)],{'title':_0x1b8a9c,'content':_0x3fcb48});return{'ok':!![],'data':summarizePersonalItem(_0x255237),'message':_0x3dfbaf(0xc5)+_0x255237['id']+'\x20('+_0x255237[_0x3dfbaf(0xc9)]+')'};},async 'dryRun'(_0x2fbc06){const _0x5d349a=a32_0x2d4647,_0x4899ec=_0x2fbc06['num']('id'),_0x155ac3=readKnowledgeFile(_0x2fbc06[_0x5d349a(0xec)]('file')),_0x580bbe=_0x2fbc06[_0x5d349a(0xec)]('title')||(await getPersonalKnowledgeBaseItem(_0x4899ec,_0x2fbc06[_0x5d349a(0xbf)]))['title'];return dryRun(_0x5d349a(0xc8),_0x5d349a(0xee)+_0x4899ec+_0x5d349a(0xbe))[_0x5d349a(0xd0)]({'appCode':_0x2fbc06['appCode'],'title':_0x580bbe,'content':_0x155ac3})[_0x5d349a(0xe9)](_0x5d349a(0xf5)+_0x4899ec)[_0x5d349a(0xfa)]();}},kbSearch={'service':'kb','command':a32_0x2d4647(0xc1),'description':a32_0x2d4647(0xcb),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x444fbe){const _0x3c1fab=a32_0x2d4647;if(!_0x444fbe['str'](_0x3c1fab(0xf3))[_0x3c1fab(0xc7)]())throw CliErrors[_0x3c1fab(0xcd)](_0x3c1fab(0xdd));readTopK(_0x444fbe);},async 'execute'(_0x464ab8){const _0x5f4efe=a32_0x2d4647,_0x46647=_0x464ab8[_0x5f4efe(0xec)]('query')[_0x5f4efe(0xc7)](),_0x5b438e=readTopK(_0x464ab8),_0x36383c=await searchKnowledgeBase(_0x464ab8[_0x5f4efe(0xbf)],{'query':_0x46647,'topK':_0x5b438e});return{'ok':!![],'data':{'total':_0x36383c[_0x5f4efe(0xe0)],'hits':_0x36383c['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x424581=a32_0x4850;(function(_0x62594,_0x189363){const _0x33222d=a32_0x4850,_0x159d8b=_0x62594();while(!![]){try{const _0x2d4e45=parseInt(_0x33222d(0x10a))/0x1*(parseInt(_0x33222d(0x10b))/0x2)+-parseInt(_0x33222d(0x12b))/0x3+-parseInt(_0x33222d(0x101))/0x4+parseInt(_0x33222d(0x108))/0x5*(parseInt(_0x33222d(0x136))/0x6)+parseInt(_0x33222d(0x106))/0x7+parseInt(_0x33222d(0x12e))/0x8+-parseInt(_0x33222d(0xfc))/0x9*(-parseInt(_0x33222d(0x10d))/0xa);if(_0x2d4e45===_0x189363)break;else _0x159d8b['push'](_0x159d8b['shift']());}catch(_0x4fbda4){_0x159d8b['push'](_0x159d8b['shift']());}}}(a32_0x3db8,0x3eda1));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a32_0x3db8(){const _0x1797a5=['weightedScore','query','verbose','build','ragStatus','score','read','length','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','ragErrorMessage','bool','metadata','996270BNLCgx','create','update','511320pNKaRB','num','detail','Personal\x20knowledge-base\x20entry\x20ID','file','number','createTime','map','1891248htrSAb','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','File\x20not\x20found:\x20','根据本地文件创建个人知识库条目','Search\x20query\x20is\x20required.','body','Updated\x20KB\x20entry\x20','isFile','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','utf8','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','23346ztNSGs','/update','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','version','1625880LkXQQJ','updateTime','trim','Override\x20the\x20existing\x20entry\x20title','description','2998842LVNvdn','appCode','5dFIXMT','isFinite','56623cvylRE','4alEsiV','topk','290VcrXIa','title','Created\x20KB\x20entry\x20','str','POST','File\x20is\x20not\x20a\x20regular\x20file:\x20','content','/client/knowledge-base/personal/','--topk\x20must\x20be\x20a\x20positive\x20number.','search','Personal\x20knowledge-base\x20entry\x20title','scope','write','userId','flag','string','用本地文件内容替换个人知识库条目正文,并触发新的检索同步。','validation'];a32_0x3db8=function(){return _0x1797a5;};return a32_0x3db8();}const TITLE_FLAG={'name':'title','type':a32_0x424581(0x11c),'required':!![],'description':a32_0x424581(0x117)},FILE_FLAG={'name':'file','type':'string','required':!![],'description':a32_0x424581(0x127)},QUERY_FLAG={'name':'query','type':a32_0x424581(0x11c),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x424581(0x10c),'type':a32_0x424581(0x133),'description':a32_0x424581(0xfe)};function readKnowledgeFile(_0x392786){const _0x1f394f=a32_0x424581;if(!_0x392786)throw CliErrors[_0x1f394f(0x11e)]('File\x20path\x20is\x20required.');if(!existsSync(_0x392786))throw CliErrors[_0x1f394f(0x11e)](_0x1f394f(0x138)+_0x392786);if(!statSync(_0x392786)[_0x1f394f(0x13d)]())throw CliErrors[_0x1f394f(0x11e)](_0x1f394f(0x112)+_0x392786);return readFileSync(_0x392786,_0x1f394f(0x13f));}function summarizePersonalItem(_0x218307){const _0x5963d4=a32_0x424581;return{'id':_0x218307['id'],'title':_0x218307[_0x5963d4(0x10e)],'version':_0x218307[_0x5963d4(0x100)],'ragStatus':_0x218307[_0x5963d4(0x123)],'ragErrorMessage':_0x218307['ragErrorMessage'],'updateTime':_0x218307[_0x5963d4(0x102)]};}function detailPersonalItem(_0x3221e1){const _0x2ad8b2=a32_0x424581;return{'id':_0x3221e1['id'],'appCode':_0x3221e1['appCode'],'scope':_0x3221e1[_0x2ad8b2(0x118)],'userId':_0x3221e1[_0x2ad8b2(0x11a)],'title':_0x3221e1['title'],'content':_0x3221e1[_0x2ad8b2(0x113)]??'','version':_0x3221e1['version'],'ragStatus':_0x3221e1['ragStatus'],'ragErrorMessage':_0x3221e1[_0x2ad8b2(0x128)],'createTime':_0x3221e1[_0x2ad8b2(0x134)],'updateTime':_0x3221e1[_0x2ad8b2(0x102)]};}function summarizeSearchHit(_0x5baf0c){const _0x329847=a32_0x424581;return{'scope':_0x5baf0c['scope'],'title':_0x5baf0c[_0x329847(0x10e)],'docId':_0x5baf0c['docId'],'score':_0x5baf0c[_0x329847(0x124)],'weightedScore':_0x5baf0c[_0x329847(0x11f)],'content':_0x5baf0c[_0x329847(0x113)],'metadata':_0x5baf0c[_0x329847(0x12a)]};}function readTopK(_0x485577){const _0x4e73e1=a32_0x424581,_0x4bb581=_0x485577[_0x4e73e1(0x11b)](_0x4e73e1(0x10c));if(_0x4bb581===undefined||_0x4bb581===null||_0x4bb581==='')return undefined;const _0x4c1132=_0x485577[_0x4e73e1(0x12f)]('topk');if(!Number[_0x4e73e1(0x109)](_0x4c1132)||_0x4c1132<0x1)throw CliErrors[_0x4e73e1(0x11e)](_0x4e73e1(0x115));return _0x4c1132;}function a32_0x4850(_0x4452b3,_0xabb43e){_0x4452b3=_0x4452b3-0xfb;const _0x3db8e7=a32_0x3db8();let _0x48506b=_0x3db8e7[_0x4452b3];return _0x48506b;}const kbList={'service':'kb','command':'list','description':a32_0x424581(0xfb),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x12eaa7){const _0x1eae8e=a32_0x424581,_0x1253cc=await listPersonalKnowledgeBaseItems(_0x12eaa7['appCode']);if(_0x12eaa7[_0x1eae8e(0x129)](_0x1eae8e(0x121)))return{'ok':!![],'data':{'total':_0x1253cc[_0x1eae8e(0x126)],'items':_0x1253cc}};return{'ok':!![],'data':{'total':_0x1253cc[_0x1eae8e(0x126)],'items':_0x1253cc[_0x1eae8e(0x135)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x424581(0x130),'description':a32_0x424581(0x13e),'risk':a32_0x424581(0x125),'flags':[{...ID_FLAG,'description':a32_0x424581(0x131)}],async 'execute'(_0x3772d6){const _0x27dfb2=a32_0x424581,_0x48f1fc=await getPersonalKnowledgeBaseItem(_0x3772d6[_0x27dfb2(0x12f)]('id'),_0x3772d6[_0x27dfb2(0x107)]);return{'ok':!![],'data':detailPersonalItem(_0x48f1fc)};}},kbCreate={'service':'kb','command':a32_0x424581(0x12c),'description':a32_0x424581(0x139),'risk':a32_0x424581(0x119),'confirmationDescription':'把本地文件内容保存为个人知识库条目,并进入后续检索同步流程。','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5f1a8b){const _0xe68d66=a32_0x424581,_0x35da23=_0x5f1a8b[_0xe68d66(0x110)]('title'),_0x59843e=readKnowledgeFile(_0x5f1a8b[_0xe68d66(0x110)](_0xe68d66(0x132))),_0x5dd9ec=await createPersonalKnowledgeBaseItem(_0x5f1a8b['appCode'],{'title':_0x35da23,'content':_0x59843e});return{'ok':!![],'data':summarizePersonalItem(_0x5dd9ec),'message':_0xe68d66(0x10f)+_0x5dd9ec['id']+'\x20('+_0x5dd9ec['title']+')'};},async 'dryRun'(_0x54e5d3){const _0x279ae6=a32_0x424581,_0x230922=_0x54e5d3['str'](_0x279ae6(0x10e)),_0x5e8f05=readKnowledgeFile(_0x54e5d3['str']('file'));return dryRun(_0x279ae6(0x111),'/client/knowledge-base/personal/create')[_0x279ae6(0x13b)]({'appCode':_0x54e5d3['appCode'],'title':_0x230922,'content':_0x5e8f05})['description'](_0x279ae6(0xff)+_0x230922+'\x22')[_0x279ae6(0x122)]();}},kbUpdate={'service':'kb','command':a32_0x424581(0x12d),'description':'根据本地文件更新个人知识库条目','risk':'write','confirmationDescription':a32_0x424581(0x11d),'flags':[{...ID_FLAG,'description':a32_0x424581(0x131)},{...TITLE_FLAG,'required':![],'description':a32_0x424581(0x104)},FILE_FLAG],async 'execute'(_0x318432){const _0x31d00=a32_0x424581,_0x3ad468=_0x318432[_0x31d00(0x12f)]('id'),_0x2df288=readKnowledgeFile(_0x318432[_0x31d00(0x110)](_0x31d00(0x132))),_0xdb53b9=_0x318432['str'](_0x31d00(0x10e))||(await getPersonalKnowledgeBaseItem(_0x3ad468,_0x318432[_0x31d00(0x107)]))[_0x31d00(0x10e)],_0x57cd5d=await updatePersonalKnowledgeBaseItem(_0x3ad468,_0x318432[_0x31d00(0x107)],{'title':_0xdb53b9,'content':_0x2df288});return{'ok':!![],'data':summarizePersonalItem(_0x57cd5d),'message':_0x31d00(0x13c)+_0x57cd5d['id']+'\x20('+_0x57cd5d[_0x31d00(0x10e)]+')'};},async 'dryRun'(_0x3f5a11){const _0x587c85=a32_0x424581,_0x511232=_0x3f5a11[_0x587c85(0x12f)]('id'),_0x306b7e=readKnowledgeFile(_0x3f5a11[_0x587c85(0x110)](_0x587c85(0x132))),_0x237863=_0x3f5a11[_0x587c85(0x110)](_0x587c85(0x10e))||(await getPersonalKnowledgeBaseItem(_0x511232,_0x3f5a11[_0x587c85(0x107)]))[_0x587c85(0x10e)];return dryRun(_0x587c85(0x111),_0x587c85(0x114)+_0x511232+_0x587c85(0xfd))[_0x587c85(0x13b)]({'appCode':_0x3f5a11[_0x587c85(0x107)],'title':_0x237863,'content':_0x306b7e})[_0x587c85(0x105)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x511232)['build']();}},kbSearch={'service':'kb','command':a32_0x424581(0x116),'description':a32_0x424581(0x137),'risk':a32_0x424581(0x125),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x4f65a6){const _0x558501=a32_0x424581;if(!_0x4f65a6[_0x558501(0x110)](_0x558501(0x120))['trim']())throw CliErrors[_0x558501(0x11e)](_0x558501(0x13a));readTopK(_0x4f65a6);},async 'execute'(_0x18d024){const _0x46529f=a32_0x424581,_0x2e96b5=_0x18d024[_0x46529f(0x110)](_0x46529f(0x120))[_0x46529f(0x103)](),_0x46dff8=readTopK(_0x18d024),_0x573284=await searchKnowledgeBase(_0x18d024[_0x46529f(0x107)],{'query':_0x2e96b5,'topK':_0x46dff8});return{'ok':!![],'data':{'total':_0x573284[_0x46529f(0x126)],'hits':_0x573284[_0x46529f(0x135)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x1171d8=a33_0x340a;function a33_0x3d21(){const _0x25fc08=['\x20\x20\x20Time:\x20','750726phcKZY','message','forEach','将永久清空当前工作目录下的\x20Lovrabet\x20CLI\x20本地诊断日志;不会影响平台业务数据。','1710zkKpAy','*\x20No\x20logs\x20found','312dQRhcL','\x20logs:\x0a','409509TVHLTO','level','\x20\x20\x20Details:\x20','*\x20Logs\x20cleared','26719bOktBp','log','clear','2246656tZhixC','toLocaleString','277833DFlPJq','en-US','error','95ImoGNY','read','86436TDCmBb','readLogs','success','清除命令历史日志','28237ZHdOQT','keys','length','\x20\x20\x20Duration:\x20','4GXKZfP','details','command','show','timestamp','logs'];a33_0x3d21=function(){return _0x25fc08;};return a33_0x3d21();}(function(_0x382595,_0x46be1d){const _0x1dab54=a33_0x340a,_0x250a64=_0x382595();while(!![]){try{const _0xa0683b=parseInt(_0x1dab54(0x72))/0x1+parseInt(_0x1dab54(0x88))/0x2*(-parseInt(_0x1dab54(0x7b))/0x3)+parseInt(_0x1dab54(0x80))/0x4*(-parseInt(_0x1dab54(0x7e))/0x5)+-parseInt(_0x1dab54(0x70))/0x6*(parseInt(_0x1dab54(0x76))/0x7)+parseInt(_0x1dab54(0x79))/0x8+parseInt(_0x1dab54(0x8f))/0x9+parseInt(_0x1dab54(0x93))/0xa*(parseInt(_0x1dab54(0x84))/0xb);if(_0xa0683b===_0x46be1d)break;else _0x250a64['push'](_0x250a64['shift']());}catch(_0x3eb9ba){_0x250a64['push'](_0x250a64['shift']());}}}(a33_0x3d21,0x66283));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x21c4c0){const _0x3978d9=a33_0x340a;if(_0x21c4c0[_0x3978d9(0x86)]===0x0){console[_0x3978d9(0x77)](_0x3978d9(0x6f));return;}console[_0x3978d9(0x77)]('*\x20'+CLI_DISPLAY_NAME+_0x3978d9(0x71)),_0x21c4c0[_0x3978d9(0x91)]((_0x3bb833,_0x537d12)=>{const _0x3cb724=_0x3978d9,_0x1e349b=new Date(_0x3bb833[_0x3cb724(0x8c)])[_0x3cb724(0x7a)](_0x3cb724(0x7c)),_0x7761e=_0x3bb833['level']===_0x3cb724(0x82)?'√':_0x3bb833[_0x3cb724(0x73)]===_0x3cb724(0x7d)?'×':_0x3bb833['level']==='warn'?'!':'i';console['log'](_0x537d12+0x1+'.\x20'+_0x7761e+'\x20['+_0x3bb833[_0x3cb724(0x8a)]+']\x20'+_0x3bb833[_0x3cb724(0x90)]),console[_0x3cb724(0x77)](_0x3cb724(0x8e)+_0x1e349b),_0x3bb833['duration']&&console[_0x3cb724(0x77)](_0x3cb724(0x87)+_0x3bb833['duration']+'ms'),_0x3bb833[_0x3cb724(0x89)]&&Object[_0x3cb724(0x85)](_0x3bb833['details'])[_0x3cb724(0x86)]>0x0&&console['log'](_0x3cb724(0x74)+JSON['stringify'](_0x3bb833['details'],null,0x2)),console[_0x3cb724(0x77)]('');});}function a33_0x340a(_0x516e2a,_0x1a4b02){_0x516e2a=_0x516e2a-0x6f;const _0x3d212c=a33_0x3d21();let _0x340a45=_0x3d212c[_0x516e2a];return _0x340a45;}export const logsDefinitions=[{'service':'logs','command':a33_0x1171d8(0x8b),'description':'View\x20command\x20history\x20logs','risk':a33_0x1171d8(0x7f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3ee25d){const _0x383b6f=a33_0x1171d8;return printLogs(logger[_0x383b6f(0x81)]()),{'ok':!![]};}},{'service':a33_0x1171d8(0x8d),'command':a33_0x1171d8(0x78),'description':a33_0x1171d8(0x83),'risk':'write','confirmationDescription':a33_0x1171d8(0x92),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x19983b){const _0xfb946=a33_0x1171d8;return logger['clearLogs'](),console[_0xfb946(0x77)](_0xfb946(0x75)),{'ok':!![]};}}];
1
+ const a33_0x4ee9bc=a33_0x28ad;(function(_0x4fff13,_0x244911){const _0x472b6a=a33_0x28ad,_0x22b65b=_0x4fff13();while(!![]){try{const _0xa109b6=-parseInt(_0x472b6a(0xdf))/0x1+parseInt(_0x472b6a(0xf8))/0x2+parseInt(_0x472b6a(0xf6))/0x3*(-parseInt(_0x472b6a(0xe1))/0x4)+-parseInt(_0x472b6a(0xe3))/0x5*(-parseInt(_0x472b6a(0xf0))/0x6)+parseInt(_0x472b6a(0xf9))/0x7+-parseInt(_0x472b6a(0xea))/0x8*(-parseInt(_0x472b6a(0xde))/0x9)+parseInt(_0x472b6a(0xf2))/0xa*(parseInt(_0x472b6a(0xe0))/0xb);if(_0xa109b6===_0x244911)break;else _0x22b65b['push'](_0x22b65b['shift']());}catch(_0x2e65cb){_0x22b65b['push'](_0x22b65b['shift']());}}}(a33_0x5ba6,0xc9bfa));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x4d54e5){const _0x274736=a33_0x28ad;if(_0x4d54e5['length']===0x0){console[_0x274736(0xf3)](_0x274736(0xd5));return;}console[_0x274736(0xf3)]('*\x20'+CLI_DISPLAY_NAME+_0x274736(0xd9)),_0x4d54e5[_0x274736(0xee)]((_0x2f5202,_0x370531)=>{const _0xc7d100=_0x274736,_0x159e10=new Date(_0x2f5202[_0xc7d100(0xe6)])['toLocaleString'](_0xc7d100(0xdc)),_0x12bf02=_0x2f5202[_0xc7d100(0xe4)]===_0xc7d100(0xda)?'√':_0x2f5202['level']===_0xc7d100(0xfa)?'×':_0x2f5202['level']===_0xc7d100(0xe2)?'!':'i';console[_0xc7d100(0xf3)](_0x370531+0x1+'.\x20'+_0x12bf02+'\x20['+_0x2f5202['command']+']\x20'+_0x2f5202[_0xc7d100(0xf4)]),console['log'](_0xc7d100(0xf5)+_0x159e10),_0x2f5202['duration']&&console[_0xc7d100(0xf3)](_0xc7d100(0xd4)+_0x2f5202[_0xc7d100(0xe7)]+'ms'),_0x2f5202[_0xc7d100(0xd7)]&&Object['keys'](_0x2f5202[_0xc7d100(0xd7)])[_0xc7d100(0xef)]>0x0&&console['log'](_0xc7d100(0xd6)+JSON[_0xc7d100(0xd8)](_0x2f5202[_0xc7d100(0xd7)],null,0x2)),console[_0xc7d100(0xf3)]('');});}export const logsDefinitions=[{'service':a33_0x4ee9bc(0xf7),'command':a33_0x4ee9bc(0xe5),'description':a33_0x4ee9bc(0xe9),'risk':a33_0x4ee9bc(0xe8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x166041){const _0x5ecd59=a33_0x4ee9bc;return printLogs(logger[_0x5ecd59(0xdd)]()),{'ok':!![]};}},{'service':a33_0x4ee9bc(0xf7),'command':a33_0x4ee9bc(0xed),'description':'清除命令历史日志','risk':a33_0x4ee9bc(0xdb),'confirmationDescription':a33_0x4ee9bc(0xec),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1c7798){const _0x1dc003=a33_0x4ee9bc;return logger[_0x1dc003(0xeb)](),console[_0x1dc003(0xf3)](_0x1dc003(0xf1)),{'ok':!![]};}}];function a33_0x28ad(_0x413ba8,_0x319777){_0x413ba8=_0x413ba8-0xd4;const _0x5ba679=a33_0x5ba6();let _0x28ad27=_0x5ba679[_0x413ba8];return _0x28ad27;}function a33_0x5ba6(){const _0x37a8b3=['warn','61310ujPDMc','level','show','timestamp','duration','read','View\x20command\x20history\x20logs','16WbghSj','clearLogs','将永久清空当前工作目录下的\x20Lovrabet\x20CLI\x20本地诊断日志;不会影响平台业务数据。','clear','forEach','length','96XdJXQf','*\x20Logs\x20cleared','30paaBrV','log','message','\x20\x20\x20Time:\x20','355443FvxbMq','logs','1380534XEvCYf','7234332fzvblU','error','\x20\x20\x20Duration:\x20','*\x20No\x20logs\x20found','\x20\x20\x20Details:\x20','details','stringify','\x20logs:\x0a','success','write','en-US','readLogs','1340802MgsuZr','1636913DxGGLQ','4375184kJqgkB','32cAfsPF'];a33_0x5ba6=function(){return _0x37a8b3;};return a33_0x5ba6();}
@@ -1 +1 @@
1
- const a34_0x365baf=a34_0x390f;(function(_0x5aec4d,_0x261c63){const _0x23e3ec=a34_0x390f,_0x1c5b60=_0x5aec4d();while(!![]){try{const _0x38338b=-parseInt(_0x23e3ec(0xe2))/0x1+-parseInt(_0x23e3ec(0xdc))/0x2*(-parseInt(_0x23e3ec(0x10c))/0x3)+-parseInt(_0x23e3ec(0xf2))/0x4*(-parseInt(_0x23e3ec(0xd3))/0x5)+parseInt(_0x23e3ec(0xf0))/0x6+parseInt(_0x23e3ec(0x10a))/0x7*(parseInt(_0x23e3ec(0xf6))/0x8)+-parseInt(_0x23e3ec(0xf3))/0x9*(-parseInt(_0x23e3ec(0xfd))/0xa)+parseInt(_0x23e3ec(0xef))/0xb*(-parseInt(_0x23e3ec(0x108))/0xc);if(_0x38338b===_0x261c63)break;else _0x1c5b60['push'](_0x1c5b60['shift']());}catch(_0x536c10){_0x1c5b60['push'](_0x1c5b60['shift']());}}}(a34_0x206b,0xd0a2e));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_0x365baf(0xde),'general',a34_0x365baf(0xd4),a34_0x365baf(0xf8)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x365baf(0xe0),'general':a34_0x365baf(0xd5),'form':a34_0x365baf(0x102),'idCard':'IdCard'},SCENE_FLAG={'name':'scene','type':a34_0x365baf(0xd8),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a34_0x365baf(0xd2),'type':a34_0x365baf(0xd8),'description':a34_0x365baf(0x106)},IMAGE_URL_FLAG={'name':a34_0x365baf(0x104),'type':a34_0x365baf(0xd8),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x5b6819){const _0x46dbe4=a34_0x365baf,_0x2421c6=_0x5b6819[_0x46dbe4(0xee)]()[_0x46dbe4(0xe5)]();if(_0x2421c6===_0x46dbe4(0xe1))return _0x46dbe4(0xf8);if(_0x2421c6==='invoice'||_0x2421c6===_0x46dbe4(0xfb)||_0x2421c6===_0x46dbe4(0xd4))return _0x2421c6;throw CliErrors['validation'](_0x46dbe4(0xfe)+_0x5b6819+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x46dbe4(0x101)](',\x20'));}function selectedInputs(_0x4fd5a1){const _0xc4c3e9=a34_0x365baf,_0x1c434b=_0x4fd5a1[_0xc4c3e9(0xf7)]('image-file')[_0xc4c3e9(0xee)](),_0x425bde=_0x4fd5a1[_0xc4c3e9(0xf7)](_0xc4c3e9(0x104))[_0xc4c3e9(0xee)]();return{'imageFile':_0x1c434b,'imageUrl':_0x425bde,'count':[_0x1c434b,_0x425bde][_0xc4c3e9(0x10d)](Boolean)[_0xc4c3e9(0x100)]};}function a34_0x390f(_0x111a2a,_0x1225ed){_0x111a2a=_0x111a2a-0xd2;const _0x206bda=a34_0x206b();let _0x390ff7=_0x206bda[_0x111a2a];return _0x390ff7;}function validateInputSelection(_0x383396){const _0x4ec788=a34_0x365baf,_0x2d9b5a=selectedInputs(_0x383396);if(_0x2d9b5a[_0x4ec788(0xdf)]!==0x1)throw CliErrors[_0x4ec788(0xe7)](_0x4ec788(0xda));return _0x2d9b5a;}function a34_0x206b(){const _0x1f5279=['480571CsoFXP','\x20OCR\x20from\x20URL','3398874mHrLwo','filter','image-file','5906045PWSkzt','form','General','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','build','string','apiError','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','/client/queryFileUrl','2NuuFbU','File\x20URL\x20response\x20missing\x20fileUrl.','invoice','count','Invoice','idcard','21099HjshIm','path','File\x20upload\x20response\x20missing\x20filePath.','toLowerCase','使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','validation','\x20OCR','appCode','POST','description','fileName','/client/uploadFile','trim','152317fsRDNN','4396362roNNEk','body','4abtJok','18xXfWVA','ocr','imageFile','56XRPPRn','str','idCard','imageUrl','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','general','filePath','5434490eawElu','Unsupported\x20OCR\x20scene:\x20','fileUrl','length','join','Table','scene','image-url','<filePath\x20returned\x20by\x20/client/uploadFile>','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','read','3240JUrEmC','/client/ocr'];a34_0x206b=function(){return _0x1f5279;};return a34_0x206b();}function withScene(_0x4c5d49,_0x40c0fa,_0x2e3f4c){const _0x1a2f96=a34_0x365baf;return{..._0x4c5d49,'scene':_0x40c0fa,..._0x2e3f4c?{'sourceFile':{'fileName':_0x2e3f4c[_0x1a2f96(0xec)],'filePath':_0x2e3f4c[_0x1a2f96(0xfc)]}}:{}};}const ocrRecognize={'service':a34_0x365baf(0xf4),'command':'recognize','description':a34_0x365baf(0xe6),'risk':a34_0x365baf(0x107),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x36b34f){const _0x433a46=a34_0x365baf,_0x454ae8=normalizeScene(_0x36b34f['str'](_0x433a46(0x103))),_0x25825c=SCENE_TO_LEGACY_TYPE[_0x454ae8],_0x522ee2=validateInputSelection(_0x36b34f);if(_0x522ee2[_0x433a46(0xf9)])return dryRun(_0x433a46(0xea),'/client/ocr')[_0x433a46(0xf1)]({'appCode':_0x36b34f[_0x433a46(0xe9)],'url':_0x522ee2[_0x433a46(0xf9)],'type':_0x25825c})[_0x433a46(0xeb)]('Preview:\x20recognize\x20'+_0x454ae8+_0x433a46(0x10b))[_0x433a46(0xd7)]();const _0x29ccfd=requireRuntimeUploadFile(_0x522ee2[_0x433a46(0xf5)],_0x433a46(0xd2));return dryRun(_0x433a46(0xea),'/client/uploadFile')[_0x433a46(0xf1)]({'steps':[{'method':_0x433a46(0xea),'url':_0x433a46(0xed),'body':{'appCode':_0x36b34f['appCode'],'multipart':{'file':_0x29ccfd}}},{'method':_0x433a46(0xea),'url':_0x433a46(0xdb),'body':{'filePath':_0x433a46(0x105),'downloadFlag':![]}},{'method':'POST','url':_0x433a46(0x109),'body':{'appCode':_0x36b34f[_0x433a46(0xe9)],'url':_0x433a46(0xfa),'type':_0x25825c}}]})[_0x433a46(0xeb)](_0x433a46(0xd6)+_0x454ae8+_0x433a46(0xe8))['build']();},async 'execute'(_0x1c1ddb){const _0x462a4a=a34_0x365baf,_0x3e80af=normalizeScene(_0x1c1ddb[_0x462a4a(0xf7)](_0x462a4a(0x103))),_0x1fa4fb=SCENE_TO_LEGACY_TYPE[_0x3e80af],_0x3ef9c4=validateInputSelection(_0x1c1ddb);if(_0x3ef9c4[_0x462a4a(0xf9)]){const _0x3337e8=await recognizeRuntimeOcr(_0x1c1ddb[_0x462a4a(0xe9)],{'url':_0x3ef9c4[_0x462a4a(0xf9)],'type':_0x1fa4fb});return{'ok':!![],'data':withScene(_0x3337e8,_0x3e80af)};}const _0x1ea3c0=requireRuntimeUploadFile(_0x3ef9c4['imageFile'],'image-file'),_0x508545=await uploadRuntimeFile(_0x1c1ddb[_0x462a4a(0xe9)],_0x1ea3c0[_0x462a4a(0xe3)]);if(!_0x508545[_0x462a4a(0xfc)])throw CliErrors[_0x462a4a(0xd9)](_0x462a4a(0xe4));const _0x1a79f6=await queryRuntimeFileUrl(_0x508545['filePath'],{'download':![]});if(!_0x1a79f6[_0x462a4a(0xff)])throw CliErrors[_0x462a4a(0xd9)](_0x462a4a(0xdd));const _0x37321c=await recognizeRuntimeOcr(_0x1c1ddb[_0x462a4a(0xe9)],{'url':_0x1a79f6['fileUrl'],'type':_0x1fa4fb});return{'ok':!![],'data':withScene(_0x37321c,_0x3e80af,_0x508545)};}};export const ocrDefinitions=[ocrRecognize];
1
+ const a34_0x34017f=a34_0x1474;(function(_0x294d4b,_0x810234){const _0x1fc6dd=a34_0x1474,_0x46115a=_0x294d4b();while(!![]){try{const _0x138218=-parseInt(_0x1fc6dd(0x120))/0x1+-parseInt(_0x1fc6dd(0x10c))/0x2+parseInt(_0x1fc6dd(0x128))/0x3+parseInt(_0x1fc6dd(0x10a))/0x4+-parseInt(_0x1fc6dd(0x117))/0x5+parseInt(_0x1fc6dd(0x127))/0x6*(parseInt(_0x1fc6dd(0x114))/0x7)+parseInt(_0x1fc6dd(0x129))/0x8;if(_0x138218===_0x810234)break;else _0x46115a['push'](_0x46115a['shift']());}catch(_0x53aa48){_0x46115a['push'](_0x46115a['shift']());}}}(a34_0x1d95,0x4af39));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';function a34_0x1d95(){const _0x2ba560=['recognize','POST','/client/ocr','imageFile','filter','/client/uploadFile','imageUrl','1721064iuuqoB','invoice','322434EWxORj','scene','idCard','description','trim','path','validation','fileName','35EFeETP','Preview:\x20recognize\x20','使用运行态\x20OCR\x20服务识别\x20URL\x20或本地文件中的文字','2401325scdjLT','Publicly\x20accessible\x20image\x20or\x20file\x20URL','body','\x20OCR','appCode','idcard','read','build','General','290566AFTQGI','general','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','apiError','join','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','string','106878JZlOxx','616233KSBdMv','4114456cuhtbh','File\x20URL\x20response\x20missing\x20fileUrl.','fileUrl','\x20OCR\x20from\x20URL','Invoice','Table','.\x20Supported\x20scenes:\x20','File\x20upload\x20response\x20missing\x20filePath.','IdCard','toLowerCase','length','str','filePath','image-file','image-url','form'];a34_0x1d95=function(){return _0x2ba560;};return a34_0x1d95();}import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x34017f(0x10b),a34_0x34017f(0x121),a34_0x34017f(0x138),'idCard'],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x34017f(0x12d),'general':a34_0x34017f(0x11f),'form':a34_0x34017f(0x12e),'idCard':a34_0x34017f(0x131)},SCENE_FLAG={'name':a34_0x34017f(0x10d),'type':a34_0x34017f(0x126),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a34_0x34017f(0x136),'type':a34_0x34017f(0x126),'description':a34_0x34017f(0x125)},IMAGE_URL_FLAG={'name':a34_0x34017f(0x137),'type':'string','description':a34_0x34017f(0x118)};function normalizeScene(_0x2acbe9){const _0x469c16=a34_0x34017f,_0x29b7f3=_0x2acbe9[_0x469c16(0x110)]()[_0x469c16(0x132)]();if(_0x29b7f3===_0x469c16(0x11c))return _0x469c16(0x10e);if(_0x29b7f3===_0x469c16(0x10b)||_0x29b7f3==='general'||_0x29b7f3===_0x469c16(0x138))return _0x29b7f3;throw CliErrors[_0x469c16(0x112)]('Unsupported\x20OCR\x20scene:\x20'+_0x2acbe9+_0x469c16(0x12f)+SUPPORTED_SCENES[_0x469c16(0x124)](',\x20'));}function selectedInputs(_0x43c208){const _0x830be7=a34_0x34017f,_0x59de82=_0x43c208[_0x830be7(0x134)](_0x830be7(0x136))[_0x830be7(0x110)](),_0x24ff4c=_0x43c208[_0x830be7(0x134)](_0x830be7(0x137))[_0x830be7(0x110)]();return{'imageFile':_0x59de82,'imageUrl':_0x24ff4c,'count':[_0x59de82,_0x24ff4c][_0x830be7(0x13d)](Boolean)[_0x830be7(0x133)]};}function a34_0x1474(_0x1fb53a,_0x51d6af){_0x1fb53a=_0x1fb53a-0x108;const _0x1d952a=a34_0x1d95();let _0x1474d0=_0x1d952a[_0x1fb53a];return _0x1474d0;}function validateInputSelection(_0x1e48f0){const _0x2957dc=a34_0x34017f,_0x14c02a=selectedInputs(_0x1e48f0);if(_0x14c02a['count']!==0x1)throw CliErrors[_0x2957dc(0x112)](_0x2957dc(0x122));return _0x14c02a;}function withScene(_0x19a258,_0xb6226c,_0x53737f){const _0x4d6f75=a34_0x34017f;return{..._0x19a258,'scene':_0xb6226c,..._0x53737f?{'sourceFile':{'fileName':_0x53737f[_0x4d6f75(0x113)],'filePath':_0x53737f[_0x4d6f75(0x135)]}}:{}};}const ocrRecognize={'service':'ocr','command':a34_0x34017f(0x139),'description':a34_0x34017f(0x116),'risk':a34_0x34017f(0x11d),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x3a427a){const _0x29e3b4=a34_0x34017f,_0x176d22=normalizeScene(_0x3a427a[_0x29e3b4(0x134)](_0x29e3b4(0x10d))),_0x56d265=SCENE_TO_LEGACY_TYPE[_0x176d22],_0x52027a=validateInputSelection(_0x3a427a);if(_0x52027a[_0x29e3b4(0x109)])return dryRun(_0x29e3b4(0x13a),_0x29e3b4(0x13b))[_0x29e3b4(0x119)]({'appCode':_0x3a427a[_0x29e3b4(0x11b)],'url':_0x52027a['imageUrl'],'type':_0x56d265})[_0x29e3b4(0x10f)](_0x29e3b4(0x115)+_0x176d22+_0x29e3b4(0x12c))[_0x29e3b4(0x11e)]();const _0x17e8b2=requireRuntimeUploadFile(_0x52027a[_0x29e3b4(0x13c)],_0x29e3b4(0x136));return dryRun(_0x29e3b4(0x13a),_0x29e3b4(0x108))[_0x29e3b4(0x119)]({'steps':[{'method':_0x29e3b4(0x13a),'url':_0x29e3b4(0x108),'body':{'appCode':_0x3a427a[_0x29e3b4(0x11b)],'multipart':{'file':_0x17e8b2}}},{'method':'POST','url':'/client/queryFileUrl','body':{'filePath':'<filePath\x20returned\x20by\x20/client/uploadFile>','downloadFlag':![]}},{'method':_0x29e3b4(0x13a),'url':_0x29e3b4(0x13b),'body':{'appCode':_0x3a427a[_0x29e3b4(0x11b)],'url':'<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','type':_0x56d265}}]})['description']('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x176d22+_0x29e3b4(0x11a))['build']();},async 'execute'(_0x38982e){const _0x49d8b2=a34_0x34017f,_0x13d90d=normalizeScene(_0x38982e[_0x49d8b2(0x134)](_0x49d8b2(0x10d))),_0x1b4165=SCENE_TO_LEGACY_TYPE[_0x13d90d],_0x45cdd7=validateInputSelection(_0x38982e);if(_0x45cdd7[_0x49d8b2(0x109)]){const _0x1f8793=await recognizeRuntimeOcr(_0x38982e[_0x49d8b2(0x11b)],{'url':_0x45cdd7['imageUrl'],'type':_0x1b4165});return{'ok':!![],'data':withScene(_0x1f8793,_0x13d90d)};}const _0xae0c5a=requireRuntimeUploadFile(_0x45cdd7[_0x49d8b2(0x13c)],'image-file'),_0x1baa74=await uploadRuntimeFile(_0x38982e[_0x49d8b2(0x11b)],_0xae0c5a[_0x49d8b2(0x111)]);if(!_0x1baa74[_0x49d8b2(0x135)])throw CliErrors['apiError'](_0x49d8b2(0x130));const _0x1660bb=await queryRuntimeFileUrl(_0x1baa74[_0x49d8b2(0x135)],{'download':![]});if(!_0x1660bb[_0x49d8b2(0x12b)])throw CliErrors[_0x49d8b2(0x123)](_0x49d8b2(0x12a));const _0x475c0e=await recognizeRuntimeOcr(_0x38982e[_0x49d8b2(0x11b)],{'url':_0x1660bb[_0x49d8b2(0x12b)],'type':_0x1b4165});return{'ok':!![],'data':withScene(_0x475c0e,_0x13d90d,_0x1baa74)};}};export const ocrDefinitions=[ocrRecognize];
@@ -1 +1 @@
1
- const a35_0x2d05f7=a35_0x3453;(function(_0x2be189,_0x340386){const _0x409234=a35_0x3453,_0xab01dd=_0x2be189();while(!![]){try{const _0x387590=parseInt(_0x409234(0x15f))/0x1*(parseInt(_0x409234(0x164))/0x2)+parseInt(_0x409234(0x160))/0x3*(-parseInt(_0x409234(0x150))/0x4)+parseInt(_0x409234(0x161))/0x5*(-parseInt(_0x409234(0x12b))/0x6)+parseInt(_0x409234(0x139))/0x7*(-parseInt(_0x409234(0x165))/0x8)+-parseInt(_0x409234(0x14b))/0x9*(parseInt(_0x409234(0x15b))/0xa)+parseInt(_0x409234(0x156))/0xb*(-parseInt(_0x409234(0x15c))/0xc)+-parseInt(_0x409234(0x14f))/0xd*(-parseInt(_0x409234(0x125))/0xe);if(_0x387590===_0x340386)break;else _0xab01dd['push'](_0xab01dd['shift']());}catch(_0x422435){_0xab01dd['push'](_0xab01dd['shift']());}}}(a35_0x2c87,0x9a731));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x2d05f7(0x158),'type':a35_0x2d05f7(0x13f),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a35_0x2d05f7(0x147),'type':a35_0x2d05f7(0x13f),'required':!![],'description':a35_0x2d05f7(0x12f)},DESCRIPTION_FLAG={'name':a35_0x2d05f7(0x15e),'type':a35_0x2d05f7(0x13f),'description':a35_0x2d05f7(0x159)},SOURCE_SESSION_FLAG={'name':a35_0x2d05f7(0x14e),'type':'string','description':a35_0x2d05f7(0x162)};function normalizeFunctionName(_0x3fff79){const _0x4f7a62=a35_0x2d05f7,_0x33dad6=String(_0x3fff79||'')[_0x4f7a62(0x12d)]();if(!_0x33dad6||!FUNCTION_NAME_PATTERN[_0x4f7a62(0x148)](_0x33dad6))throw CliErrors[_0x4f7a62(0x11c)](_0x4f7a62(0x12a));return _0x33dad6;}function readScriptFile(_0x368cc1){const _0x4c72d1=a35_0x2d05f7;if(!_0x368cc1)throw CliErrors[_0x4c72d1(0x11c)](_0x4c72d1(0x157));if(!existsSync(_0x368cc1))throw CliErrors[_0x4c72d1(0x11c)](_0x4c72d1(0x135)+_0x368cc1);if(!statSync(_0x368cc1)[_0x4c72d1(0x142)]())throw CliErrors[_0x4c72d1(0x11c)](_0x4c72d1(0x15a)+_0x368cc1);const _0x5cc9b6=readFileSync(_0x368cc1,_0x4c72d1(0x143));if(!_0x5cc9b6['trim']())throw CliErrors[_0x4c72d1(0x11c)](_0x4c72d1(0x134));return _0x5cc9b6;}function optionalTrimmed(_0x3a6787){const _0x37b1cf=a35_0x2d05f7,_0x50ce0a=String(_0x3a6787||'')[_0x37b1cf(0x12d)]();return _0x50ce0a||undefined;}function summarizeBff(_0x2f653b){const _0x32f33c=a35_0x2d05f7;return{'id':_0x2f653b['id'],'appCode':_0x2f653b[_0x32f33c(0x11e)],'functionName':_0x2f653b['functionName'],'description':_0x2f653b[_0x32f33c(0x15e)],'scriptType':_0x2f653b[_0x32f33c(0x117)],'version':_0x2f653b[_0x32f33c(0x124)],'gmtModified':_0x2f653b[_0x32f33c(0x149)],'updateTime':_0x2f653b[_0x32f33c(0x13b)]};}function detailBff(_0x2ace30){const _0x3a3535=a35_0x2d05f7;return{'id':_0x2ace30['id'],'appCode':_0x2ace30[_0x3a3535(0x11e)],'functionName':_0x2ace30[_0x3a3535(0x154)],'description':_0x2ace30[_0x3a3535(0x15e)],'scriptType':_0x2ace30['scriptType'],'scriptContent':_0x2ace30[_0x3a3535(0x129)]??'','config':_0x2ace30[_0x3a3535(0x155)],'version':_0x2ace30['version'],'createUserId':_0x2ace30[_0x3a3535(0x12c)],'gmtCreate':_0x2ace30[_0x3a3535(0x120)],'gmtModified':_0x2ace30[_0x3a3535(0x149)],'createTime':_0x2ace30[_0x3a3535(0x138)],'updateTime':_0x2ace30['updateTime']};}function a35_0x3453(_0x5717e2,_0x152ccc){_0x5717e2=_0x5717e2-0x114;const _0x2c87dd=a35_0x2c87();let _0x3453c5=_0x2c87dd[_0x5717e2];return _0x3453c5;}function buildCreateInput(_0x56b26f){const _0xd0409e=a35_0x2d05f7;return{'functionName':normalizeFunctionName(_0x56b26f['str'](_0xd0409e(0x147))),...optionalTrimmed(_0x56b26f['str']('description'))?{'description':optionalTrimmed(_0x56b26f['str'](_0xd0409e(0x15e)))}:{},'scriptContent':readScriptFile(_0x56b26f['str'](_0xd0409e(0x158))),...optionalTrimmed(_0x56b26f[_0xd0409e(0x151)](_0xd0409e(0x14e)))?{'sourceSessionId':optionalTrimmed(_0x56b26f[_0xd0409e(0x151)](_0xd0409e(0x14e)))}:{}};}function a35_0x2c87(){const _0x1fad88=['length','Show\x20one\x20personal\x20BFF\x20by\x20id','create','Personal\x20BFF\x20script\x20file\x20is\x20blank.','File\x20not\x20found:\x20','keys','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','createTime','1102241MVtbEu','Preview:\x20create\x20personal\x20BFF\x20','updateTime','--params\x20must\x20be\x20a\x20JSON\x20object.','根据\x20ID\x20更新个人\x20BFF','read','string','sourceSessionId','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','isFile','utf8','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','write','detail','name','test','gmtModified','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','1694871AVEXxs','exec','isArray','source-session-id','923sONEfL','296GRdyDr','str','Updated\x20personal\x20BFF\x20','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','functionName','config','3773YIOQSA','File\x20path\x20is\x20required.','file','Personal\x20BFF\x20description','File\x20is\x20not\x20a\x20regular\x20file:\x20','50SmBEry','32292moGxmT','personal-bff','description','1FeBKBs','36516fETKHF','5XprqEy','Optional\x20source\x20RuntimeAgent\x20session\x20id','POST','624534xZvbDo','24SxZzSA','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','Created\x20personal\x20BFF\x20','Personal\x20BFF\x20script\x20ID','scriptType','params','flag','num','根据本地脚本文件创建个人\x20BFF','validation','high-risk-write','appCode','update','gmtCreate','body','/client/runtime-bff/personal/create','/client/runtime-bff/personal/','version','876400dcSXnh','verbose','build','list','scriptContent','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','5319102vMWVkT','createUserId','trim','/update','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','map'];a35_0x2c87=function(){return _0x1fad88;};return a35_0x2c87();}function buildUpdateInput(_0x5763e3){const _0x528b30=a35_0x2d05f7,_0x17beab={};optionalTrimmed(_0x5763e3[_0x528b30(0x151)](_0x528b30(0x147)))&&(_0x17beab[_0x528b30(0x154)]=normalizeFunctionName(_0x5763e3[_0x528b30(0x151)](_0x528b30(0x147))));_0x5763e3['flag'](_0x528b30(0x15e))!==undefined&&(_0x17beab[_0x528b30(0x15e)]=_0x5763e3[_0x528b30(0x151)](_0x528b30(0x15e)));optionalTrimmed(_0x5763e3[_0x528b30(0x151)](_0x528b30(0x158)))&&(_0x17beab['scriptContent']=readScriptFile(_0x5763e3[_0x528b30(0x151)](_0x528b30(0x158))));_0x5763e3[_0x528b30(0x119)](_0x528b30(0x14e))!==undefined&&(_0x17beab[_0x528b30(0x140)]=_0x5763e3[_0x528b30(0x151)](_0x528b30(0x14e)));if(Object[_0x528b30(0x136)](_0x17beab)['length']===0x0)throw CliErrors[_0x528b30(0x11c)](_0x528b30(0x14a));return _0x17beab;}function parseExecParams(_0x28e57f){const _0x8ebffe=a35_0x2d05f7,_0x26bf7d=parseJsonParams(_0x28e57f)??{};if(Array[_0x8ebffe(0x14d)](_0x26bf7d))throw CliErrors[_0x8ebffe(0x11c)](_0x8ebffe(0x13c));return _0x26bf7d;}const personalBffList={'service':a35_0x2d05f7(0x15d),'command':a35_0x2d05f7(0x128),'description':a35_0x2d05f7(0x141),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0xcae4cd){const _0x5997a2=a35_0x2d05f7,_0x2c6130=await listPersonalBffs(_0xcae4cd[_0x5997a2(0x11e)]);return{'ok':!![],'data':{'total':_0x2c6130[_0x5997a2(0x131)],'items':_0xcae4cd['bool'](_0x5997a2(0x126))?_0x2c6130:_0x2c6130[_0x5997a2(0x130)](summarizeBff)}};}},personalBffDetail={'service':a35_0x2d05f7(0x15d),'command':a35_0x2d05f7(0x146),'description':a35_0x2d05f7(0x132),'risk':a35_0x2d05f7(0x13e),'flags':[{...ID_FLAG,'description':a35_0x2d05f7(0x116)}],async 'execute'(_0x2f80c0){const _0x2bdad3=a35_0x2d05f7,_0x5ef316=await getPersonalBff(_0x2f80c0[_0x2bdad3(0x11a)]('id'),_0x2f80c0[_0x2bdad3(0x11e)]);return{'ok':!![],'data':detailBff(_0x5ef316)};}},personalBffCreate={'service':'personal-bff','command':a35_0x2d05f7(0x133),'description':a35_0x2d05f7(0x11b),'risk':a35_0x2d05f7(0x145),'confirmationDescription':a35_0x2d05f7(0x137),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x2b0292){const _0x37af0b=a35_0x2d05f7,_0x66987e=buildCreateInput(_0x2b0292),_0x279469=await createPersonalBff(_0x2b0292['appCode'],_0x66987e);return{'ok':!![],'data':detailBff(_0x279469),'message':_0x37af0b(0x115)+_0x279469['id']+(_0x279469[_0x37af0b(0x154)]?'\x20('+_0x279469[_0x37af0b(0x154)]+')':'')};},async 'dryRun'(_0x28d5e1){const _0x576c33=a35_0x2d05f7,_0x1d4a51=buildCreateInput(_0x28d5e1);return dryRun(_0x576c33(0x163),_0x576c33(0x122))[_0x576c33(0x121)]({'appCode':_0x28d5e1[_0x576c33(0x11e)],..._0x1d4a51})[_0x576c33(0x15e)](_0x576c33(0x13a)+_0x1d4a51[_0x576c33(0x154)])[_0x576c33(0x127)]();}},personalBffUpdate={'service':a35_0x2d05f7(0x15d),'command':a35_0x2d05f7(0x11f),'description':a35_0x2d05f7(0x13d),'risk':a35_0x2d05f7(0x145),'confirmationDescription':'更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x496c78){const _0xc4cf13=a35_0x2d05f7,_0x26ea8b=_0x496c78['num']('id'),_0x283c9e=buildUpdateInput(_0x496c78),_0xa8cb45=await updatePersonalBff(_0x26ea8b,_0x496c78[_0xc4cf13(0x11e)],_0x283c9e);return{'ok':!![],'data':detailBff(_0xa8cb45),'message':_0xc4cf13(0x152)+_0xa8cb45['id']+(_0xa8cb45['functionName']?'\x20('+_0xa8cb45[_0xc4cf13(0x154)]+')':'')};},async 'dryRun'(_0x55703f){const _0x553794=a35_0x2d05f7,_0x18116c=_0x55703f[_0x553794(0x11a)]('id'),_0x399feb=buildUpdateInput(_0x55703f);return dryRun(_0x553794(0x163),_0x553794(0x123)+_0x18116c+_0x553794(0x12e))[_0x553794(0x121)]({'appCode':_0x55703f['appCode'],..._0x399feb})[_0x553794(0x15e)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x18116c)[_0x553794(0x127)]();}},personalBffExec={'service':a35_0x2d05f7(0x15d),'command':a35_0x2d05f7(0x14c),'description':a35_0x2d05f7(0x114),'risk':a35_0x2d05f7(0x11d),'confirmationDescription':a35_0x2d05f7(0x144),'flags':[{...ID_FLAG,'description':a35_0x2d05f7(0x116)},{...PARAMS_FLAG,'description':a35_0x2d05f7(0x153)}],async 'validate'(_0x37f240){parseExecParams(_0x37f240['str']('params'));},async 'execute'(_0x1611b1){const _0x36cabd=a35_0x2d05f7,_0x5819fe=_0x1611b1['num']('id'),_0x25c68e=parseExecParams(_0x1611b1[_0x36cabd(0x151)](_0x36cabd(0x118))),_0x64d2fb=await executePersonalBff(_0x5819fe,_0x1611b1[_0x36cabd(0x11e)],_0x25c68e);return{'ok':!![],'data':{'result':_0x64d2fb},'message':'Executed\x20personal\x20BFF\x20'+_0x5819fe};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x58e976=a35_0x44e1;(function(_0x433d0d,_0x424bf6){const _0x4f4147=a35_0x44e1,_0xba8e67=_0x433d0d();while(!![]){try{const _0x59f632=parseInt(_0x4f4147(0x12a))/0x1*(-parseInt(_0x4f4147(0x15f))/0x2)+-parseInt(_0x4f4147(0x141))/0x3+-parseInt(_0x4f4147(0x16c))/0x4+parseInt(_0x4f4147(0x132))/0x5+-parseInt(_0x4f4147(0x162))/0x6*(parseInt(_0x4f4147(0x151))/0x7)+-parseInt(_0x4f4147(0x148))/0x8+-parseInt(_0x4f4147(0x131))/0x9*(-parseInt(_0x4f4147(0x169))/0xa);if(_0x59f632===_0x424bf6)break;else _0xba8e67['push'](_0xba8e67['shift']());}catch(_0x46d11e){_0xba8e67['push'](_0xba8e67['shift']());}}}(a35_0x5239,0xd1b17));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';function a35_0x44e1(_0xe9bce7,_0x258b95){_0xe9bce7=_0xe9bce7-0x126;const _0x523995=a35_0x5239();let _0x44e186=_0x523995[_0xe9bce7];return _0x44e186;}import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x58e976(0x15a),'type':a35_0x58e976(0x14a),'description':a35_0x58e976(0x168)},FUNCTION_NAME_FLAG={'name':a35_0x58e976(0x129),'type':'string','required':!![],'description':a35_0x58e976(0x136)},DESCRIPTION_FLAG={'name':'description','type':a35_0x58e976(0x14a),'description':a35_0x58e976(0x160)},SOURCE_SESSION_FLAG={'name':a35_0x58e976(0x12d),'type':a35_0x58e976(0x14a),'description':a35_0x58e976(0x137)};function normalizeFunctionName(_0x302939){const _0x5ded86=a35_0x58e976,_0x516100=String(_0x302939||'')[_0x5ded86(0x166)]();if(!_0x516100||!FUNCTION_NAME_PATTERN[_0x5ded86(0x15b)](_0x516100))throw CliErrors[_0x5ded86(0x147)](_0x5ded86(0x12e));return _0x516100;}function readScriptFile(_0x38c505){const _0x3d431a=a35_0x58e976;if(!_0x38c505)throw CliErrors['validation'](_0x3d431a(0x12f));if(!existsSync(_0x38c505))throw CliErrors[_0x3d431a(0x147)](_0x3d431a(0x149)+_0x38c505);if(!statSync(_0x38c505)[_0x3d431a(0x134)]())throw CliErrors[_0x3d431a(0x147)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x38c505);const _0x8feaf0=readFileSync(_0x38c505,'utf8');if(!_0x8feaf0[_0x3d431a(0x166)]())throw CliErrors[_0x3d431a(0x147)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x8feaf0;}function optionalTrimmed(_0x2efe4e){const _0x117ae9=a35_0x58e976,_0x324491=String(_0x2efe4e||'')[_0x117ae9(0x166)]();return _0x324491||undefined;}function summarizeBff(_0x284c02){const _0x56b8a0=a35_0x58e976;return{'id':_0x284c02['id'],'appCode':_0x284c02[_0x56b8a0(0x140)],'functionName':_0x284c02[_0x56b8a0(0x145)],'description':_0x284c02[_0x56b8a0(0x14b)],'scriptType':_0x284c02[_0x56b8a0(0x12b)],'version':_0x284c02['version'],'gmtModified':_0x284c02[_0x56b8a0(0x15e)],'updateTime':_0x284c02['updateTime']};}function detailBff(_0x3f4acc){const _0xe38d84=a35_0x58e976;return{'id':_0x3f4acc['id'],'appCode':_0x3f4acc[_0xe38d84(0x140)],'functionName':_0x3f4acc[_0xe38d84(0x145)],'description':_0x3f4acc[_0xe38d84(0x14b)],'scriptType':_0x3f4acc['scriptType'],'scriptContent':_0x3f4acc[_0xe38d84(0x130)]??'','config':_0x3f4acc[_0xe38d84(0x16a)],'version':_0x3f4acc[_0xe38d84(0x135)],'createUserId':_0x3f4acc[_0xe38d84(0x14e)],'gmtCreate':_0x3f4acc[_0xe38d84(0x139)],'gmtModified':_0x3f4acc[_0xe38d84(0x15e)],'createTime':_0x3f4acc[_0xe38d84(0x159)],'updateTime':_0x3f4acc[_0xe38d84(0x150)]};}function buildCreateInput(_0x382298){const _0x432e80=a35_0x58e976;return{'functionName':normalizeFunctionName(_0x382298[_0x432e80(0x13e)]('name')),...optionalTrimmed(_0x382298['str']('description'))?{'description':optionalTrimmed(_0x382298['str'](_0x432e80(0x14b)))}:{},'scriptContent':readScriptFile(_0x382298[_0x432e80(0x13e)](_0x432e80(0x15a))),...optionalTrimmed(_0x382298[_0x432e80(0x13e)](_0x432e80(0x12d)))?{'sourceSessionId':optionalTrimmed(_0x382298[_0x432e80(0x13e)](_0x432e80(0x12d)))}:{}};}function buildUpdateInput(_0x140ca7){const _0x58abe3=a35_0x58e976,_0x1fd28a={};optionalTrimmed(_0x140ca7[_0x58abe3(0x13e)](_0x58abe3(0x129)))&&(_0x1fd28a['functionName']=normalizeFunctionName(_0x140ca7['str']('name')));_0x140ca7[_0x58abe3(0x153)]('description')!==undefined&&(_0x1fd28a[_0x58abe3(0x14b)]=_0x140ca7[_0x58abe3(0x13e)](_0x58abe3(0x14b)));optionalTrimmed(_0x140ca7[_0x58abe3(0x13e)](_0x58abe3(0x15a)))&&(_0x1fd28a[_0x58abe3(0x130)]=readScriptFile(_0x140ca7[_0x58abe3(0x13e)]('file')));_0x140ca7[_0x58abe3(0x153)](_0x58abe3(0x12d))!==undefined&&(_0x1fd28a[_0x58abe3(0x15d)]=_0x140ca7[_0x58abe3(0x13e)](_0x58abe3(0x12d)));if(Object[_0x58abe3(0x13a)](_0x1fd28a)[_0x58abe3(0x13d)]===0x0)throw CliErrors[_0x58abe3(0x147)](_0x58abe3(0x157));return _0x1fd28a;}function parseExecParams(_0x1fbe19){const _0x1ba283=a35_0x58e976,_0x23f9e1=parseJsonParams(_0x1fbe19)??{};if(Array[_0x1ba283(0x12c)](_0x23f9e1))throw CliErrors[_0x1ba283(0x147)](_0x1ba283(0x14c));return _0x23f9e1;}const personalBffList={'service':a35_0x58e976(0x127),'command':'list','description':a35_0x58e976(0x152),'risk':a35_0x58e976(0x133),'flags':[VERBOSE_FLAG],async 'execute'(_0x15d420){const _0x1f4e22=a35_0x58e976,_0x4e2d09=await listPersonalBffs(_0x15d420[_0x1f4e22(0x140)]);return{'ok':!![],'data':{'total':_0x4e2d09['length'],'items':_0x15d420['bool'](_0x1f4e22(0x164))?_0x4e2d09:_0x4e2d09[_0x1f4e22(0x163)](summarizeBff)}};}},personalBffDetail={'service':a35_0x58e976(0x127),'command':a35_0x58e976(0x13f),'description':'Show\x20one\x20personal\x20BFF\x20by\x20id','risk':a35_0x58e976(0x133),'flags':[{...ID_FLAG,'description':a35_0x58e976(0x167)}],async 'execute'(_0x64604d){const _0x13229d=a35_0x58e976,_0x8d6a=await getPersonalBff(_0x64604d['num']('id'),_0x64604d[_0x13229d(0x140)]);return{'ok':!![],'data':detailBff(_0x8d6a)};}},personalBffCreate={'service':a35_0x58e976(0x127),'command':a35_0x58e976(0x154),'description':a35_0x58e976(0x14f),'risk':a35_0x58e976(0x155),'confirmationDescription':a35_0x58e976(0x156),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x4e19d8){const _0x42a14f=a35_0x58e976,_0x5daeb4=buildCreateInput(_0x4e19d8),_0x1ca938=await createPersonalBff(_0x4e19d8[_0x42a14f(0x140)],_0x5daeb4);return{'ok':!![],'data':detailBff(_0x1ca938),'message':_0x42a14f(0x13b)+_0x1ca938['id']+(_0x1ca938[_0x42a14f(0x145)]?'\x20('+_0x1ca938[_0x42a14f(0x145)]+')':'')};},async 'dryRun'(_0x2e85e4){const _0x1002db=a35_0x58e976,_0x37906a=buildCreateInput(_0x2e85e4);return dryRun(_0x1002db(0x16d),_0x1002db(0x14d))['body']({'appCode':_0x2e85e4[_0x1002db(0x140)],..._0x37906a})[_0x1002db(0x14b)]('Preview:\x20create\x20personal\x20BFF\x20'+_0x37906a['functionName'])[_0x1002db(0x128)]();}},personalBffUpdate={'service':a35_0x58e976(0x127),'command':a35_0x58e976(0x142),'description':a35_0x58e976(0x161),'risk':a35_0x58e976(0x155),'confirmationDescription':a35_0x58e976(0x16e),'flags':[{...ID_FLAG,'description':a35_0x58e976(0x167)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x1abdab){const _0x4a49e4=a35_0x58e976,_0x16eba2=_0x1abdab[_0x4a49e4(0x165)]('id'),_0x342d0c=buildUpdateInput(_0x1abdab),_0x3bc7e8=await updatePersonalBff(_0x16eba2,_0x1abdab['appCode'],_0x342d0c);return{'ok':!![],'data':detailBff(_0x3bc7e8),'message':_0x4a49e4(0x16f)+_0x3bc7e8['id']+(_0x3bc7e8[_0x4a49e4(0x145)]?'\x20('+_0x3bc7e8[_0x4a49e4(0x145)]+')':'')};},async 'dryRun'(_0x4563b4){const _0x57bc0e=a35_0x58e976,_0xf87979=_0x4563b4['num']('id'),_0x55db6c=buildUpdateInput(_0x4563b4);return dryRun('POST',_0x57bc0e(0x16b)+_0xf87979+_0x57bc0e(0x13c))[_0x57bc0e(0x138)]({'appCode':_0x4563b4[_0x57bc0e(0x140)],..._0x55db6c})[_0x57bc0e(0x14b)](_0x57bc0e(0x143)+_0xf87979)[_0x57bc0e(0x128)]();}},personalBffExec={'service':a35_0x58e976(0x127),'command':a35_0x58e976(0x146),'description':a35_0x58e976(0x158),'risk':'high-risk-write','confirmationDescription':a35_0x58e976(0x126),'flags':[{...ID_FLAG,'description':a35_0x58e976(0x167)},{...PARAMS_FLAG,'description':a35_0x58e976(0x15c)}],async 'validate'(_0x33eda7){const _0x270f15=a35_0x58e976;parseExecParams(_0x33eda7[_0x270f15(0x13e)](_0x270f15(0x144)));},async 'execute'(_0x226bc5){const _0x4b0267=a35_0x58e976,_0x2d146c=_0x226bc5['num']('id'),_0x2317a4=parseExecParams(_0x226bc5[_0x4b0267(0x13e)](_0x4b0267(0x144))),_0x21c37c=await executePersonalBff(_0x2d146c,_0x226bc5[_0x4b0267(0x140)],_0x2317a4);return{'ok':!![],'data':{'result':_0x21c37c},'message':'Executed\x20personal\x20BFF\x20'+_0x2d146c};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];function a35_0x5239(){const _0x47931e=['string','description','--params\x20must\x20be\x20a\x20JSON\x20object.','/client/runtime-bff/personal/create','createUserId','根据本地脚本文件创建个人\x20BFF','updateTime','126rebiBd','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','flag','create','write','把本地脚本保存为个人\x20BFF;之后可在当前应用中调用该脚本。','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','根据\x20ID\x20执行个人\x20BFF,并可传入\x20JSON\x20参数','createTime','file','test','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','sourceSessionId','gmtModified','246tyFkXH','Personal\x20BFF\x20description','根据\x20ID\x20更新个人\x20BFF','71382TrGPMZ','map','verbose','num','trim','Personal\x20BFF\x20script\x20ID','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','10NRsqmf','config','/client/runtime-bff/personal/','2026712FdFCWv','POST','更新个人\x20BFF\x20的脚本或元信息;之后的调用将使用新版本。','Updated\x20personal\x20BFF\x20','执行个人\x20BFF\x20脚本;脚本可能读取或修改业务数据,也可能调用外部服务。','personal-bff','build','name','7606ScLGiy','scriptType','isArray','source-session-id','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','File\x20path\x20is\x20required.','scriptContent','28215144GqvIuH','5685435GVIjrA','read','isFile','version','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','Optional\x20source\x20RuntimeAgent\x20session\x20id','body','gmtCreate','keys','Created\x20personal\x20BFF\x20','/update','length','str','detail','appCode','2795298MhZspB','update','Preview:\x20update\x20personal\x20BFF\x20','params','functionName','exec','validation','6600576hVYMip','File\x20not\x20found:\x20'];a35_0x5239=function(){return _0x47931e;};return a35_0x5239();}
@@ -1 +1 @@
1
- const a36_0x44acb6=a36_0x4187;(function(_0x5a2ac0,_0x142e36){const _0x3408a6=a36_0x4187,_0x27fe33=_0x5a2ac0();while(!![]){try{const _0x2caf9d=parseInt(_0x3408a6(0x86))/0x1+parseInt(_0x3408a6(0x9d))/0x2*(parseInt(_0x3408a6(0x84))/0x3)+-parseInt(_0x3408a6(0x9e))/0x4*(-parseInt(_0x3408a6(0xa0))/0x5)+parseInt(_0x3408a6(0x8a))/0x6*(-parseInt(_0x3408a6(0x87))/0x7)+-parseInt(_0x3408a6(0x90))/0x8*(-parseInt(_0x3408a6(0x97))/0x9)+parseInt(_0x3408a6(0x76))/0xa+-parseInt(_0x3408a6(0xa3))/0xb;if(_0x2caf9d===_0x142e36)break;else _0x27fe33['push'](_0x27fe33['shift']());}catch(_0x154fd5){_0x27fe33['push'](_0x27fe33['shift']());}}}(a36_0x2862,0x23c84));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';function a36_0x2862(){const _0x1f1be0=['`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','Runtime\x20App\x20Config','list','push','Agent\x20Schedules','133186lWgKFA','8UUfIjd','set','70255itTzZF','values','app\x20use','3939947SJEGjj','Self\x20Update','BFF\x20Scripts','command','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','app\x20init','API\x20Documentation','init','write','1322600dbTYVA','get','service','use','\x20\x20[high-risk-write]','isSingleCommand','Schema','Personal\x20BFF','app','has','login','from','Service\x20Tree','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','3BlrcMA','App\x20Management','289696HOQOjc','1414IirPeZ','defaultCommand','OCR','1488BHCVca','SQL\x20Queries','Logs','install','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','Authentication','305488zSZOdl','Workspace','run','read','Configuration','Knowledge\x20Base','map','9SEKKMD'];a36_0x2862=function(){return _0x1f1be0;};return a36_0x2862();}import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0xce294d){const _0x2d056e=a36_0x4187;for(const _0x23d0d1 of _0xce294d){definitions[_0x2d056e(0x9f)](_0x23d0d1['service']+':'+_0x23d0d1[_0x2d056e(0x70)],_0x23d0d1);let _0x14327f=serviceGroups[_0x2d056e(0x77)](_0x23d0d1[_0x2d056e(0x78)]);!_0x14327f&&(_0x14327f=[],serviceGroups[_0x2d056e(0x9f)](_0x23d0d1['service'],_0x14327f)),_0x14327f[_0x2d056e(0x9b)](_0x23d0d1);}}function registerService(_0x271338,_0x3aed76,_0x1989c2){const _0x4d6052=a36_0x4187;registerDefinitions(_0x3aed76);const _0x2a5b84=_0x2cf780=>_0x2cf780===_0x4d6052(0x93)?'':_0x2cf780===_0x4d6052(0x75)?'\x20\x20[write]':_0x4d6052(0x7a),_0x158544={'service':_0x3aed76[0x0][_0x4d6052(0x78)],'label':_0x271338,'commands':_0x3aed76[_0x4d6052(0x96)](_0x12f6b2=>({'command':_0x12f6b2[_0x4d6052(0x70)],'description':_0x12f6b2['description'],'tag':_0x2a5b84(_0x12f6b2['risk'])})),'defaultCommand':_0x1989c2?.[_0x4d6052(0x88)]??(_0x1989c2?.['isSingleCommand']?_0x3aed76[0x0][_0x4d6052(0x70)]:undefined),'isSingleCommand':_0x1989c2?.[_0x4d6052(0x7b)]};serviceRegistry['push'](_0x158544),serviceByName['set'](_0x158544['service'],_0x158544);}registerService(a36_0x44acb6(0x8f),authDefinitions,{'defaultCommand':a36_0x44acb6(0x80)}),registerService(a36_0x44acb6(0x85),appDefinitions,{'defaultCommand':a36_0x44acb6(0x9a)}),registerService(a36_0x44acb6(0x91),workspaceDefinitions),registerService(a36_0x44acb6(0x99),appConfigDefinitions),registerService(a36_0x44acb6(0x94),configDefinitions,{'defaultCommand':a36_0x44acb6(0x9a)}),registerService(a36_0x44acb6(0x73),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a36_0x44acb6(0x8b),sqlDefinitions),registerService(a36_0x44acb6(0x6f),bffDefinitions),registerService(a36_0x44acb6(0x7d),personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService('File',fileDefinitions),registerService(a36_0x44acb6(0x89),ocrDefinitions),registerService(a36_0x44acb6(0x95),kbDefinitions),registerService(a36_0x44acb6(0x9c),scheduleDefinitions,{'defaultCommand':'list'}),registerService(a36_0x44acb6(0x82),serviceDefinitions,{'defaultCommand':a36_0x44acb6(0x9a)}),registerService('Skills',skillDefinitions,{'defaultCommand':a36_0x44acb6(0x8d)}),registerService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a36_0x44acb6(0x8d)}),registerService(a36_0x44acb6(0x6e),[updateDefinition],{'defaultCommand':a36_0x44acb6(0x92),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x44acb6(0x7c),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x44acb6(0x8c),logsDefinitions,{'defaultCommand':'show'});function a36_0x4187(_0x479459,_0x24644c){_0x479459=_0x479459-0x6e;const _0x2862e6=a36_0x2862();let _0x41871a=_0x2862e6[_0x479459];return _0x41871a;}export function findDefinition(_0x21677c,_0x1608bb){const _0x3a9dcb=a36_0x44acb6;return definitions[_0x3a9dcb(0x77)](_0x21677c+':'+_0x1608bb);}export function resolveRemovedCommand(_0x213926,_0x3199b1){const _0x13aaa5=a36_0x44acb6;if(_0x213926===_0x13aaa5(0x7e)&&_0x3199b1===_0x13aaa5(0x74))return{'command':_0x13aaa5(0x72),'message':_0x13aaa5(0x83),'hint':_0x13aaa5(0x8e)};if(_0x213926===_0x13aaa5(0x7e)&&_0x3199b1===_0x13aaa5(0x79))return{'command':_0x13aaa5(0xa2),'message':_0x13aaa5(0x98),'hint':_0x13aaa5(0x71)};return undefined;}export function isKnownService(_0x2870ae){const _0x2e6279=a36_0x44acb6;return serviceByName[_0x2e6279(0x7f)](_0x2870ae);}export function getServiceEntry(_0xf89aac){return serviceByName['get'](_0xf89aac);}export function getAllDefinitions(){const _0x4fe79d=a36_0x44acb6;return Array[_0x4fe79d(0x81)](definitions[_0x4fe79d(0xa1)]());}
1
+ const a36_0x2e3f4e=a36_0x460a;(function(_0x13911e,_0x1c9116){const _0x27af4b=a36_0x460a,_0x50077b=_0x13911e();while(!![]){try{const _0xbd8dd3=parseInt(_0x27af4b(0x171))/0x1+-parseInt(_0x27af4b(0x18c))/0x2*(-parseInt(_0x27af4b(0x167))/0x3)+-parseInt(_0x27af4b(0x18d))/0x4*(parseInt(_0x27af4b(0x17b))/0x5)+-parseInt(_0x27af4b(0x169))/0x6*(parseInt(_0x27af4b(0x193))/0x7)+-parseInt(_0x27af4b(0x176))/0x8+parseInt(_0x27af4b(0x172))/0x9+-parseInt(_0x27af4b(0x170))/0xa*(-parseInt(_0x27af4b(0x175))/0xb);if(_0xbd8dd3===_0x1c9116)break;else _0x50077b['push'](_0x50077b['shift']());}catch(_0x3c0e1a){_0x50077b['push'](_0x50077b['shift']());}}}(a36_0x2b15,0x336a5));import{authDefinitions}from'../commands/auth/index.js';function a36_0x460a(_0xa0c15,_0x45592d){_0xa0c15=_0xa0c15-0x162;const _0x2b15ee=a36_0x2b15();let _0x460a23=_0x2b15ee[_0xa0c15];return _0x460a23;}import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';function a36_0x2b15(){const _0x37d693=['Diagnostics','use','service','login','`lovrabet\x20app\x20use`\x20has\x20been\x20removed.','set','Service\x20Tree','from','Use\x20`lovrabet\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Logs','App\x20Management','init','Instant\x20API','Agent\x20Schedules','47204yDJEEJ','124rAnvxH','Knowledge\x20Base','map','`lovrabet\x20app\x20init`\x20has\x20been\x20removed.','Self\x20Update','Skills','222551mtXEcP','list','values','\x20\x20[write]','Schema','File','app\x20init','show','isSingleCommand','read','get','SQL\x20Queries','36hUYsjZ','BFF\x20Scripts','78SVYIFc','run','push','Use\x20`lovrabet\x20workspace\x20init\x20--appcode\x20<code>`\x20instead.','defaultCommand','description','app\x20use','10qRZctK','241223GEUKJv','1267047fLeoMJ','command','install','5365910TzTZqi','936904wzdPSv','app','CLI\x20Built-in\x20Skill','OCR','write','66455QaJUmr','API\x20Documentation','Workspace'];a36_0x2b15=function(){return _0x37d693;};return a36_0x2b15();}import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{scheduleDefinitions}from'../commands/schedule/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x40ff01){const _0x89370b=a36_0x460a;for(const _0x5e29b1 of _0x40ff01){definitions['set'](_0x5e29b1[_0x89370b(0x180)]+':'+_0x5e29b1['command'],_0x5e29b1);let _0x8a5cff=serviceGroups[_0x89370b(0x165)](_0x5e29b1[_0x89370b(0x180)]);!_0x8a5cff&&(_0x8a5cff=[],serviceGroups[_0x89370b(0x183)](_0x5e29b1[_0x89370b(0x180)],_0x8a5cff)),_0x8a5cff[_0x89370b(0x16b)](_0x5e29b1);}}function registerService(_0x4cc896,_0x11d40c,_0x557512){const _0x1d12cb=a36_0x460a;registerDefinitions(_0x11d40c);const _0x289527=_0x290a51=>_0x290a51===_0x1d12cb(0x164)?'':_0x290a51===_0x1d12cb(0x17a)?_0x1d12cb(0x196):'\x20\x20[high-risk-write]',_0x31ebbe={'service':_0x11d40c[0x0][_0x1d12cb(0x180)],'label':_0x4cc896,'commands':_0x11d40c[_0x1d12cb(0x18f)](_0x41553b=>({'command':_0x41553b[_0x1d12cb(0x173)],'description':_0x41553b[_0x1d12cb(0x16e)],'tag':_0x289527(_0x41553b['risk'])})),'defaultCommand':_0x557512?.[_0x1d12cb(0x16d)]??(_0x557512?.[_0x1d12cb(0x163)]?_0x11d40c[0x0][_0x1d12cb(0x173)]:undefined),'isSingleCommand':_0x557512?.[_0x1d12cb(0x163)]};serviceRegistry[_0x1d12cb(0x16b)](_0x31ebbe),serviceByName[_0x1d12cb(0x183)](_0x31ebbe['service'],_0x31ebbe);}registerService('Authentication',authDefinitions,{'defaultCommand':a36_0x2e3f4e(0x181)}),registerService(a36_0x2e3f4e(0x188),appDefinitions,{'defaultCommand':a36_0x2e3f4e(0x194)}),registerService(a36_0x2e3f4e(0x17d),workspaceDefinitions),registerService('Runtime\x20App\x20Config',appConfigDefinitions),registerService('Configuration',configDefinitions,{'defaultCommand':a36_0x2e3f4e(0x194)}),registerService(a36_0x2e3f4e(0x17c),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService(a36_0x2e3f4e(0x18a),dataDefinitions),registerService(a36_0x2e3f4e(0x166),sqlDefinitions),registerService(a36_0x2e3f4e(0x168),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x2e3f4e(0x198),fileDefinitions),registerService(a36_0x2e3f4e(0x179),ocrDefinitions),registerService(a36_0x2e3f4e(0x18e),kbDefinitions),registerService(a36_0x2e3f4e(0x18b),scheduleDefinitions,{'defaultCommand':a36_0x2e3f4e(0x194)}),registerService(a36_0x2e3f4e(0x184),serviceDefinitions,{'defaultCommand':a36_0x2e3f4e(0x194)}),registerService(a36_0x2e3f4e(0x192),skillDefinitions,{'defaultCommand':a36_0x2e3f4e(0x174)}),registerService(a36_0x2e3f4e(0x178),cliSkillDefinitions,{'defaultCommand':a36_0x2e3f4e(0x174)}),registerService(a36_0x2e3f4e(0x191),[updateDefinition],{'defaultCommand':a36_0x2e3f4e(0x16a),'isSingleCommand':!![]}),registerService(a36_0x2e3f4e(0x17e),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x2e3f4e(0x197),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x2e3f4e(0x187),logsDefinitions,{'defaultCommand':a36_0x2e3f4e(0x162)});export function findDefinition(_0x256763,_0x14a117){const _0x5d757f=a36_0x2e3f4e;return definitions[_0x5d757f(0x165)](_0x256763+':'+_0x14a117);}export function resolveRemovedCommand(_0x4e3496,_0x3b05d9){const _0x2d4d70=a36_0x2e3f4e;if(_0x4e3496===_0x2d4d70(0x177)&&_0x3b05d9===_0x2d4d70(0x189))return{'command':_0x2d4d70(0x199),'message':_0x2d4d70(0x190),'hint':_0x2d4d70(0x16c)};if(_0x4e3496==='app'&&_0x3b05d9===_0x2d4d70(0x17f))return{'command':_0x2d4d70(0x16f),'message':_0x2d4d70(0x182),'hint':_0x2d4d70(0x186)};return undefined;}export function isKnownService(_0x1f5da1){return serviceByName['has'](_0x1f5da1);}export function getServiceEntry(_0x57fe42){const _0x4cf317=a36_0x2e3f4e;return serviceByName[_0x4cf317(0x165)](_0x57fe42);}export function getAllDefinitions(){const _0x1e75c8=a36_0x2e3f4e;return Array[_0x1e75c8(0x185)](definitions[_0x1e75c8(0x195)]());}
@@ -1 +1 @@
1
- const a37_0x55887b=a37_0x5d25;(function(_0x56f577,_0x55c33b){const _0xee403c=a37_0x5d25,_0x1593b5=_0x56f577();while(!![]){try{const _0x2af0e3=-parseInt(_0xee403c(0x1ab))/0x1*(-parseInt(_0xee403c(0x1ba))/0x2)+parseInt(_0xee403c(0x1c4))/0x3+parseInt(_0xee403c(0x1ae))/0x4*(-parseInt(_0xee403c(0x193))/0x5)+parseInt(_0xee403c(0x19e))/0x6+parseInt(_0xee403c(0x1c0))/0x7*(parseInt(_0xee403c(0x1b7))/0x8)+-parseInt(_0xee403c(0x18b))/0x9+-parseInt(_0xee403c(0x19f))/0xa;if(_0x2af0e3===_0x55c33b)break;else _0x1593b5['push'](_0x1593b5['shift']());}catch(_0x2cd59e){_0x1593b5['push'](_0x1593b5['shift']());}}}(a37_0xf0a7,0x260e6));function a37_0x5d25(_0x1303de,_0x541f70){_0x1303de=_0x1303de-0x182;const _0xf0a70=a37_0xf0a7();let _0x5d2563=_0xf0a70[_0x1303de];return _0x5d2563;}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':'string','required':!![],'enum':['CRON',a37_0x55887b(0x19b)],'description':a37_0x55887b(0x1c1)},CRON_FLAG={'name':a37_0x55887b(0x1bb),'type':'string','description':a37_0x55887b(0x190)},SCHEDULED_AT_FLAG={'name':a37_0x55887b(0x185),'type':'string','description':a37_0x55887b(0x1a0)},TITLE_FLAG={'name':'title','type':a37_0x55887b(0x1a2),'required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':a37_0x55887b(0x1ad),'type':'string','required':!![],'description':'Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs'},CHANNEL_FLAG={'name':a37_0x55887b(0x1ac),'type':'string','enum':[a37_0x55887b(0x1c7),a37_0x55887b(0x1a5)],'default':a37_0x55887b(0x1a5),'description':'Task\x20channel:\x20auto\x20or\x20premium'},SCHEDULE_ID_FLAG={'name':a37_0x55887b(0x1a4),'type':'string','required':!![],'description':a37_0x55887b(0x1be),'pattern':{'regex':SCHEDULE_ID_PATTERN,'description':'a\x20UUID\x20returned\x20by\x20schedule\x20create/list'}},LIMIT_FLAG={'name':a37_0x55887b(0x19c),'type':a37_0x55887b(0x1a6),'default':0x14,'description':a37_0x55887b(0x18c)},CURSOR_FLAG={'name':'cursor','type':a37_0x55887b(0x1a2),'description':a37_0x55887b(0x1b0)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function a37_0xf0a7(){const _0x3239c9=['body','run','--title\x20must\x20not\x20be\x20blank.','trim','214504AXwHtJ','Show\x20one\x20schedule\x20by\x20schedule\x20ID','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','166038dbNHPB','cron','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','num','Schedule\x20UUID','build','7rrrAwa','Schedule\x20kind:\x20CRON\x20or\x20ONCE','\x20schedule\x20','DELETE','922257UGutRY','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','appCode','auto','kind','UTC','Queued\x20Task\x20','scheduled-at','validation','description','Preview:\x20create\x20an\x20Agent\x20schedule','cursor','taskId','1363005pEBbKh','Page\x20size\x20from\x201\x20to\x20100','--prompt\x20must\x20not\x20be\x20blank.','high-risk-write','str','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','schedule','Created\x20','37165HrlzKq','Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','Preview:\x20run\x20schedule\x20','Preview:\x20delete\x20schedule\x20','删除定时任务并停止其后续触发','/schedules','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','read','ONCE','limit','/run','804180sgutfg','1621950NTtyoe','Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules','/api/harness/apps/','string','length','schedule-id','premium','number','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','立即运行一次定时任务并创建\x20Task','validate','\x20from\x20schedule\x20','1agHgcQ','channel','prompt','44PKIOdD','CRON','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','list','创建周期性或单次执行的\x20Agent\x20定时任务'];a37_0xf0a7=function(){return _0x3239c9;};return a37_0xf0a7();}function readScheduleInput(_0x169d1b){const _0x52ec7c=a37_0x55887b,_0x31c43a=_0x169d1b[_0x52ec7c(0x18f)](_0x52ec7c(0x182)),_0x14b7ae=_0x169d1b[_0x52ec7c(0x18f)]('title')[_0x52ec7c(0x1b6)](),_0x200163=_0x169d1b[_0x52ec7c(0x18f)]('prompt')[_0x52ec7c(0x1b6)](),_0x23e11f=_0x169d1b[_0x52ec7c(0x18f)](_0x52ec7c(0x1ac)),_0x1494db=_0x169d1b[_0x52ec7c(0x18f)]('cron'),_0x4b7767=_0x169d1b['str'](_0x52ec7c(0x185));if(!_0x14b7ae)throw CliErrors[_0x52ec7c(0x186)](_0x52ec7c(0x1b5));if(!_0x200163)throw CliErrors[_0x52ec7c(0x186)](_0x52ec7c(0x18d));if(_0x31c43a===_0x52ec7c(0x1af)){if(!_0x1494db||_0x4b7767)throw CliErrors['validation']('CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.');return{'kind':_0x31c43a,'timezone':_0x52ec7c(0x183),'cron':_0x1494db,'title':_0x14b7ae,'prompt':_0x200163,'channel':_0x23e11f};}if(_0x31c43a===_0x52ec7c(0x19b)){if(!_0x4b7767||_0x1494db)throw CliErrors[_0x52ec7c(0x186)]('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0x31c43a,'timezone':'UTC','scheduledAt':_0x4b7767,'title':_0x14b7ae,'prompt':_0x200163,'channel':_0x23e11f};}throw CliErrors[_0x52ec7c(0x186)](_0x52ec7c(0x1a7));}function scheduleCollectionPath(_0x64025e){const _0x4339c8=a37_0x55887b;return _0x4339c8(0x1a1)+encodeURIComponent(_0x64025e)+_0x4339c8(0x198);}function scheduleItemPath(_0x1ce830,_0x3cef46){return scheduleCollectionPath(_0x1ce830)+'/'+encodeURIComponent(_0x3cef46);}const scheduleValidate={'service':'schedule','command':a37_0x55887b(0x1a9),'description':a37_0x55887b(0x194),'risk':a37_0x55887b(0x19a),'flags':INPUT_FLAGS,async 'validate'(_0x3d9de2){readScheduleInput(_0x3d9de2);},async 'execute'(_0x1f2622){const _0x44620a=a37_0x55887b,_0x1e54a4=readScheduleInput(_0x1f2622),_0x1153b5=await validateRuntimeSchedule(_0x1f2622[_0x44620a(0x1c6)],_0x1e54a4);return{'ok':!![],'data':_0x1153b5,'message':'Schedule\x20input\x20is\x20valid'};}},scheduleCreate={'service':a37_0x55887b(0x191),'command':'create','description':a37_0x55887b(0x1b2),'risk':a37_0x55887b(0x18e),'confirmationDescription':'将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','flags':INPUT_FLAGS,async 'validate'(_0x8a9b59){readScheduleInput(_0x8a9b59);},async 'execute'(_0x17c1df){const _0xf44156=a37_0x55887b,_0x59fea7=readScheduleInput(_0x17c1df),_0x384898=await validateRuntimeSchedule(_0x17c1df[_0xf44156(0x1c6)],_0x59fea7),_0x5e4fb0=await createRuntimeSchedule(_0x17c1df['appCode'],_0x384898);return{'ok':!![],'data':_0x5e4fb0,'message':_0xf44156(0x192)+_0x5e4fb0[_0xf44156(0x182)]+_0xf44156(0x1c2)+_0x5e4fb0['scheduleId']};},async 'dryRun'(_0x21e2d1){const _0x29bf7e=a37_0x55887b,_0x40ac28=readScheduleInput(_0x21e2d1);return dryRun('POST',scheduleCollectionPath(_0x21e2d1[_0x29bf7e(0x1c6)]))[_0x29bf7e(0x1b3)](_0x40ac28)[_0x29bf7e(0x187)](_0x29bf7e(0x188))['build']();}},scheduleList={'service':'schedule','command':a37_0x55887b(0x1b1),'description':a37_0x55887b(0x199),'risk':a37_0x55887b(0x19a),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x129ceb){const _0xad69a5=a37_0x55887b,_0x4fc368=_0x129ceb[_0xad69a5(0x1bd)]('limit');if(!Number['isSafeInteger'](_0x4fc368)||_0x4fc368<0x1||_0x4fc368>0x64)throw CliErrors[_0xad69a5(0x186)](_0xad69a5(0x1bc));const _0x34a72c=_0x129ceb[_0xad69a5(0x18f)](_0xad69a5(0x189));if(_0x34a72c&&(_0x34a72c[_0xad69a5(0x1a3)]>0x400||_0x34a72c['trim']()!==_0x34a72c))throw CliErrors[_0xad69a5(0x186)](_0xad69a5(0x1c5));},async 'execute'(_0x230cc7){const _0x36e0db=a37_0x55887b,_0x4e83ec=_0x230cc7['str'](_0x36e0db(0x189)),_0x42a085=await listRuntimeSchedules(_0x230cc7[_0x36e0db(0x1c6)],{'limit':_0x230cc7[_0x36e0db(0x1bd)]('limit'),..._0x4e83ec?{'cursor':_0x4e83ec}:{}});return{'ok':!![],'data':_0x42a085};}},scheduleDetail={'service':'schedule','command':'detail','description':a37_0x55887b(0x1b8),'risk':a37_0x55887b(0x19a),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x25f783){const _0x5e5752=a37_0x55887b,_0x1d2af6=await getRuntimeSchedule(_0x25f783[_0x5e5752(0x1c6)],_0x25f783[_0x5e5752(0x18f)]('schedule-id'));return{'ok':!![],'data':_0x1d2af6};}},scheduleRun={'service':a37_0x55887b(0x191),'command':a37_0x55887b(0x1b4),'description':a37_0x55887b(0x1a8),'risk':a37_0x55887b(0x18e),'confirmationDescription':a37_0x55887b(0x1b9),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x104bfc){const _0x535731=a37_0x55887b,_0x28cce3=_0x104bfc[_0x535731(0x18f)]('schedule-id'),_0x17cd5b=await runRuntimeSchedule(_0x104bfc[_0x535731(0x1c6)],_0x28cce3);return{'ok':!![],'data':_0x17cd5b,'message':_0x535731(0x184)+_0x17cd5b[_0x535731(0x18a)]+_0x535731(0x1aa)+_0x28cce3};},async 'dryRun'(_0xa38fdc){const _0x1a4ccf=a37_0x55887b,_0x5cef6e=_0xa38fdc['str'](_0x1a4ccf(0x1a4));return dryRun('POST',scheduleItemPath(_0xa38fdc[_0x1a4ccf(0x1c6)],_0x5cef6e)+_0x1a4ccf(0x19d))['description'](_0x1a4ccf(0x195)+_0x5cef6e+'\x20immediately')[_0x1a4ccf(0x1bf)]();}},scheduleDelete={'service':a37_0x55887b(0x191),'command':'delete','description':a37_0x55887b(0x197),'risk':a37_0x55887b(0x18e),'confirmationDescription':'将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x43f4f3){const _0x3a05a1=a37_0x55887b,_0x4bbe8e=_0x43f4f3['str'](_0x3a05a1(0x1a4)),_0x4e3938=await deleteRuntimeSchedule(_0x43f4f3['appCode'],_0x4bbe8e);return{'ok':!![],'data':_0x4e3938,'message':'Deleted\x20schedule\x20'+_0x4bbe8e};},async 'dryRun'(_0x372993){const _0x1896b5=a37_0x55887b,_0x48413e=_0x372993[_0x1896b5(0x18f)]('schedule-id');return dryRun(_0x1896b5(0x1c3),scheduleItemPath(_0x372993[_0x1896b5(0x1c6)],_0x48413e))['description'](_0x1896b5(0x196)+_0x48413e)[_0x1896b5(0x1bf)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
1
+ const a37_0x1c8a09=a37_0x1284;(function(_0x2c26a0,_0x3f5414){const _0xa39b25=a37_0x1284,_0x5d2adc=_0x2c26a0();while(!![]){try{const _0x2cad4a=parseInt(_0xa39b25(0xa8))/0x1*(-parseInt(_0xa39b25(0xb6))/0x2)+parseInt(_0xa39b25(0xd2))/0x3+parseInt(_0xa39b25(0xc8))/0x4+parseInt(_0xa39b25(0xce))/0x5+-parseInt(_0xa39b25(0xc5))/0x6+parseInt(_0xa39b25(0xac))/0x7+parseInt(_0xa39b25(0xb5))/0x8*(-parseInt(_0xa39b25(0xa0))/0x9);if(_0x2cad4a===_0x3f5414)break;else _0x5d2adc['push'](_0x5d2adc['shift']());}catch(_0x26bffa){_0x5d2adc['push'](_0x5d2adc['shift']());}}}(a37_0x3e5e,0x81590));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_0x1284(_0xbbbc7b,_0x2a87aa){_0xbbbc7b=_0xbbbc7b-0x88;const _0x3e5e3d=a37_0x3e5e();let _0x1284ca=_0x3e5e3d[_0xbbbc7b];return _0x1284ca;}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_0x1c8a09(0xc7),'type':a37_0x1c8a09(0xb7),'required':!![],'enum':[a37_0x1c8a09(0xd4),a37_0x1c8a09(0xc4)],'description':a37_0x1c8a09(0x90)},CRON_FLAG={'name':a37_0x1c8a09(0x94),'type':'string','description':a37_0x1c8a09(0x9e)},SCHEDULED_AT_FLAG={'name':a37_0x1c8a09(0xcf),'type':a37_0x1c8a09(0xb7),'description':'Canonical\x20UTC\x20ISO\x20datetime\x20for\x20ONCE\x20schedules'},TITLE_FLAG={'name':a37_0x1c8a09(0xcd),'type':'string','required':!![],'description':'Schedule\x20title'},PROMPT_FLAG={'name':'prompt','type':a37_0x1c8a09(0xb7),'required':!![],'description':a37_0x1c8a09(0xb8)},CHANNEL_FLAG={'name':a37_0x1c8a09(0x8b),'type':'string','enum':[a37_0x1c8a09(0xc3),a37_0x1c8a09(0x91)],'default':a37_0x1c8a09(0x91),'description':a37_0x1c8a09(0xb9)},SCHEDULE_ID_FLAG={'name':a37_0x1c8a09(0xa6),'type':a37_0x1c8a09(0xb7),'required':!![],'description':'Schedule\x20UUID','pattern':{'regex':SCHEDULE_ID_PATTERN,'description':a37_0x1c8a09(0xaa)}},LIMIT_FLAG={'name':a37_0x1c8a09(0x9a),'type':a37_0x1c8a09(0xa1),'default':0x14,'description':a37_0x1c8a09(0x99)},CURSOR_FLAG={'name':a37_0x1c8a09(0xd0),'type':a37_0x1c8a09(0xb7),'description':a37_0x1c8a09(0xc1)},INPUT_FLAGS=[KIND_FLAG,CRON_FLAG,SCHEDULED_AT_FLAG,TITLE_FLAG,PROMPT_FLAG,CHANNEL_FLAG];function readScheduleInput(_0x283621){const _0x48188d=a37_0x1c8a09,_0xf2acc7=_0x283621[_0x48188d(0x93)](_0x48188d(0xc7)),_0xd42dcc=_0x283621[_0x48188d(0x93)]('title')[_0x48188d(0x88)](),_0x14150c=_0x283621[_0x48188d(0x93)]('prompt')['trim'](),_0x5c2902=_0x283621[_0x48188d(0x93)](_0x48188d(0x8b)),_0x9830c=_0x283621[_0x48188d(0x93)](_0x48188d(0x94)),_0x1d78b7=_0x283621[_0x48188d(0x93)]('scheduled-at');if(!_0xd42dcc)throw CliErrors[_0x48188d(0x96)](_0x48188d(0x9c));if(!_0x14150c)throw CliErrors[_0x48188d(0x96)](_0x48188d(0x9b));if(_0xf2acc7===_0x48188d(0xd4)){if(!_0x9830c||_0x1d78b7)throw CliErrors[_0x48188d(0x96)](_0x48188d(0x9f));return{'kind':_0xf2acc7,'timezone':'UTC','cron':_0x9830c,'title':_0xd42dcc,'prompt':_0x14150c,'channel':_0x5c2902};}if(_0xf2acc7===_0x48188d(0xc4)){if(!_0x1d78b7||_0x9830c)throw CliErrors[_0x48188d(0x96)]('ONCE\x20schedules\x20require\x20--scheduled-at\x20and\x20do\x20not\x20accept\x20--cron.');return{'kind':_0xf2acc7,'timezone':_0x48188d(0x9d),'scheduledAt':_0x1d78b7,'title':_0xd42dcc,'prompt':_0x14150c,'channel':_0x5c2902};}throw CliErrors['validation'](_0x48188d(0xc2));}function a37_0x3e5e(){const _0xd2fb31=['Prompt\x20sent\x20to\x20the\x20Agent\x20when\x20the\x20schedule\x20runs','Task\x20channel:\x20auto\x20or\x20premium','删除定时任务并停止其后续触发','build','Preview:\x20create\x20an\x20Agent\x20schedule','立即运行一次定时任务并创建\x20Task','Show\x20one\x20schedule\x20by\x20schedule\x20ID','List\x20current\x20user\x27s\x20schedules\x20for\x20the\x20current\x20app','num','Opaque\x20nextCursor\x20returned\x20by\x20the\x20previous\x20list\x20call','--kind\x20must\x20be\x20CRON\x20or\x20ONCE.','auto','ONCE','880338ifKcpA','high-risk-write','kind','2311268DezPrK','Queued\x20Task\x20','taskId','isSafeInteger','description','title','1312160uZWexS','scheduled-at','cursor','/run','2246754kvZBgC','将忽略原定触发时间,立即运行一次该定时任务并创建新的\x20Agent\x20Task。','CRON','DELETE','trim','Created\x20','schedule','channel','length','scheduleId','\x20from\x20schedule\x20','body','Schedule\x20kind:\x20CRON\x20or\x20ONCE','premium','--limit\x20must\x20be\x20an\x20integer\x20from\x201\x20to\x20100.','str','cron','将永久删除该定时任务并停止后续自动触发;已经创建的历史\x20Task\x20不受影响。','validation','POST','appCode','Page\x20size\x20from\x201\x20to\x20100','limit','--prompt\x20must\x20not\x20be\x20blank.','--title\x20must\x20not\x20be\x20blank.','UTC','Five-field\x20UTC\x20cron\x20expression\x20for\x20CRON\x20schedules','CRON\x20schedules\x20require\x20--cron\x20and\x20do\x20not\x20accept\x20--scheduled-at.','1818AAJWlS','number','Deleted\x20schedule\x20','将在当前应用中创建可自动触发\x20Agent\x20的定时任务;到达设定时间后会按任务内容创建并执行\x20Task。','Schedule\x20input\x20is\x20valid','list','schedule-id','\x20immediately','5HQklmR','run','a\x20UUID\x20returned\x20by\x20schedule\x20create/list','创建周期性或单次执行的\x20Agent\x20定时任务','473081PsSJnh','Preview:\x20delete\x20schedule\x20','validate','--cursor\x20must\x20be\x20the\x20unchanged\x20nextCursor\x20from\x20schedule\x20list.','/api/harness/apps/','delete','read','\x20schedule\x20','Preview:\x20run\x20schedule\x20','20176ilRrUz','188310SpzFbe','string'];a37_0x3e5e=function(){return _0xd2fb31;};return a37_0x3e5e();}function scheduleCollectionPath(_0x50732f){const _0x4b6fe6=a37_0x1c8a09;return _0x4b6fe6(0xb0)+encodeURIComponent(_0x50732f)+'/schedules';}function scheduleItemPath(_0x468a2e,_0x5efbc0){return scheduleCollectionPath(_0x468a2e)+'/'+encodeURIComponent(_0x5efbc0);}const scheduleValidate={'service':a37_0x1c8a09(0x8a),'command':a37_0x1c8a09(0xae),'description':'Validate\x20a\x20UTC\x20schedule\x20without\x20creating\x20it','risk':a37_0x1c8a09(0xb2),'flags':INPUT_FLAGS,async 'validate'(_0x549d08){readScheduleInput(_0x549d08);},async 'execute'(_0x4994c8){const _0x51e1e6=a37_0x1c8a09,_0x299955=readScheduleInput(_0x4994c8),_0x9cccc5=await validateRuntimeSchedule(_0x4994c8[_0x51e1e6(0x98)],_0x299955);return{'ok':!![],'data':_0x9cccc5,'message':_0x51e1e6(0xa4)};}},scheduleCreate={'service':a37_0x1c8a09(0x8a),'command':'create','description':a37_0x1c8a09(0xab),'risk':a37_0x1c8a09(0xc6),'confirmationDescription':a37_0x1c8a09(0xa3),'flags':INPUT_FLAGS,async 'validate'(_0x4eecf8){readScheduleInput(_0x4eecf8);},async 'execute'(_0x5171e1){const _0x34d836=a37_0x1c8a09,_0x15e600=readScheduleInput(_0x5171e1),_0x13d76e=await validateRuntimeSchedule(_0x5171e1['appCode'],_0x15e600),_0x36165a=await createRuntimeSchedule(_0x5171e1[_0x34d836(0x98)],_0x13d76e);return{'ok':!![],'data':_0x36165a,'message':_0x34d836(0x89)+_0x36165a[_0x34d836(0xc7)]+_0x34d836(0xb3)+_0x36165a[_0x34d836(0x8d)]};},async 'dryRun'(_0x4abae5){const _0x17b7c3=a37_0x1c8a09,_0x1e8893=readScheduleInput(_0x4abae5);return dryRun(_0x17b7c3(0x97),scheduleCollectionPath(_0x4abae5[_0x17b7c3(0x98)]))[_0x17b7c3(0x8f)](_0x1e8893)['description'](_0x17b7c3(0xbc))['build']();}},scheduleList={'service':a37_0x1c8a09(0x8a),'command':a37_0x1c8a09(0xa5),'description':a37_0x1c8a09(0xbf),'risk':a37_0x1c8a09(0xb2),'flags':[LIMIT_FLAG,CURSOR_FLAG],async 'validate'(_0x1bfc7f){const _0xae9091=a37_0x1c8a09,_0x3ed324=_0x1bfc7f[_0xae9091(0xc0)](_0xae9091(0x9a));if(!Number[_0xae9091(0xcb)](_0x3ed324)||_0x3ed324<0x1||_0x3ed324>0x64)throw CliErrors[_0xae9091(0x96)](_0xae9091(0x92));const _0x53af09=_0x1bfc7f[_0xae9091(0x93)]('cursor');if(_0x53af09&&(_0x53af09[_0xae9091(0x8c)]>0x400||_0x53af09[_0xae9091(0x88)]()!==_0x53af09))throw CliErrors[_0xae9091(0x96)](_0xae9091(0xaf));},async 'execute'(_0x44c0fb){const _0x4cef56=a37_0x1c8a09,_0x53f6db=_0x44c0fb[_0x4cef56(0x93)]('cursor'),_0x2c256f=await listRuntimeSchedules(_0x44c0fb['appCode'],{'limit':_0x44c0fb[_0x4cef56(0xc0)]('limit'),..._0x53f6db?{'cursor':_0x53f6db}:{}});return{'ok':!![],'data':_0x2c256f};}},scheduleDetail={'service':a37_0x1c8a09(0x8a),'command':'detail','description':a37_0x1c8a09(0xbe),'risk':a37_0x1c8a09(0xb2),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x57b8ce){const _0x4b4460=a37_0x1c8a09,_0x342a77=await getRuntimeSchedule(_0x57b8ce[_0x4b4460(0x98)],_0x57b8ce[_0x4b4460(0x93)](_0x4b4460(0xa6)));return{'ok':!![],'data':_0x342a77};}},scheduleRun={'service':a37_0x1c8a09(0x8a),'command':a37_0x1c8a09(0xa9),'description':a37_0x1c8a09(0xbd),'risk':'high-risk-write','confirmationDescription':a37_0x1c8a09(0xd3),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x1f55d8){const _0x5f17c9=a37_0x1c8a09,_0x5e4216=_0x1f55d8[_0x5f17c9(0x93)]('schedule-id'),_0x2ffb61=await runRuntimeSchedule(_0x1f55d8['appCode'],_0x5e4216);return{'ok':!![],'data':_0x2ffb61,'message':_0x5f17c9(0xc9)+_0x2ffb61[_0x5f17c9(0xca)]+_0x5f17c9(0x8e)+_0x5e4216};},async 'dryRun'(_0x4fba59){const _0x543f9f=a37_0x1c8a09,_0x4041d1=_0x4fba59[_0x543f9f(0x93)](_0x543f9f(0xa6));return dryRun('POST',scheduleItemPath(_0x4fba59[_0x543f9f(0x98)],_0x4041d1)+_0x543f9f(0xd1))[_0x543f9f(0xcc)](_0x543f9f(0xb4)+_0x4041d1+_0x543f9f(0xa7))[_0x543f9f(0xbb)]();}},scheduleDelete={'service':'schedule','command':a37_0x1c8a09(0xb1),'description':a37_0x1c8a09(0xba),'risk':a37_0x1c8a09(0xc6),'confirmationDescription':a37_0x1c8a09(0x95),'flags':[SCHEDULE_ID_FLAG],async 'execute'(_0x92b4f7){const _0x4fd082=a37_0x1c8a09,_0x289241=_0x92b4f7[_0x4fd082(0x93)](_0x4fd082(0xa6)),_0x54174f=await deleteRuntimeSchedule(_0x92b4f7[_0x4fd082(0x98)],_0x289241);return{'ok':!![],'data':_0x54174f,'message':_0x4fd082(0xa2)+_0x289241};},async 'dryRun'(_0x47e8d2){const _0x4cade8=a37_0x1c8a09,_0x2712a8=_0x47e8d2[_0x4cade8(0x93)](_0x4cade8(0xa6));return dryRun(_0x4cade8(0xd5),scheduleItemPath(_0x47e8d2[_0x4cade8(0x98)],_0x2712a8))[_0x4cade8(0xcc)](_0x4cade8(0xad)+_0x2712a8)[_0x4cade8(0xbb)]();}};export const scheduleDefinitions=[scheduleValidate,scheduleCreate,scheduleList,scheduleDetail,scheduleRun,scheduleDelete];
@@ -1 +1 @@
1
- const a38_0x58fa45=a38_0x1a12;(function(_0x153fae,_0x4d159b){const _0x1a4596=a38_0x1a12,_0x466b73=_0x153fae();while(!![]){try{const _0x82c497=-parseInt(_0x1a4596(0x105))/0x1*(-parseInt(_0x1a4596(0xfe))/0x2)+-parseInt(_0x1a4596(0x101))/0x3*(-parseInt(_0x1a4596(0x104))/0x4)+-parseInt(_0x1a4596(0x102))/0x5+parseInt(_0x1a4596(0x100))/0x6+parseInt(_0x1a4596(0x103))/0x7+parseInt(_0x1a4596(0xff))/0x8+-parseInt(_0x1a4596(0x106))/0x9;if(_0x82c497===_0x4d159b)break;else _0x466b73['push'](_0x466b73['shift']());}catch(_0x5724c3){_0x466b73['push'](_0x466b73['shift']());}}}(a38_0x23bb,0x91324));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x1a12(_0x32d03d,_0x2e4dfd){_0x32d03d=_0x32d03d-0xfe;const _0x23bbfc=a38_0x23bb();let _0x1a1228=_0x23bbfc[_0x32d03d];return _0x1a1228;}async function execute(_0x40901a){const _0x3dc21d=await buildSchemaPayload();return{'ok':!![],'data':_0x3dc21d};}function a38_0x23bb(){const _0x1b9eb3=['6628146kYbuYM','123WxLlAC','3818410tiBrDL','6354943DKRgcU','46616xdAeHo','2AUdcZR','21493260QNPzEC','schema','read','839368ongeSZ','3334592yEzOUt'];a38_0x23bb=function(){return _0x1b9eb3;};return a38_0x23bb();}export const schemaDefinition={'service':a38_0x58fa45(0x107),'command':'export','description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a38_0x58fa45(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a38_0x5b4b60=a38_0x150e;(function(_0x4c0b9d,_0x58e09b){const _0xbd9998=a38_0x150e,_0x20332b=_0x4c0b9d();while(!![]){try{const _0x16ec39=parseInt(_0xbd9998(0x1b3))/0x1+-parseInt(_0xbd9998(0x1b4))/0x2*(-parseInt(_0xbd9998(0x1bc))/0x3)+parseInt(_0xbd9998(0x1bb))/0x4*(parseInt(_0xbd9998(0x1b5))/0x5)+-parseInt(_0xbd9998(0x1bd))/0x6*(-parseInt(_0xbd9998(0x1b9))/0x7)+parseInt(_0xbd9998(0x1be))/0x8+parseInt(_0xbd9998(0x1b6))/0x9+-parseInt(_0xbd9998(0x1b8))/0xa;if(_0x16ec39===_0x58e09b)break;else _0x20332b['push'](_0x20332b['shift']());}catch(_0x53266c){_0x20332b['push'](_0x20332b['shift']());}}}(a38_0x4fd8,0x58951));import{buildSchemaPayload}from'../framework/schema-export.js';function a38_0x150e(_0x1455b2,_0x492b0f){_0x1455b2=_0x1455b2-0x1b3;const _0x4fd859=a38_0x4fd8();let _0x150eea=_0x4fd859[_0x1455b2];return _0x150eea;}function a38_0x4fd8(){const _0x365b1e=['65XGbhQv','3448062SsOOdr','Export\x20machine-readable\x20command\x20schema\x20(JSON)','23549730BFVnCF','2325337zqljdO','read','164060gzuXLv','3Hktean','6uyHsFr','5578560CgOgYR','589141KsIofq','365682UfgtDs'];a38_0x4fd8=function(){return _0x365b1e;};return a38_0x4fd8();}async function execute(_0x5cf692){const _0x1af5e3=await buildSchemaPayload();return{'ok':!![],'data':_0x1af5e3};}export const schemaDefinition={'service':'schema','command':'export','description':a38_0x5b4b60(0x1b7),'risk':a38_0x5b4b60(0x1ba),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};